From 0ab13dc7dbdf60f287116aedb2d577c01d55d62a Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 19 Feb 2020 17:39:10 +0000 Subject: [PATCH] Clean up some kolla-kubernetes cruft in OVS The start-ovsdb-server script is only ever called with one argument by kolla ansible, so we can remove the multiple argument handling used by kolla-kubernetes (RIP). Change-Id: I9c3bc8ad24768052fc883c6fedd5f19336eb3fa4 --- .../templates/start-ovsdb-server.j2 | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 b/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 index d67f33059f..b76dc40e2b 100644 --- a/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 +++ b/ansible/roles/openvswitch/templates/start-ovsdb-server.j2 @@ -6,34 +6,6 @@ if ([ -f /var/lib/openvswitch/conf.db ] && [ `ovsdb-tool needs-conversion /var/l /usr/bin/ovsdb-tool convert /var/lib/openvswitch/conf.db fi -# NOTE: (sbezverk) ovs_bridge and ovs_ext_intf variables get initialized only when -# this script is executed for kubernetes deployment. With Ansible deployment, only -# ovsdb-server gets launched and then the following workflow step will create -# an external bridge and plug an external interface. With Kubernetes we want to -# leverage its dynamic nature of automatic scaling up and down. It means all -# activities related to creating initial bridge, plugging external interface -# must be done by DaemonSet launched container. - ovsdb_ip=$1 -ovs_bridge=$2 -ovs_ext_intf=$3 -printf "Argument p_out is %s\n" "$p_out" -printf "Argument arg_1 is %s\n" "$arg_1" - -# NOTE: (sbezverk) The reason for introducing this script is to be able -# to launch ovsdb-server and to create the initial external bridge in one step. -# It is required in order to be able to use DaemonSet. - -if [ ! -e $ovs_bridge ] && [ ! -e $ovs_ext_intf ]; then -# NOTE: (sbezverk) This part is executed only by kubernetes deployment. -# Creating external bridge - /usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db --remote=punix:/var/run/openvswitch/db.sock --run="ovs-vsctl --no-wait --db=unix:/var/run/openvswitch/db.sock add-br $ovs_bridge" -# Plug the external interface into the external bridge. - /usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db --remote=punix:/var/run/openvswitch/db.sock --run="ovs-vsctl --no-wait --db=unix:/var/run/openvswitch/db.sock add-port $ovs_bridge $ovs_ext_intf" -# Run ovsdb server process - /usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --remote=ptcp:6640 --log-file=/var/log/kolla/openvswitch/ovsdb-server.log -else -# NOTE: (sbezverk) This part is executed only by kolla-ansible deployment. - /usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:{{ ovsdb_port }}:$ovsdb_ip --remote=db:Open_vSwitch,Open_vSwitch,manager_options --log-file=/var/log/kolla/openvswitch/ovsdb-server.log --pidfile -fi +/usr/sbin/ovsdb-server /var/lib/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --remote=ptcp:{{ ovsdb_port }}:$ovsdb_ip --remote=db:Open_vSwitch,Open_vSwitch,manager_options --log-file=/var/log/kolla/openvswitch/ovsdb-server.log --pidfile