diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-12-04 01:39:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-12-04 01:39:50 +0000 |
| commit | 7ace0155b800e059194ac19798196bf3f267918d (patch) | |
| tree | 9898cd8f1c80745b38c2d3d1ea1afe65157efe5c | |
| parent | 271de22a7336d4adaa1ebf7b41df2c5eddb31ff5 (diff) | |
| parent | 9ce814619aa951f7d87b14f2ca67e7128ac12d2c (diff) | |
| download | kolla-7ace0155b800e059194ac19798196bf3f267918d.tar.gz kolla-7ace0155b800e059194ac19798196bf3f267918d.zip | |
Merge "configure ovs bridge in openvswitch-db container"
| -rw-r--r-- | ansible/roles/neutron/tasks/start.yml | 14 | ||||
| -rw-r--r-- | docker/openvswitch/openvswitch-db-server/Dockerfile.j2 | 3 | ||||
| -rw-r--r-- | docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh (renamed from docker/openvswitch/openvswitch-vswitchd/ovs_ensure_configured.sh) | 4 | ||||
| -rw-r--r-- | docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 | 3 |
4 files changed, 12 insertions, 12 deletions
diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index b2181196e..5d8d3eaf3 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -39,6 +39,13 @@ when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) and 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 + changed_when: status.stdout.find('changed') != -1 + when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) + and neutron_plugin_agent == "openvswitch" + - name: Starting Openvswitch-vswitchd container docker: tty: True @@ -63,13 +70,6 @@ when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) and neutron_plugin_agent == "openvswitch" -- name: Ensuring OVS bridge is properly setup - command: docker exec openvswitch_vswitchd /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }} - register: status - changed_when: status.stdout.find('changed') != -1 - when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) - and neutron_plugin_agent == "openvswitch" - - name: Starting Neutron-server container docker: tty: True diff --git a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 index 8692f8cee..1bcc6e71e 100644 --- a/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-db-server/Dockerfile.j2 @@ -1,7 +1,8 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} MAINTAINER {{ maintainer }} +COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start +RUN chmod 755 /usr/local/bin/kolla_ensure_openvswitch_configured /usr/local/bin/kolla_extend_start {{ include_footer }} diff --git a/docker/openvswitch/openvswitch-vswitchd/ovs_ensure_configured.sh b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh index c39d64ff7..99bae3e87 100644 --- a/docker/openvswitch/openvswitch-vswitchd/ovs_ensure_configured.sh +++ b/docker/openvswitch/openvswitch-db-server/ovs_ensure_configured.sh @@ -6,12 +6,12 @@ port=$2 ovs-vsctl br-exists $bridge; rc=$? if [[ $rc == 2 ]]; then changed=changed - ovs-vsctl add-br $bridge + ovs-vsctl --no-wait add-br $bridge fi if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then changed=changed - ovs-vsctl add-port $bridge $port + ovs-vsctl --no-wait add-port $bridge $port fi echo $changed diff --git a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 b/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 index 43f3ca55e..8692f8cee 100644 --- a/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 +++ b/docker/openvswitch/openvswitch-vswitchd/Dockerfile.j2 @@ -1,8 +1,7 @@ FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }} MAINTAINER {{ maintainer }} -COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ensure_openvswitch_configured +RUN chmod 755 /usr/local/bin/kolla_extend_start {{ include_footer }} |
