From 6c9b4df6fe6bf514b213442e48c10ad483a6e6f6 Mon Sep 17 00:00:00 2001 From: Hyunsun Moon Date: Wed, 4 Apr 2018 16:46:08 +0900 Subject: [PATCH] openvswitch: allow setting ovsdb connection using vsctl Also changed neutron agents to use default, ptcp:6640:127.0.0.1. Change-Id: Id43c376851f0c408da4684c219dc79ef4a1c157b Closes-Bug: 1761117 --- neutron/templates/daemonset-dhcp-agent.yaml | 7 ------- neutron/templates/daemonset-l3-agent.yaml | 7 ------- neutron/templates/daemonset-metadata-agent.yaml | 7 ------- neutron/values.yaml | 1 - openvswitch/templates/bin/_openvswitch-db-server.sh.tpl | 8 ++++++-- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml index 5cba9f0e1a..468ec0b794 100644 --- a/neutron/templates/daemonset-dhcp-agent.yaml +++ b/neutron/templates/daemonset-dhcp-agent.yaml @@ -75,8 +75,6 @@ spec: mountPath: /etc/neutron/plugins/ml2/openvswitch_agent.ini subPath: openvswitch_agent.ini readOnly: true - - name: runopenvswitch - mountPath: /run/openvswitch {{- end }} - name: neutron-etc mountPath: /etc/neutron/dhcp_agent.ini @@ -128,11 +126,6 @@ spec: configMap: name: {{ $configMapName }} defaultMode: 0444 - {{- if ( has "openvswitch" .Values.network.backend ) }} - - name: runopenvswitch - hostPath: - path: /run/openvswitch - {{- end }} - name: socket hostPath: path: /var/lib/neutron/openstack-helm diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml index e05e0be550..935735f46a 100644 --- a/neutron/templates/daemonset-l3-agent.yaml +++ b/neutron/templates/daemonset-l3-agent.yaml @@ -75,8 +75,6 @@ spec: mountPath: /etc/neutron/plugins/ml2/openvswitch_agent.ini subPath: openvswitch_agent.ini readOnly: true - - name: runopenvswitch - mountPath: /run/openvswitch {{- end }} - name: neutron-etc mountPath: /etc/neutron/l3_agent.ini @@ -127,11 +125,6 @@ spec: configMap: name: {{ $configMapName }} defaultMode: 0444 - {{- if ( has "openvswitch" .Values.network.backend ) }} - - name: runopenvswitch - hostPath: - path: /run/openvswitch - {{- end }} - name: libmodules hostPath: path: /lib/modules diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml index 1dc92a2d54..c893448e6e 100644 --- a/neutron/templates/daemonset-metadata-agent.yaml +++ b/neutron/templates/daemonset-metadata-agent.yaml @@ -97,8 +97,6 @@ spec: mountPath: /etc/neutron/plugins/ml2/openvswitch_agent.ini subPath: openvswitch_agent.ini readOnly: true - - name: runopenvswitch - mountPath: /run/openvswitch {{- end }} - name: neutron-etc mountPath: /etc/neutron/metadata_agent.ini @@ -142,11 +140,6 @@ spec: configMap: name: {{ $configMapName }} defaultMode: 0444 - {{- if ( has "openvswitch" .Values.network.backend ) }} - - name: runopenvswitch - hostPath: - path: /run/openvswitch - {{- end }} - name: socket hostPath: path: /var/lib/neutron/openstack-helm diff --git a/neutron/values.yaml b/neutron/values.yaml index 61d8238771..7d124afa4f 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -1412,7 +1412,6 @@ conf: arp_responder: True ovs: bridge_mappings: "external:br-ex" - ovsdb_connection: unix:/var/run/openvswitch/db.sock securitygroup: firewall_driver: openvswitch linuxbridge_agent: diff --git a/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl b/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl index cec29ec45b..b19bb0a72b 100644 --- a/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl +++ b/openvswitch/templates/bin/_openvswitch-db-server.sh.tpl @@ -20,9 +20,9 @@ set -ex COMMAND="${@:-start}" OVS_DB=/run/openvswitch/conf.db -OVS_SOCKET=/run/openvswitch/db.sock OVS_SCHEMA=/usr/share/openvswitch/vswitch.ovsschema OVS_PID=/run/openvswitch/ovsdb-server.pid +OVS_SOCKET=/run/openvswitch/db.sock function start () { mkdir -p "$(dirname ${OVS_DB})" @@ -40,7 +40,11 @@ function start () { -vconsole:err \ -vconsole:info \ --pidfile=${OVS_PID} \ - --remote=punix:${OVS_SOCKET} + --remote=punix:${OVS_SOCKET} \ + --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ + --private-key=db:Open_vSwitch,SSL,private_key \ + --certificate=db:Open_vSwitch,SSL,certificate \ + --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert } function stop () {