commit 8d2d37064ee643d8c5830eedea08194e606c1896 Author: Radosław Piliszek Date: Wed Sep 30 17:37:57 2020 +0200 Control Neutron migrations Since [1] and [2] merged, K-A has to control Neutron migrations to migrate all required projects. This patch additionally fixes the other observed issue. [1] https://review.opendev.org/750075 [2] https://review.opendev.org/753543 Change-Id: I09e1b421e9066890b50bd82331a3050de252464f Closes-Bug: #1894380 Depends-On: https://review.opendev.org/755346 diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index af3fd83..442bafa 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -384,6 +384,17 @@ neutron_l3_agent_host_ipv6_neigh_gc_thresh2: "{{ neutron_l3_agent_host_ipv4_neig neutron_l3_agent_host_ipv6_neigh_gc_thresh3: "{{ neutron_l3_agent_host_ipv4_neigh_gc_thresh3 }}" #################### +# Subprojects +#################### +neutron_subprojects: + - name: "networking-sfc" + enabled: "{{ enable_neutron_sfc | bool }}" + - name: "neutron-dynamic-routing" + enabled: "{{ enable_neutron_bgp_dragent | bool }}" + - name: "neutron-vpnaas" + enabled: "{{ enable_neutron_vpnaas | bool }}" + +#################### # Mechanism drivers #################### mechanism_drivers: @@ -420,10 +431,15 @@ extension_drivers: neutron_extension_drivers: "{{ extension_drivers | selectattr('enabled', 'equalto', true) | list }}" #################### +# Neutron bootstrap +#################### +neutron_bootstrap_services: "{{ neutron_subprojects | selectattr('enabled') | map(attribute='name') | list }}" + +#################### # Neutron upgrade #################### neutron_enable_rolling_upgrade: "yes" -neutron_rolling_upgrade_services: ["neutron", "neutron-vpnaas"] +neutron_rolling_upgrade_services: "{{ neutron_subprojects | selectattr('enabled') | map(attribute='name') | list }}" #################### # Service Plugins diff --git a/ansible/roles/neutron/tasks/bootstrap_service.yml b/ansible/roles/neutron/tasks/bootstrap_service.yml index 62c9e63..6c212bd 100644 --- a/ansible/roles/neutron/tasks/bootstrap_service.yml +++ b/ansible/roles/neutron/tasks/bootstrap_service.yml @@ -10,6 +10,7 @@ environment: KOLLA_BOOTSTRAP: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" + NEUTRON_BOOTSTRAP_SERVICES: "{{ neutron_bootstrap_services | join(' ') }}" image: "{{ neutron_server.image }}" labels: BOOTSTRAP: @@ -18,29 +19,3 @@ volumes: "{{ neutron_server.volumes }}" run_once: True delegate_to: "{{ groups[neutron_server.group][0] }}" - when: (kolla_action == "deploy") - or (not neutron_enable_rolling_upgrade | bool) - -- name: Running Neutron sfc bootstrap container - vars: - neutron_server: "{{ neutron_services['neutron-server'] }}" - become: true - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - NEUTRON_SFC_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ neutron_server.image }}" - labels: - BOOTSTRAP: - name: "bootstrap_neutron_sfc" - restart_policy: no - volumes: "{{ neutron_server.volumes }}" - when: - - enable_neutron_sfc | bool - - neutron_server.enabled | bool - - neutron_server.host_in_groups | bool - run_once: True - delegate_to: "{{ groups[neutron_server.group][0] }}" diff --git a/ansible/roles/neutron/tasks/rolling_upgrade.yml b/ansible/roles/neutron/tasks/rolling_upgrade.yml index 27fd413..f3512c2 100644 --- a/ansible/roles/neutron/tasks/rolling_upgrade.yml +++ b/ansible/roles/neutron/tasks/rolling_upgrade.yml @@ -30,11 +30,6 @@ run_once: True delegate_to: "{{ groups['neutron-server'][0] }}" -- include_tasks: bootstrap_service.yml - vars: - neutron_server: "{{ neutron_services['neutron-server'] }}" - when: (enable_neutron_sfc | bool and neutron_server.enabled | bool) - - name: Flush Handlers meta: flush_handlers diff --git a/releasenotes/notes/bug-1894380-01897f17dd35190c.yaml b/releasenotes/notes/bug-1894380-01897f17dd35190c.yaml new file mode 100644 index 0000000..14e82f9 --- /dev/null +++ b/releasenotes/notes/bug-1894380-01897f17dd35190c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes some Neutron subprojects not using the rolling upgrade scheme. + SFC forcibly used the legacy scheme and dynamic routing was not migrated + at all. + `LP#1894380 `__