Skip to content

Commit 5dd7ad9

Browse files
committed
Add generic network interface management in the amphora
Handle network configuration using Octavia tools. amphora-interface configures network interfaces inside the amphora using pyroute2 and a set of json files for persistent configuration in the /etc/octavia/interfaces/ directory. Story: 2005235 Task: 30019 Depends-On: https://review.opendev.org/806558 Change-Id: I5360c8246cd39f90eb7104a883f87c0042d146c4
1 parent 39735eb commit 5dd7ad9

38 files changed

+2860
-1868
lines changed

elements/amphora-agent/install.d/amphora-agent-source-install/75-amphora-agent-install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ ln -s $AMP_VENV/bin/haproxy-vrrp-* /usr/local/bin/ || true
2727
# Link heath checker script
2828
ln -s $AMP_VENV/bin/amphora-health-checker /usr/local/bin/amphora-health-checker || true
2929

30+
# Link amphora interface script
31+
ln -s $AMP_VENV/bin/amphora-interface /usr/local/bin/amphora-interface || true
32+
3033
mkdir /etc/octavia
3134
# we assume certs, etc will come in through the config drive
3235
mkdir /etc/octavia/certs

etc/octavia.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@
457457
#
458458
# agent_server_network_dir =
459459

460-
# agent_server_network_file =
461460
# agent_request_read_timeout = 180
462461

463462
# Minimum TLS protocol, eg: TLS, TLSv1.1, TLSv1.2, TLSv1.3 (if available)

octavia/amphorae/backends/agent/agent_jinja_cfg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ def build_agent_config(self, amphora_id, topology):
4040
'agent_server_cert': CONF.amphora_agent.agent_server_cert,
4141
'agent_server_network_dir':
4242
CONF.amphora_agent.agent_server_network_dir,
43-
'agent_server_network_file':
44-
CONF.amphora_agent.agent_server_network_file,
4543
'agent_request_read_timeout':
4644
CONF.amphora_agent.agent_request_read_timeout,
4745
'amphora_id': amphora_id,

octavia/amphorae/backends/agent/api_server/loadbalancer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from werkzeug import exceptions
2929

3030
from octavia.amphorae.backends.agent.api_server import haproxy_compatibility
31-
from octavia.amphorae.backends.agent.api_server import osutils
3231
from octavia.amphorae.backends.agent.api_server import util
3332
from octavia.common import constants as consts
3433
from octavia.common import utils as octavia_utils
@@ -73,9 +72,6 @@ def __getattr__(self, attr):
7372

7473
class Loadbalancer(object):
7574

76-
def __init__(self):
77-
self._osutils = osutils.BaseOS.get_os_util()
78-
7975
def get_haproxy_config(self, lb_id):
8076
"""Gets the haproxy config
8177
@@ -199,7 +195,6 @@ def upload_haproxy_config(self, amphora_id, lb_id):
199195
respawn_interval),
200196
amphora_netns=consts.AMP_NETNS_SVC_PREFIX,
201197
amphora_nsname=consts.AMPHORA_NAMESPACE,
202-
HasIFUPAll=self._osutils.has_ifup_all(),
203198
haproxy_major_version=hap_major,
204199
haproxy_minor_version=hap_minor
205200
)

0 commit comments

Comments
 (0)