From ee4d3ac71ce9fca76eceacfd569e44f019064c1e Mon Sep 17 00:00:00 2001 From: ricolin Date: Sat, 8 Jul 2023 02:35:01 +0800 Subject: [PATCH] Make sure ovs ctl file exist before chown This propose to make sure the exist of `/run/openvswitch/ovs-vswitchd.${PID}.ctl` before we do chown command with it. Change-Id: Icdcfa5684c2a5e610805f6dec9391a4947b213d4 --- openvswitch/Chart.yaml | 2 +- openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl | 6 ++++++ releasenotes/notes/openvswitch.yaml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/openvswitch/Chart.yaml b/openvswitch/Chart.yaml index 107dc2f87..b828e221b 100644 --- a/openvswitch/Chart.yaml +++ b/openvswitch/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm OpenVSwitch name: openvswitch -version: 0.1.14 +version: 0.1.15 home: http://openvswitch.org icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png sources: diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl index 93aaa60c9..f85d0c7cb 100644 --- a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl +++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl @@ -116,6 +116,12 @@ function poststart () { done PID=$(cat $OVS_PID) OVS_CTL=/run/openvswitch/ovs-vswitchd.${PID}.ctl + + until [ -S $OVS_CTL ] + do + echo "Waiting for file $OVS_CTL" + sleep 1 + done chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} ${OVS_CTL} } diff --git a/releasenotes/notes/openvswitch.yaml b/releasenotes/notes/openvswitch.yaml index bc5d7d4bc..e6a67d3cd 100644 --- a/releasenotes/notes/openvswitch.yaml +++ b/releasenotes/notes/openvswitch.yaml @@ -15,4 +15,5 @@ openvswitch: - 0.1.12 Replace node-role.kubernetes.io/master with control-plane - 0.1.13 Upgrade openvswitch image to latest-ubuntu_focal to fix qos issue - 0.1.14 Add buffer before accesses pid file + - 0.1.15 Add buffer before accesses ovs controller pid socket ...