PackageReporter kicks in during do-release-upgrade

Bug #1699179 reported by Dariusz Gadomski
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Undecided
Unassigned
landscape-client (Ubuntu)
Fix Released
Medium
Andreas Hasenack
Trusty
Fix Released
Medium
Simon Poirier
Xenial
Fix Released
Medium
Simon Poirier
Artful
Won't Fix
Medium
Unassigned
Bionic
Fix Released
Medium
Andreas Hasenack

Bug Description

[Impact]

 * This issue affects users of the release-upgrade feature of landscape.

 * Landscape package monitor would previously race during an upgrade
   and possibly grab apt locks, thus making the upgrade fail.

 * The fix adds checks during package operations to make sure a
   release upgrade is not in progresss.

[Test Case]

 * in /etc/landscape/client.conf , set "apt_update_interval=1800" and
   "log_level=debug" and restart the client.

 * Launch a release upgrade from landscape-server. Look for messages
   in the package-monitor logs stating "conditions not met"

[Regression Potential]

 * Unlikely, as this has already been released to newer ubuntu releases
   and is fairly well tested.

 * Any issue with related changes would likely only affect the client
   getting new package info, but won't affect other functionality.

[Original description]

Affected release: Ubuntu 14.04.5
Version of package: 14.12-0ubuntu5.14.04

Steps to reproduce:
1. Run do-release-upgrade to upgrade to 16.04.2.
2. Trigger the package-reporter to kick in while do-release-upgrade is working but not having the package database locked.
3. Package database is locked by package-reporter, do-release-upgrade fails to access it and exits.

Expected result:
Landscape detects that there's an release upgrade in progress and will wait for it to finish.

Actual result:
PackageReporter locks the apt database, do-release-upgrade cannot access it, exits with an error and may leave the system in an unusable state.

* Link to Dariusz's PR on GitHub:
https://github.com/CanonicalLtd/landscape-client/pull/14

Related branches

summary: - package-reporter kicks in during do-release-upgrade
+ PackageReporter kicks in during do-release-upgrade
description: updated
Changed in landscape-client (Ubuntu):
assignee: nobody → Dariusz Gadomski (dgadomski)
Revision history for this message
Dominique Poulain (dominique-poulain) wrote :
Eric Desrochers (slashd)
tags: added: sts sts-sru-needed
Eric Desrochers (slashd)
description: updated
Changed in landscape-client (Ubuntu Artful):
assignee: Dariusz Gadomski (dgadomski) → nobody
Eric Desrochers (slashd)
tags: added: sts-sponsor-slashd
Eric Desrochers (slashd)
tags: removed: sts-sponsor-slashd
Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

Added debdiff proposal for bionic.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "landscape-client_16.03-0ubuntu4.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Can the attached debdiff be updated to match what actually landed in landscape-client trunk according to https://github.com/CanonicalLtd/landscape-client/commit/c926cfaf3ad1a8759f0b269540391bbfc20dc00a ?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I have a branch with the updated diff, thanks @simpoir.

While building, I noticed that the unit tests have several failures in releases >= zesty (not introduced by this fix). I would like to see these passing before our next upload: https://bugs.launchpad.net/landscape-client/+bug/1736576

Changed in landscape-client:
status: New → Fix Committed
milestone: none → 18.01
Eric Desrochers (slashd)
no longer affects: landscape-client (Ubuntu Zesty)
Changed in landscape-client (Ubuntu Bionic):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote :

The bug description is mostly ready for the SRU process but is missing a statement regarding the regression potential of the fix.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package landscape-client - 18.01-0ubuntu1

---------------
landscape-client (18.01-0ubuntu1) bionic; urgency=medium

  * New upstream release 18.01:
    - Ported to python3 (LP: #1577850)
    - move Replaces/Breaks landscape-client-ui rules to landscape-common
      (LP: #1560424)
    - Add a libpam-systemd Depends if built for xenial (LP: #1590838)
    - Some units not reporting swift usage (LP: #1588404)
    - Fix missing install directories for landscape-common and drop
      usr/share/landscape as its only used and created by landscape-client.
      (LP: #1680842)
    - Fix VM detection for Xen, by returning "xen" only for paravirtualized and
      HVM hosts, not for dom0. (LP: #1601818)
    - Add an indication of truncation to process output that has been truncated
      prior to delivery to the server. (LP: #1629000)
    - add /snap/bin to the PATH when executing scripts. (LP: #1635634)
    - Save the original sources.list file when a repository profile is
      associated with a computer and restore it when the profile is removed.
      (LP: #1607529)
    - Drop the legacy HAService plugin, which is no longer used.
    - Avoid double-decoding package descriptions in build_skeleton_apt, which
      causes an error with Xenial python-apt. (LP: #1655395)
    - Remove dead dbus code and textmessage (confirmed not supported in server
      for ~2 years). (LP: #1657372)
    - Move bzr-builddeb conf file from deprecated location to debian/
      (LP: #1658796)
    - Support for new server error message about there being too many pending
      computers already (LP: #1662530)
    - Add a timestamp to the package reporter result (LP: #1674252)
    - Check if ubuntu-release-upgrader is running before apt-update (LP: #1699179)
    - Implicitly trust file-local sources managed by landscape. On upgrades,
      add the trusted flag to the landscape file-local apt source file if it's
      not there. (LP: #1736576)
    - Use local system tools to change the user's password (LP: #1743558)
  * clean up packaging and getting in sync with the new landscape version:
    - d/rules: drop extra:suggests which is unused since 13.07.1-0ubuntu2
    - Remove antique postinst code. No supported landscape-client version
      installs cronjobs anymore (since a long time).
    - d/landscape-client.docs: the README file is now a markdown file, so
      install that instead.
    - d/landscape-common.postinst: no need to single out
      /var/lib/landscape/.gnupg when fixing ownerships, just do it over
      the entire parent directory.
    - guard user and group removal via an empty .cleanup.* file in post, so we
      only remove the user/group if we were the ones who created them at
      install time.
    - lintian: remove absolute path from update-motd calls in maintainer
      scripts
    - d/rules: drop special handling for dapper, hardy and lucid, which are no
      longer supported.
    - d/rules: make sure we have an "extra:Depends=" in substvars even if it's
      empty
    - d/rules: drop dh_pycentral handling, it's obsolete
  * Dropped (already included in this version):
    - d/p/set-vm-info-to-kvm-for-aws-C5-instances.patch:
  ...

Read more...

Changed in landscape-client (Ubuntu Bionic):
status: In Progress → Fix Released
Changed in landscape-client:
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in landscape-client (Ubuntu Trusty):
importance: Undecided → Medium
Changed in landscape-client (Ubuntu Xenial):
importance: Undecided → Medium
Changed in landscape-client (Ubuntu Artful):
importance: Undecided → Medium
Changed in landscape-client (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Unsubscribing sponsors because there's nothing to sponsor.

David Britton (dpb)
Changed in landscape-client (Ubuntu Artful):
status: New → Won't Fix
Simon Poirier (simpoir)
description: updated
Changed in landscape-client (Ubuntu Cosmic):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Simon Poirier (simpoir)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

cosmic is not affected, since back then it got the package from bionic while cosmic was the development series. I'm therefore dropping the cosmic task.

no longer affects: landscape-client (Ubuntu Cosmic)
Changed in landscape-client (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Simon Poirier (simpoir)
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of landscape-client to xenial-proposed has been rejected from the upload queue for the following reason: "Includes a change without an SRU bug attached to it".

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

An upload of landscape-client to trusty-proposed has been rejected from the upload queue for the following reason: "Includes a change without an SRU bug attached to it".

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Dariusz, or anyone else affected,

Accepted landscape-client into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/16.03-0ubuntu2.16.04.5 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 and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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 landscape-client (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Dariusz, or anyone else affected,

Accepted landscape-client into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/14.12-0ubuntu6.14.04.4 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 and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. 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 landscape-client (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed-trusty
Simon Poirier (simpoir)
tags: added: verification-done-xenial
removed: verification-needed-xenial
Simon Poirier (simpoir)
tags: added: verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Simon Poirier (simpoir) wrote :

I tested xenial-proposed and trusty-proposed by setting a short apt interval, like in the testing instructions, launching do-release-upgrade

sudo sed -i -e 's/info/debug/' -e '2iapt_update_interval=300' /etc/landscape/client.conf
sudo service landscape-client restart

The expected log entries were then found:
multipass@tcli:~$ sudo tail -f /var/log/landscape/package-reporter.log
2019-02-05 17:17:11,846 DEBUG [MainThread] Started firing run.
2019-02-05 17:17:11,847 DEBUG [MainThread] Finished firing run.
2019-02-05 17:17:12,811 DEBUG [MainThread] Checking if ubuntu-release-upgrader is running.
2019-02-05 17:17:12,816 INFO [MainThread] Found ubuntu-release-upgrader running (pid: 1814)
2019-02-05 17:17:12,816 DEBUG [MainThread] '/usr/lib/landscape/apt-update' didn't run, conditions not met

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 16.03-0ubuntu2.16.04.5

---------------
landscape-client (16.03-0ubuntu2.16.04.5) xenial; urgency=medium

  * debian/patches/nutanix-kvm.patch: Update vm_info.py to include Nutanix
    hypervisor (LP: #1788219)
  * Fixes for release-upgrade (LP: #1699179).
    - debian/patches/1699179-release-upgrade-check.diff: Check if ubuntu-
      release-upgrader is running before apt-update. (LP: #1699179)
    - debian/patches/release-upgrade-success.patch: Enable landscape-client to
      survive trusty upgrade. (LP: #1670291)
    - debian/patches/post-upgrade-reboot.patch: Force reboot operation in
      case systemd fails. (LP: #1670291)
  * debian/patches/1616116-resync-loop.patch:
    Clear hash id database on package resync. (LP: #1616116)

 -- Simon Poirier <email address hidden> Tue, 27 Nov 2018 09:24:22 -0500

Changed in landscape-client (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for landscape-client has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 14.12-0ubuntu6.14.04.4

---------------
landscape-client (14.12-0ubuntu6.14.04.4) trusty; urgency=medium

  * debian/patches/nutanix-kvm.patch: Update vm_info.py to include Nutanix
    hypervisor. (LP: #1788219)
  * Fixes for release-upgrade (LP: #1699179).
    - debian/patches/1699179-release-upgrade-check.diff: Check if ubuntu-
      release-upgrader is running before apt-update. (LP: #1699179)
    - debian/patches/release-upgrade-success.patch: Enable landscape-client to
      survive trusty upgrade. (LP: #1670291)
    - debian/patches/post-upgrade-reboot.patch: Force reboot operation in
      case systemd fails. (LP: #1670291)
  * debian/patches/1616116-resync-loop.patch:
    Clear hash id database on package resync. (LP: #1616116)

 -- Simon Poirier <email address hidden> Tue, 27 Nov 2018 09:24:22 -0500

Changed in landscape-client (Ubuntu Trusty):
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.