From 8f0af90c102e54521ba67eca9d202eef0c28fe31 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Tue, 18 Oct 2022 12:59:48 -0400 Subject: [PATCH] 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 Change-Id: I38d18dfa47f834d2d5f97703e4f343882cd1c03e --- .../fix-openvswitch-vtep-race.patch | 31 +++++++++++++++++++ .../openvswitch/debian/deb_patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 networking/openvswitch/debian/deb_patches/fix-openvswitch-vtep-race.patch create mode 100644 networking/openvswitch/debian/deb_patches/series diff --git a/networking/openvswitch/debian/deb_patches/fix-openvswitch-vtep-race.patch b/networking/openvswitch/debian/deb_patches/fix-openvswitch-vtep-race.patch new file mode 100644 index 000000000..18ad124de --- /dev/null +++ b/networking/openvswitch/debian/deb_patches/fix-openvswitch-vtep-race.patch @@ -0,0 +1,31 @@ +From 32c9dd776dc75b3ddfe30311adc2657d5ae2901f Mon Sep 17 00:00:00 2001 +From: Charles Short +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 +--- + 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 + diff --git a/networking/openvswitch/debian/deb_patches/series b/networking/openvswitch/debian/deb_patches/series new file mode 100644 index 000000000..1b2d57261 --- /dev/null +++ b/networking/openvswitch/debian/deb_patches/series @@ -0,0 +1 @@ +fix-openvswitch-vtep-race.patch