From a692718c00e0aeb431a7ea932f9a33ffbede0eae Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Wed, 3 Feb 2016 17:22:04 +0800 Subject: [PATCH] Ensuring the openvswitch_db is ready before creating bridges Change-Id: I42550c57222de4ad5556e95d40bb96528bc1d085 Closes-Bug: #1533942 --- ansible/roles/neutron/tasks/start.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index 00de60135f..5bdb2f7f5e 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -16,6 +16,20 @@ or inventory_hostname in groups['neutron-metadata-agent']) - neutron_plugin_agent == "openvswitch" +- name: Waiting the openvswtich_db service to be ready + command: docker exec openvswitch_db ovs-vsctl --no-wait show + register: check_result + until: check_result | success + changed_when: False + retries: 30 + delay: 2 + when: + - (inventory_hostname in groups['compute'] + or inventory_hostname in groups['neutron-dhcp-agent'] + or inventory_hostname in groups['neutron-l3-agent'] + or inventory_hostname in groups['neutron-metadata-agent']) + - neutron_plugin_agent == "openvswitch" + - name: Ensuring OVS bridge is properly setup command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }} register: status