-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Add ML2/OVN and ML2/OVS setting checks for neutron"
- Loading branch information
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
- import_tasks: neutron_plugin_agent_check.yml | ||
|
||
- import_tasks: register.yml | ||
|
||
- include_tasks: clone.yml | ||
|
35 changes: 35 additions & 0 deletions
35
ansible/roles/neutron/tasks/neutron_plugin_agent_check.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,5 @@ | |
run_once: True | ||
when: | ||
- enable_ironic_neutron_agent | bool | ||
|
||
- import_tasks: neutron_plugin_agent_check.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |