This bug was fixed in the package ubuntu-advantage-tools - 31.2~20.04 --------------- ubuntu-advantage-tools (31.2~20.04) focal; urgency=medium
* Backport new upstream release (LP: #2048921) ubuntu-advantage-tools (31.2) noble; urgency=medium * properly rename logrotate conffile to avoid duplicate confiles, keep user changes and avoid unnecessary prompts (LP: #2055046) * use mv_conffile on all ubuntu-advantage-tools conffiles to avoid "obsolete" dpkg conffile statuses * fix regression in api u.pro.attach.auto.should_auto_attach.v1 so that it works with the new package names ubuntu-advantage-tools (31.1) noble; urgency=medium * fix unit test that failed on newer version of python ubuntu-advantage-tools (31) noble; urgency=medium * d/*: - rename ubuntu-advantage-tools to ubuntu-pro-client - rename ubuntu-advantage-pro to ubuntu-pro-image-auto-attach * d/apparmor: - introduce new ubuntu_pro_apt_news apparmor policy * d/control: - update descriptions and homepages - update ubuntu-pro-client-l10n to Depend on same binary version of ubuntu-pro-client * d/rules: - install ubuntu_pro_apt_news apparmor policy * d/ubuntu-pro-client.prerm: - removed dependency on python3 by reimplementing in sh (LP: #2021988) * apport: - collect logs related to ubuntu_pro_apt_news apparmor policy * release-upgrades.d/ubuntu-advantage-upgrades.cfg: - convert APT list files to deb822 files when upgrading to noble * systemd/apt-news.service: - add apparmor profile and capability restrictions * systemd/ubuntu-advantage.service: - avoid deadlock when started during cloud-config.service (LP: #2050022) * New upstream release 31 (LP: #2048921) - api: + u.pro.attach.auto.full_auto_attach.v1: new cloud_override param + u.pro.status.enabled_services.v1: * include services in "warning" state * include "usg" + u.pro.security.fix.*.plan.v1: export common objects from endpoint modules (GH: #2714) - cli: + add autocomplete for api subcommand + autocomplete multiple services for enable/disable subcommands + if lock is held, cli will retry over the course of a few seconds - collect-logs: + include logs related to ubuntu_pro_apt_news apparmor policy + include logs of apt-news.service + include logs of esm-cache.service - enable: + use deb822 apt source file format when on noble or later - fix: + avoid insinuating that CVEs were found on the machine (GH: #1522) + ignore LSNs when considering related USNs + pick CVE description based on what packages are installed - landscape: + don't disable landscape on ubuntu releases where it cannot be enabled (GH: #2743) + no longer assume landscape-client gets removed on disable (GH: #2840) + leave client.conf in place instead of renaming + require service to be running to consider "enabled" + new explanatory message when disabling - motd: properly pluralize messages about updates (GH: #1579) - status: show warning when canonical-livepatch command fails (LP: #2019997) - timer jobs: jobs-status.json is now world readable (GH: #2601) ubuntu-advantage-tools (30.1) noble; urgency=medium * fix UnboundLocalError in update-check error handling (LP: #2043836) -- Grant Orndorff <grant.orndo...@canonical.com> Thu, 29 Feb 2024 09:03:11 -0500 ** Changed in: ubuntu-advantage-tools (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/2050022 Title: Cannot run apt after installation if attached to Ubuntu Pro Status in subiquity: Invalid Status in ubuntu-advantage-tools package in Ubuntu: Fix Released Status in ubuntu-advantage-tools source package in Xenial: Fix Released Status in ubuntu-advantage-tools source package in Bionic: Fix Released Status in ubuntu-advantage-tools source package in Focal: Fix Released Status in ubuntu-advantage-tools source package in Jammy: Fix Released Status in ubuntu-advantage-tools source package in Mantic: Fix Released Bug description: [ ubuntu-advantage-tools SRU info ] [ Impact ] If ubuntu-advantage-tools (u-a-t) is not already installed, but cloud- init user-data includes "ubuntu_advantage" configuration data, then cloud-init will try to install u-a-t. On install, u-a-t needs to start ubuntu-advantage.service. ubuntu-advantage.service is ordered After=cloud-config.service. This results in deadlock, preventing apt from ever finishing. The apt lock is held forever and cloud-init never continues. The fix is to break the deadlock by removing the "After=cloud- config.service" ordering dependency from ubuntu-advantage.service. ubuntu-advantage.service should still wait until cloud-config.service is done activating to do any work though, so that waiting is now implemented in the python script that is executed by the service. [ Test Plan ] ``` # Launch a lxd container with ubuntu_advantage cloudinit user-data: lxc launch ubuntu-daily:bionic test --config "user.user-data=#cloud-config\nubuntu_advantage: {}" # Enter the container lxc shell test # Remove u-a-t apt remove ubuntu-advantage-tools # tell cloud init to clean and reboot cloud-init clean --logs --reboot # enter the container again lxc shell test # wait for cloud-init to finish cloud-init status --wait # if the bug is happening, that command will never finish ``` This test has been added as a regression test to u-a-t and will be run as part of the validation for LP: #2048921 (see: https://github.com/canonical/ubuntu-pro-client/blob/release-31/features/install_uninstall.feature#L116) [ Where problems could occur ] This does not remove the ordering dependency, but just changes how the ordering dependency between ubuntu-advantage.service and cloud- config.service is implemented. This difference in implementation could cause different unexpected ordering problems to occur in the future. The waiting function in python was designed such that it will eventually continue if cloud-config.service takes longer than 20 minutes. If cloud-config.service takes 20 minutes doing an Ubuntu Pro related operation (normal operations take less than 10 seconds at most), then ubuntu-advantage.service could continue and potentially error when it tries to do something in conflict with the ongoing operation. Alternatively, if the wait was implemented incorrectly, then ubuntu-advantage.service could stall forever unnecessarily if cloud-config.service doesn't finish. [Original Description] During install of Ubuntu Server 22.04.3 you are asked if you want to attach to Ubuntu Pro. If you do then following a reboot you cannot run apt. cloud-init runs and installs ubuntu-advantage-tools which for some reason never releases the lock file. $ sudo apt dist-upgrade Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 994 (apt-get) If you reboot at this point then you receive: $ sudo apt dist-upgrade E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: ubuntu-advantage-tools 30~22.04 ProcVersionSignature: Ubuntu 6.5.0-14.14~22.04.1-generic 6.5.3 Uname: Linux 6.5.0-14-generic x86_64 ApportVersion: 2.20.11-0ubuntu82.5 Architecture: amd64 CasperMD5CheckResult: pass CloudArchitecture: x86_64 CloudID: none CloudName: none CloudPlatform: none CloudSubPlatform: config Date: Sun Jan 21 23:11:59 2024 InstallationDate: Installed on 2024-01-21 (0 days ago) InstallationMedia: Ubuntu-Server 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230810) ProcEnviron: TERM=xterm-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=C.UTF-8 SHELL=/bin/bash SourcePackage: ubuntu-advantage-tools UpgradeStatus: No upgrade log present (probably fresh install) cloud-id.txt: none livepatch-status.txt-error: Invalid command specified '/snap/bin/canonical-livepatch status'. pro-journal.txt: -- No entries -- uaclient.conf: contract_url: https://contracts.canonical.com log_level: debug To manage notifications about this bug go to: https://bugs.launchpad.net/subiquity/+bug/2050022/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp