configure ovs bridge in openvswitch-db container
- this change moves the ovs_ensure_configured.sh file to the openvswitch-db container. - this change reorders the plays in ansible/roles/neutron/tasks/start.yml to configure the ovs bridges before starting the vswitchd container. Change-Id: Ied1a82d48377534c15680406df9a96caf3b79515 Closes-Bug: #1522133
This commit is contained in:
parent
cb73c6b7c0
commit
9ce814619a
@ -39,6 +39,13 @@
|
|||||||
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
||||||
and neutron_plugin_agent == "openvswitch"
|
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
|
- name: Starting Openvswitch-vswitchd container
|
||||||
docker:
|
docker:
|
||||||
tty: True
|
tty: True
|
||||||
@ -63,13 +70,6 @@
|
|||||||
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
||||||
and neutron_plugin_agent == "openvswitch"
|
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
|
- name: Starting Neutron-server container
|
||||||
docker:
|
docker:
|
||||||
tty: True
|
tty: True
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured
|
||||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
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 }}
|
{{ include_footer }}
|
||||||
|
@ -6,12 +6,12 @@ port=$2
|
|||||||
ovs-vsctl br-exists $bridge; rc=$?
|
ovs-vsctl br-exists $bridge; rc=$?
|
||||||
if [[ $rc == 2 ]]; then
|
if [[ $rc == 2 ]]; then
|
||||||
changed=changed
|
changed=changed
|
||||||
ovs-vsctl add-br $bridge
|
ovs-vsctl --no-wait add-br $bridge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then
|
if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then
|
||||||
changed=changed
|
changed=changed
|
||||||
ovs-vsctl add-port $bridge $port
|
ovs-vsctl --no-wait add-port $bridge $port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $changed
|
echo $changed
|
@ -1,8 +1,7 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
COPY ovs_ensure_configured.sh /usr/local/bin/kolla_ensure_openvswitch_configured
|
|
||||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
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 }}
|
{{ include_footer }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user