Add buffer to wait for ovs pid file

This fixes for cases file not yet generated from start(), but already
required on poststart() in openvswitch-vswitchd.sh.

Add wait condition until file exists.

Change-Id: Iae041046fd6e7e7f991b4cd1aa101c97bcaa150c
This commit is contained in:
ricolin 2023-06-29 01:05:29 +08:00
parent 3d8935a536
commit e9a8166725
3 changed files with 7 additions and 3 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm OpenVSwitch
name: openvswitch
version: 0.1.13
version: 0.1.14
home: http://openvswitch.org
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -109,7 +109,11 @@ function stop () {
function poststart () {
# This enables the usage of 'ovs-appctl' from neutron-ovs-agent pod.
until [ -f $OVS_PID ]
do
echo "Waiting for file $OVS_PID"
sleep 1
done
PID=$(cat $OVS_PID)
OVS_CTL=/run/openvswitch/ovs-vswitchd.${PID}.ctl
chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} ${OVS_CTL}

View File

@ -14,5 +14,5 @@ openvswitch:
- 0.1.11 Add ovn.yaml in values_override, Enable ptcp_port 6640 which needed when use ovn
- 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
...