Merge pull request #2569 from vexxhost/clean-ovs-pid

fix(ovs): Remove stale PID file at OVS startup

fixes #2554

Reviewed-by: Mohammed Naser <mnaser@vexxhost.com>
This commit is contained in:
atmosphere-ci[bot] authored and GitHub committed 2025-05-06 20:00:31 +00:00
commit d9cebf3c9b
3 files changed
+26

No files matched your search

@@ -114,6 +114,11 @@ function start () {
fi
{{- end }}
# Remove the pid file if it exists
if [ -f $OVS_PID ]; then
rm -f $OVS_PID
fi
exec /usr/sbin/ovs-vswitchd unix:${OVS_SOCKET} \
-vconsole:emer \
-vconsole:err \
@@ -0,0 +1,16 @@
diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
index c1419b66..23ee37c0 100644
--- a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
+++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
@@ -114,6 +114,11 @@ function start () {
fi
{{- end }}
+ # Remove the pid file if it exists
+ if [ -f $OVS_PID ]; then
+ rm -f $OVS_PID
+ fi
+
exec /usr/sbin/ovs-vswitchd unix:${OVS_SOCKET} \
-vconsole:emer \
-vconsole:err \
@@ -0,0 +1,5 @@
---
fixes:
- |
Ensure the Open vSwitch (OVS) process ID (PID) file is deleted at startup to prevent
issues caused by stale PID files, which may hinder OVS initialization.