Merge "openvswitch: always run handler to to ensure OVS bridges are up"
This commit is contained in:
commit
29f3f0b146
@ -22,7 +22,6 @@
|
|||||||
or openvswitch_start_ovsdb_server | changed
|
or openvswitch_start_ovsdb_server | changed
|
||||||
notify:
|
notify:
|
||||||
- Waiting for openvswitch_db service to be ready
|
- Waiting for openvswitch_db service to be ready
|
||||||
- Ensuring OVS bridge is properly setup
|
|
||||||
|
|
||||||
- name: Waiting for openvswitch_db service to be ready
|
- name: Waiting for openvswitch_db service to be ready
|
||||||
command: docker exec openvswitch_db ovs-vsctl --no-wait show
|
command: docker exec openvswitch_db ovs-vsctl --no-wait show
|
||||||
@ -32,18 +31,6 @@
|
|||||||
retries: 30
|
retries: 30
|
||||||
delay: 2
|
delay: 2
|
||||||
|
|
||||||
- name: Ensuring OVS bridge is properly setup
|
|
||||||
command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ item.0 }} {{ item.1 }}
|
|
||||||
register: status
|
|
||||||
changed_when: status.stdout.find('changed') != -1
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups["network"]
|
|
||||||
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
|
|
||||||
- not enable_onos | bool
|
|
||||||
with_together:
|
|
||||||
- "{{ neutron_bridge_name.split(',') }}"
|
|
||||||
- "{{ neutron_external_interface.split(',') }}"
|
|
||||||
|
|
||||||
- name: Restart openvswitch-vswitchd container
|
- name: Restart openvswitch-vswitchd container
|
||||||
vars:
|
vars:
|
||||||
service_name: "openvswitch-vswitchd"
|
service_name: "openvswitch-vswitchd"
|
||||||
|
@ -3,3 +3,5 @@
|
|||||||
|
|
||||||
- name: Flush Handlers
|
- name: Flush Handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
|
- include_tasks: ensure-ovs-bridge.yml
|
||||||
|
12
ansible/roles/openvswitch/tasks/ensure-ovs-bridge.yml
Normal file
12
ansible/roles/openvswitch/tasks/ensure-ovs-bridge.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: Ensuring OVS bridge is properly setup
|
||||||
|
command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ item.0 }} {{ item.1 }}
|
||||||
|
register: status
|
||||||
|
changed_when: status.stdout.find('changed') != -1
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups["network"]
|
||||||
|
or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool )
|
||||||
|
- not enable_onos | bool
|
||||||
|
with_together:
|
||||||
|
- "{{ neutron_bridge_name.split(',') }}"
|
||||||
|
- "{{ neutron_external_interface.split(',') }}"
|
@ -3,3 +3,5 @@
|
|||||||
|
|
||||||
- name: Flush Handlers
|
- name: Flush Handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
|
- include_tasks: ensure-ovs-bridge.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user