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
This commit is contained in:
ricolin 2023-07-08 02:35:01 +08:00
parent 6b6ca9e26c
commit ee4d3ac71c
3 changed files with 8 additions and 1 deletions

View File

@ -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:

View File

@ -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}
}

View File

@ -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
...