debian: Fix openvswitch-vtep shutdown

Check for ENABLE_OVS_VTEP before shutting down
the vtep service. Otherwise the systemd will not
shut down properly resulting in systemd killing
the process after 90 seconds during shutdown.

Test Plan

PASS Build openvswitch package
PASS Build ISO Image
PASS Boot ISO image
PASS Shutdown instance 'shutdown -r now'
PASS Check to see the openvswitch-vtep service
     does not wait forever to shutdown.

Story: 2009965
Task: 46602

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I38d18dfa47f834d2d5f97703e4f343882cd1c03e
This commit is contained in:
Charles Short 2022-10-18 12:59:48 -04:00
parent bced15251c
commit 8f0af90c10
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 32c9dd776dc75b3ddfe30311adc2657d5ae2901f Mon Sep 17 00:00:00 2001
From: Charles Short <charles.short@windriver.com>
Date: Tue, 18 Oct 2022 10:51:41 -0400
Subject: [PATCH 3/3] fix openvswitch-vtep race
Don't try to stop openvswitch-switch if openvswitch-vtep is
disabled in the /etc/default/openvswitch-vtep. Otherwise systemd
timesout when the system is shutting down.
Signed-off-by: Charles Short <charles.short@windriver.com>
---
debian/openvswitch-vtep.init | 3 +++
1 file changed, 3 insertions(+)
diff --git a/debian/openvswitch-vtep.init b/debian/openvswitch-vtep.init
index 6200029dc..5bdea18e6 100644
--- a/debian/openvswitch-vtep.init
+++ b/debian/openvswitch-vtep.init
@@ -56,6 +56,9 @@ start () {
}
stop () {
+ if [ "$ENABLE_OVS_VTEP" = "false" ]; then
+ exit 0
+ fi
/etc/init.d/openvswitch-switch stop
}
--
2.25.1

View File

@ -0,0 +1 @@
fix-openvswitch-vtep-race.patch