Merge "Remove ovs chronos job. Move all bootstraps to vswitchd container"
This commit is contained in:
commit
e48e6d3eec
17
config/neutron/templates/ovs_ensure_configured.sh.j2
Normal file
17
config/neutron/templates/ovs_ensure_configured.sh.j2
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
bridge=$1
|
||||
port=$2
|
||||
|
||||
ovs-vsctl br-exists $bridge; rc=$?
|
||||
if [[ $rc == 2 ]]; then
|
||||
changed=changed
|
||||
ovs-vsctl --no-wait add-br $bridge
|
||||
fi
|
||||
|
||||
if [[ ! $(ovs-vsctl list-ports $bridge) =~ $(echo "\<$port\>") ]]; then
|
||||
changed=changed
|
||||
ovs-vsctl --no-wait add-port $bridge $port
|
||||
fi
|
||||
|
||||
echo $changed
|
@ -15,7 +15,7 @@ container:
|
||||
mode: RO
|
||||
service:
|
||||
daemon:
|
||||
dependencies: [neutron-server/db_sync, neutron_ansible_tasks/create_user, rabbitmq/daemon, openvswitch-tasks/setup_ovs_bridge]
|
||||
dependencies: [neutron-server/db_sync, neutron_ansible_tasks/create_user, rabbitmq/daemon, openvswitch-vswitchd/setup_ovs_bridge]
|
||||
command: neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||
files:
|
||||
neutron.conf.j2:
|
||||
@ -35,4 +35,4 @@ service:
|
||||
constraints: [["hostname", "UNIQUE"], ["openstack_role", "LIKE", "(controller|compute)"]]
|
||||
commands:
|
||||
extend_start:
|
||||
command: kolla_extend_start
|
||||
command: kolla_extend_start
|
||||
|
@ -1,27 +0,0 @@
|
||||
name: infra/openvswitch/openvswitch-tasks
|
||||
enabled: {{ enable_neutron | bool and neutron_plugin_agent == 'openvswitch' }}
|
||||
container:
|
||||
image: "{{ openvswitch_db_image }}:{{ openvswitch_db_tag }}"
|
||||
parameters:
|
||||
- key: volume
|
||||
value: "kolla_logs_{{ deployment_id }}:/var/log/kolla"
|
||||
volumes:
|
||||
- containerPath: "/run"
|
||||
hostPath: "/run"
|
||||
mode: RW
|
||||
task:
|
||||
mem: {{ infra_mem }}
|
||||
cpus: {{ infra_cpus }}
|
||||
commands:
|
||||
check_ovs_db:
|
||||
dependencies: [openvswitch-db/daemon]
|
||||
run_once: True
|
||||
retries: 30
|
||||
delay: 5
|
||||
command: ovs-vsctl --no-wait show
|
||||
setup_ovs_bridge:
|
||||
dependencies: [openvswitch-tasks/check_ovs_db]
|
||||
run_once: True
|
||||
retries: 10
|
||||
delay: 5
|
||||
command: /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }}
|
@ -15,8 +15,28 @@ container:
|
||||
mode: RO
|
||||
service:
|
||||
daemon:
|
||||
dependencies: [openvswitch-tasks/setup_ovs_bridge]
|
||||
dependencies: [openvswitch-vswitchd/bootstrap, openvswitch-vswitchd/setup_ovs_bridge]
|
||||
command: /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock --mlockall
|
||||
mem: {{ openvswitch_vswitchd_mem }}
|
||||
cpus: {{ openvswitch_vswitchd_cpus }}
|
||||
constraints: [["hostname", "UNIQUE"], ["openstack_role", "LIKE", "(controller|compute)"]]
|
||||
constraints: [["hostname", "UNIQUE"], ["openstack_role", "LIKE", "(controller|compute)"]]
|
||||
commands:
|
||||
bootstrap:
|
||||
command: kolla_extend_start
|
||||
check_ovs_db:
|
||||
dependencies: [openvswitch-db/daemon]
|
||||
retries: 30
|
||||
delay: 5
|
||||
command: ovs-vsctl --no-wait show
|
||||
setup_ovs_bridge:
|
||||
dependencies: [openvswitch-vswitchd/check_ovs_db]
|
||||
retries: 10
|
||||
delay: 5
|
||||
command: /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }}
|
||||
files:
|
||||
ovs_ensure_configured.sh.j2:
|
||||
source: "config/neutron/templates/ovs_ensure_configured.sh.j2"
|
||||
dest: /usr/local/bin/kolla_ensure_openvswitch_configured
|
||||
owner: root
|
||||
perm: "0755"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user