Cannot run apt after installation if attached to Ubuntu Pro
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Invalid
|
Undecided
|
Unassigned | ||
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ ubuntu-
[ Impact ]
If ubuntu-
The fix is to break the deadlock by removing the "After=
[ Test Plan ]
```
# Launch a lxd container with ubuntu_advantage cloudinit user-data:
lxc launch ubuntu-daily:bionic test --config "user.user-
# Enter the container
lxc shell test
# Remove u-a-t
apt remove ubuntu-
# 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:/
[ Where problems could occur ]
This does not remove the ordering dependency, but just changes how the ordering dependency between ubuntu-
The waiting function in python was designed such that it will eventually continue if cloud-config.
[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-
$ sudo apt dist-upgrade
Waiting for cache lock: Could not get lock /var/lib/
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-
ProcVersionSign
Uname: Linux 6.5.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
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-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-id.txt: none
livepatch-
pro-journal.txt: -- No entries --
uaclient.conf:
contract_url: https:/
log_level: debug
Changed in subiquity: | |
status: | New → Confirmed |
tags: | removed: need-amd64-retrace |
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | Triaged → In Progress |
description: | updated |
Changed in subiquity: | |
status: | Confirmed → Invalid |
Hi Ken,
Thanks for reporting this. When looking at the ubuntu- advantage- tools logs, I couldn't spot any issue that could have caused that.
This might be an APT related problem. However, I am adding subiquity to this issue, since they are the ones that own the installer. They can assess the status of this issue and what we can do about it