Package: openvswitch-switch
Version: 2.10.0+2018.08.28+git.8ca7c82b7d+ds1-12+deb10u2
Severity: important
Tags: patch

Dear Maintainer,

After upgrading from stretch to buster we noticed that our
previously-working openvswitch configurations would get stuck when
bringing up interfaces.

We discovered that attempting to manipulate an interface would cause an
inappropriate ifup command to be run and deadlock (since the child
process would wait for an interface state lock):

12938  \_ /bin/bash
13262      \_ sudo ifdown ovs1
13263          \_ ifdown ovs1
13293              \_ /bin/sh -c /bin/run-parts /etc/network/if-post-down.d
13294                  \_ /bin/run-parts /etc/network/if-post-down.d
13297                      \_ /bin/sh /etc/network/if-post-down.d/openvswitch
13318                          \_ /bin/sh /etc/init.d/openvswitch-switch start
13365                              \_ ifup --allow=ovs ovs1 ovs2

We tracked down the problem to the /usr/share/openvswitch/scripts/ifupdown.sh
script, specifically:


if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
    if ! systemctl --quiet is-active openvswitch-nonetwork.service; then
        systemctl start openvswitch-nonetwork.service
    fi
else
    if service openvswitch-switch status > /dev/null 2>&1; then
        service openvswitch-switch start
    fi
fi

the corresponding logic in the stretch package has the correct logic for the
"service openvswitch-switch start" line:

if /etc/init.d/openvswitch-switch status > /dev/null 2>&1; then :; else
    /etc/init.d/openvswitch-switch start
fi

With this change, everything functions correctly:

--- /usr/share/openvswitch/scripts/ifupdown.sh.orig     2020-06-30 
17:51:41.033873946 +0000
+++ /usr/share/openvswitch/scripts/ifupdown.sh  2020-06-30 17:52:43.581180302 
+0000
@@ -35,7 +35,7 @@
         systemctl start openvswitch-nonetwork.service
     fi
 else
-    if service openvswitch-switch status > /dev/null 2>&1; then
+    if ! service openvswitch-switch status > /dev/null 2>&1; then
         service openvswitch-switch start
     fi
 fi


-- System Information:
Debian Release: 10.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-9-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages openvswitch-switch depends on:
ii  kmod                26-1
ii  lsb-base            10.2019051400
ii  netbase             5.6
ii  openvswitch-common  2.10.0+2018.08.28+git.8ca7c82b7d+ds1-12+deb10u2
ii  procps              2:3.3.15-2
ii  python              2.7.16-1
ii  uuid-runtime        2.33.1-0.1

openvswitch-switch recommends no packages.

openvswitch-switch suggests no packages.

-- no debconf information

Reply via email to