Add ML2/OVN and ML2/OVS setting checks for neutron
It will check the setting of neutron_plugin_agent, if it is set to "ovn" or "openvswitch", and run container and volume checks to make sure the other agent was not already deployed. Change-Id: Ie00572f3ff9d3500abd5519bd472e2134c318886
This commit is contained in:
parent
dc42b98e7a
commit
d3d67dc02c
@ -1,4 +1,6 @@
|
||||
---
|
||||
- import_tasks: neutron_plugin_agent_check.yml
|
||||
|
||||
- import_tasks: register.yml
|
||||
|
||||
- include_tasks: clone.yml
|
||||
|
35
ansible/roles/neutron/tasks/neutron_plugin_agent_check.yml
Normal file
35
ansible/roles/neutron/tasks/neutron_plugin_agent_check.yml
Normal 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
|
@ -53,3 +53,5 @@
|
||||
run_once: True
|
||||
when:
|
||||
- enable_ironic_neutron_agent | bool
|
||||
|
||||
- import_tasks: neutron_plugin_agent_check.yml
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
- import_tasks: neutron_plugin_agent_check.yml
|
||||
|
||||
- include_tasks: rolling_upgrade.yml
|
||||
when: neutron_enable_rolling_upgrade | bool
|
||||
|
||||
|
9
releasenotes/notes/ml2ovs_precheck-c859504004f6884b.yaml
Normal file
9
releasenotes/notes/ml2ovs_precheck-c859504004f6884b.yaml
Normal 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.
|
Loading…
Reference in New Issue
Block a user