Merge "Add ML2/OVN and ML2/OVS setting checks for neutron"

This commit is contained in:
Zuul 2023-09-27 13:26:03 +00:00 committed by Gerrit Code Review
commit b422bada22
5 changed files with 50 additions and 0 deletions

View File

@ -1,4 +1,6 @@
--- ---
- import_tasks: neutron_plugin_agent_check.yml
- import_tasks: register.yml - import_tasks: register.yml
- include_tasks: clone.yml - include_tasks: clone.yml

View File

@ -0,0 +1,35 @@
---
- name: Get container facts
become: true
kolla_container_facts:
container_engine: "{{ kolla_container_engine }}"
name:
- neutron_openvswitch_agent
- ovn_controller
check_mode: false
register: container_facts
- name: Get container volume facts
become: true
kolla_container_volume_facts:
container_engine: "{{ kolla_container_engine }}"
name:
- ovn_nb_db
- ovn_sb_db
check_mode: false
register: container_volume_facts
- name: Check for ML2/OVN presence
assert:
that: neutron_plugin_agent == 'ovn'
fail_msg: "ML2/OVN agent detected, neutron_plugin_agent is not set to 'ovn', Kolla-Ansible does not support this migration operation."
when: (container_facts['ovn_controller'] is defined) or (container_volume_facts['ovn_nb_db'] is defined) or (container_volume_facts['ovn_sb_db'] is defined)
- name: Check for ML2/OVS presence
assert:
that:
- neutron_plugin_agent == 'openvswitch'
- container_volume_facts['ovn_nb_db'] is not defined
- container_volume_facts['ovn_sb_db'] is not defined
fail_msg: "ML2/OVS agent detected, neutron_plugin_agent is not set to 'openvswitch', Kolla-Ansible does not support this migration operation."
when: container_facts['neutron_openvswitch_agent'] is defined

View File

@ -53,3 +53,5 @@
run_once: True run_once: True
when: when:
- enable_ironic_neutron_agent | bool - enable_ironic_neutron_agent | bool
- import_tasks: neutron_plugin_agent_check.yml

View File

@ -1,4 +1,6 @@
--- ---
- import_tasks: neutron_plugin_agent_check.yml
- include_tasks: rolling_upgrade.yml - include_tasks: rolling_upgrade.yml
when: neutron_enable_rolling_upgrade | bool when: neutron_enable_rolling_upgrade | bool

View File

@ -0,0 +1,9 @@
---
features:
- |
Added a neutron check for ML2/OVS and ML2/OVN presence
at the start of deploy phase. It will fail if
neutron_plugin_agent is set to ``ovn`` and use of ML2/OVS
container detected. In case where neutron_plugin_agent
is set to ``openvswitch`` the check will fail when it detects
ML2/OVN container or any of the OVN specific volumes.