From e78e211a3a8bd085ae7b99b2381e6bbeecea3b7e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 22 Sep 2020 11:43:45 +0300 Subject: [PATCH] Add neutron_keepalived_no_track variable Until neutron bug is not fixed, we should control whether to use no_track for keepalived or not, based on the distro version We should probably rollback it once upstream bug got fixed and bumped. Depends-On: https://review.opendev.org/c/764895 Change-Id: I539dfd90576b34693eb8e7aef9f97e64739700ae Related-Bug: #1896506 (cherry picked from commit 24d64bbd52a11d82c8891f2bc77e666b7ddd35d1) --- defaults/main.yml | 5 +++++ templates/l3_agent.ini.j2 | 2 ++ vars/debian.yml | 2 ++ vars/redhat.yml | 2 ++ 4 files changed, 11 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 897c8ea1..a4872a95 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -393,6 +393,11 @@ neutron_local_ip: 127.0.0.1 ### L3 Agent Plugin Configuration ### +# Enable/disable no_track for keepalived (available for keepalived >2.0) +# NOTE(noonedeadpunk): Is is done until the merge and backport of the fix for +# https://bugs.launchpad.net/ubuntu/+source/neutron/+bug/1896506 +neutron_keepalived_no_track: "{{ _neutron_keepalived_no_track | default(True) }}" + # L3HA configuration options neutron_ha_vrrp_auth_type: PASS neutron_l3_ha_net_cidr: 169.254.192.0/18 diff --git a/templates/l3_agent.ini.j2 b/templates/l3_agent.ini.j2 index a89bb417..d0686d7f 100644 --- a/templates/l3_agent.ini.j2 +++ b/templates/l3_agent.ini.j2 @@ -21,6 +21,8 @@ ha_vrrp_auth_type = {{ neutron_ha_vrrp_auth_type }} # Metadata enable_metadata_proxy = True +keepalived_use_no_track = {{ neutron_keepalived_no_track }} + # L3 plugins {% set l3_agent_plugins = [] %} diff --git a/vars/debian.yml b/vars/debian.yml index 5cb9331e..6885e098 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -107,3 +107,5 @@ neutron_remove_distro_packages: neutron_oslomsg_amqp1_distro_packages: - libsasl2-modules - sasl2-bin + +_neutron_keepalived_no_track: "{{ (ansible_distribution_major_version is version('20', '>=') or ansible_os_family | lower == 'debian') }}" diff --git a/vars/redhat.yml b/vars/redhat.yml index 8ef97990..3610b20b 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -90,3 +90,5 @@ neutron_oslomsg_amqp1_distro_packages: - cyrus-sasl-lib - cyrus-sasl-plain - cyrus-sasl-md5 + +_neutron_keepalived_no_track: "{{ (ansible_distribution_major_version is version('8', '>=')) }}"