openvswitch-switch package upgrades restart daemons multiple times

Bug #1823295 reported by James Page
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
Fix Released
High
James Page
Bionic
Fix Released
High
James Page
Cosmic
Won't Fix
High
Unassigned
Disco
Fix Released
High
James Page

Bug Description

[Impact]
OVS daemons are restarted multiple times on package upgrade resulting in a protracted period of network pause for OVS management network objects due to multiple restarts.

[Test Case]
Upgrade openvswitch-switch package/dpkg-reconfigure openvswitch-swithc
Examine systemd journal - ovsdb-server and ovs-vswitchd get restarted multiple times in quick session

[Regression Potential]
Low - Ubuntu has had this fix in packaging since Disco with no reported adverse effects.

[Original Bug Report]
When the openvswitch-switch package is upgraded, the various daemons get restarted multiple times (see maintainer script below):

# Automatically added by dh_systemd_start/12ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    if [ -d /run/systemd/system ]; then
        systemctl --system daemon-reload >/dev/null || true
        if [ -n "$2" ]; then
            _dh_action=restart
        else
            _dh_action=start
        fi
        deb-systemd-invoke $_dh_action 'ovs-vswitchd.service' 'ovsdb-server.service' >/dev/null || true
    fi
fi
# End automatically added section
# Automatically added by dh_systemd_start/12ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    if [ -d /run/systemd/system ]; then
        systemctl --system daemon-reload >/dev/null || true
        if [ -n "$2" ]; then
            deb-systemd-invoke try-restart 'ovs-vswitchd.service' 'ovsdb-server.service' >/dev/null || true
        fi
    fi
fi
# End automatically added section
# Automatically added by dh_systemd_start/12ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    if [ -d /run/systemd/system ]; then
        systemctl --system daemon-reload >/dev/null || true
        if [ -n "$2" ]; then
            deb-systemd-invoke try-restart 'ovs-vswitchd.service' 'ovsdb-server.service' >/dev/null || true
        fi
    fi
fi
# End automatically added section
# Automatically added by dh_installinit/12ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    if [ -x "/etc/init.d/openvswitch-switch" ]; then
        update-rc.d openvswitch-switch defaults >/dev/null
        if [ -n "$2" ]; then
            _dh_action=restart
        else
            _dh_action=start
        fi
        invoke-rc.d openvswitch-switch $_dh_action || exit 1
    fi
fi
# End automatically added section

This results in a extended period of network loss for OVS ports - really the only one that is required is the restart of openvswitch-switch (which covers the other two as depends anyway).

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: openvswitch-switch 2.11.0-0ubuntu1
ProcVersionSignature: Ubuntu 5.0.0-8.9-generic 5.0.1
Uname: Linux 5.0.0-8-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.10-0ubuntu25
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 5 08:24:32 2019
InstallationDate: Installed on 2018-10-18 (168 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: openvswitch
UpgradeStatus: Upgraded to disco on 2019-03-17 (18 days ago)

CVE References

Revision history for this message
James Page (james-page) wrote :
Changed in openvswitch (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → James Page (james-page)
James Page (james-page)
Changed in openvswitch (Ubuntu Bionic):
status: New → Confirmed
Changed in openvswitch (Ubuntu Cosmic):
status: New → Confirmed
Changed in openvswitch (Ubuntu Bionic):
importance: Undecided → High
Changed in openvswitch (Ubuntu Cosmic):
importance: Undecided → High
Changed in openvswitch (Ubuntu Disco):
status: Triaged → In Progress
Changed in openvswitch (Ubuntu Bionic):
status: Confirmed → Triaged
Changed in openvswitch (Ubuntu Cosmic):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openvswitch - 2.11.0-0ubuntu2

---------------
openvswitch (2.11.0-0ubuntu2) disco; urgency=medium

  * d/rules: Skip execution of dh_systemd_start for openvswitch-switch
    subunits avoiding multiple restarts during package configuration
    (LP: #1823295).

 -- James Page <email address hidden> Fri, 05 Apr 2019 17:07:11 +0100

Changed in openvswitch (Ubuntu Disco):
status: In Progress → Fix Released
James Page (james-page)
Changed in openvswitch (Ubuntu Cosmic):
status: Triaged → Won't Fix
Revision history for this message
James Page (james-page) wrote :

I've committed this fix to the git repo for OVN for bionic, however there is no point in uploading it without another fix or point release as its related to package upgrade.

Changed in openvswitch (Ubuntu Bionic):
assignee: nobody → James Page (james-page)
description: updated
Revision history for this message
James Page (james-page) wrote :

2.9.6 was released several months ago - will pick that up for SRU with this change.

Changed in openvswitch (Ubuntu Bionic):
status: Triaged → In Progress
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Dropping field-high designation as this is pending another SRU. No point in releasing this until a functional change against the openvswitch package for bionic is needed.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This is currently in the unapproved queue for bionic and paired with a few other SRUs.
https://launchpad.net/ubuntu/bionic/+queue?queue_state=1&queue_text=openvswitch

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted openvswitch into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openvswitch/2.9.7-0ubuntu0.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openvswitch (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (openvswitch/2.9.7-0ubuntu0.18.04.1)

All autopkgtests for the newly accepted openvswitch (2.9.7-0ubuntu0.18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

mininet/2.2.2-2ubuntu1 (i386)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#openvswitch

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I believe the autopkgtest failure is now resolved.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Verified successfully on bionic-proposed.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openvswitch - 2.9.7-0ubuntu0.18.04.2

---------------
openvswitch (2.9.7-0ubuntu0.18.04.2) bionic-security; urgency=medium

  * SECURITY UPDATE: buffer overflow decoding malformed packets in lldp
    - debian/patches/CVE-2015-8011.patch: check lengths in lib/lldp/lldp.c.
    - CVE-2015-8011
  * SECURITY UPDATE: Externally triggered memory leak in lldp
    - debian/patches/CVE-2020-27827.patch: properly free memory in
      lib/lldp/lldp.c.
    - CVE-2020-27827

 -- Marc Deslauriers <email address hidden> Fri, 08 Jan 2021 07:30:25 -0500

Changed in openvswitch (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.