From 85c12eb7eb7fc26f458e0ff9983535401e55a99c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 5 May 2024 16:00:13 +0900 Subject: [PATCH] Remove deprecated [haproxy_amphora] use_upstart The option was deprecated in Train release[1] and has been unused by amphora agent since then. [1] c4408c4c7846cf3145e4fdad8610cae54ecd1e97 Change-Id: I1dfbe2d1db21959b007818c6dee7458d117968b9 --- octavia/amphorae/backends/agent/agent_jinja_cfg.py | 1 - .../backends/agent/templates/amphora_agent_conf.template | 1 - octavia/common/config.py | 5 ----- .../unit/amphorae/backends/agent/test_agent_jinja_cfg.py | 5 ----- releasenotes/notes/remove-use_upstart-448eaf86a7a46c54.yaml | 4 ++++ 5 files changed, 4 insertions(+), 12 deletions(-) create mode 100644 releasenotes/notes/remove-use_upstart-448eaf86a7a46c54.yaml diff --git a/octavia/amphorae/backends/agent/agent_jinja_cfg.py b/octavia/amphorae/backends/agent/agent_jinja_cfg.py index 04cb83565b..4d3c610ad2 100644 --- a/octavia/amphorae/backends/agent/agent_jinja_cfg.py +++ b/octavia/amphorae/backends/agent/agent_jinja_cfg.py @@ -52,7 +52,6 @@ class AgentJinjaTemplater: 'haproxy_cmd': CONF.haproxy_amphora.haproxy_cmd, 'heartbeat_interval': CONF.health_manager.heartbeat_interval, 'heartbeat_key': CONF.health_manager.heartbeat_key, - 'use_upstart': CONF.haproxy_amphora.use_upstart, 'respawn_count': CONF.haproxy_amphora.respawn_count, 'respawn_interval': CONF.haproxy_amphora.respawn_interval, 'amphora_udp_driver': CONF.amphora_agent.amphora_udp_driver, diff --git a/octavia/amphorae/backends/agent/templates/amphora_agent_conf.template b/octavia/amphorae/backends/agent/templates/amphora_agent_conf.template index 97294a1f76..2963271fbf 100644 --- a/octavia/amphorae/backends/agent/templates/amphora_agent_conf.template +++ b/octavia/amphorae/backends/agent/templates/amphora_agent_conf.template @@ -25,7 +25,6 @@ bind_port = {{ bind_port }} haproxy_cmd = {{ haproxy_cmd }} respawn_count = {{ respawn_count }} respawn_interval = {{ respawn_interval }} -use_upstart = {{ use_upstart }} user_log_facility = {{ user_log_facility }} administrative_log_facility = {{ administrative_log_facility }} diff --git a/octavia/common/config.py b/octavia/common/config.py index 7be8b339d6..e0737a8136 100644 --- a/octavia/common/config.py +++ b/octavia/common/config.py @@ -407,11 +407,6 @@ haproxy_amphora_opts = [ help=_("The client certificate to talk to the agent")), cfg.StrOpt('server_ca', default='/etc/octavia/certs/server_ca.pem', help=_("The ca which signed the server certificates")), - cfg.BoolOpt('use_upstart', default=True, - deprecated_for_removal=True, - deprecated_reason='This is now automatically discovered ' - ' and configured.', - help=_("If False, use sysvinit.")), cfg.IntOpt('api_db_commit_retry_attempts', default=15, help=_('The number of times the database action will be ' 'attempted.')), diff --git a/octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py b/octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py index 31537e523d..f7643bb157 100644 --- a/octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py +++ b/octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py @@ -39,7 +39,6 @@ class AgentJinjaTestCase(base.TestCase): amphora_udp_driver='keepalived_lvs'), self.conf.config(group="haproxy_amphora", base_cert_dir='/var/lib/octavia/certs') - self.conf.config(group="haproxy_amphora", use_upstart='True') self.conf.config(group="haproxy_amphora", base_path='/var/lib/octavia') self.conf.config(group="haproxy_amphora", bind_host='0.0.0.0') self.conf.config(group="haproxy_amphora", bind_port=9443) @@ -70,7 +69,6 @@ class AgentJinjaTestCase(base.TestCase): 'haproxy_cmd = /usr/sbin/haproxy\n' 'respawn_count = 2\n' 'respawn_interval = 2\n' - 'use_upstart = True\n' 'user_log_facility = 0\n' 'administrative_log_facility = 1\n\n' '[health_manager]\n' @@ -96,7 +94,6 @@ class AgentJinjaTestCase(base.TestCase): def test_build_agent_config_with_interfaces_file(self): ajc = agent_jinja_cfg.AgentJinjaTemplater() - self.conf.config(group="haproxy_amphora", use_upstart='False') self.conf.config(group="amphora_agent", administrative_log_facility=1) self.conf.config(group="amphora_agent", user_log_facility=0) @@ -112,7 +109,6 @@ class AgentJinjaTestCase(base.TestCase): 'haproxy_cmd = /usr/sbin/haproxy\n' 'respawn_count = 2\n' 'respawn_interval = 2\n' - 'use_upstart = False\n' 'user_log_facility = 0\n' 'administrative_log_facility = 1\n\n' '[health_manager]\n' @@ -156,7 +152,6 @@ class AgentJinjaTestCase(base.TestCase): 'haproxy_cmd = /usr/sbin/haproxy\n' 'respawn_count = 2\n' 'respawn_interval = 2\n' - 'use_upstart = True\n' 'user_log_facility = 0\n' 'administrative_log_facility = 1\n\n' '[health_manager]\n' diff --git a/releasenotes/notes/remove-use_upstart-448eaf86a7a46c54.yaml b/releasenotes/notes/remove-use_upstart-448eaf86a7a46c54.yaml new file mode 100644 index 0000000000..57a1b8d995 --- /dev/null +++ b/releasenotes/notes/remove-use_upstart-448eaf86a7a46c54.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The deprecated ``[haproxy_amphora] use_upstart`` option has been removed.