missing version dependency on distro-info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Medium
|
Grant Orndorff | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
If a user on xenial or on bionic has an old version of distro-info and then upgraded ubuntu-
The fix is to specify the required versions of distro-info that ubuntu-
Backporting this fix is necessary to ensure xenial and bionic users who happen to have an older version of distro-info are able to enable ubuntu-advantage services without first finding this bug, then manually upgrading distro-info.
[Test Plan]
This should be tested on both xenial and bionic. These test steps assume that the proposed version of ua to release is available in ppa:ua-
First reproduce the issue.
In a xenial container:
```
sudo apt install distro-
sudo apt install ubuntu-
sudo python3 /usr/lib/
# expect a traceback
sudo ua attach YOUR_TOKEN
# expect error messages
sudo ua detach
# expect error messages
```
In a bionic container:
```
sudo apt install distro-info=0.18 distro-
sudo apt install ubuntu-
sudo python3 /usr/lib/
# expect a traceback
sudo ua attach YOUR_TOKEN
# expect error messages
sudo ua detach
# expect error messages
```
To see the fix in action, on both xenial and bionic:
```
sudo add-apt-repository ppa:ua-
sudo apt-get update
sudo apt install ubuntu-
sudo python3 /usr/lib/
# there should be no traceback or error
sudo ua attach YOUR_TOKEN
# expect success and no error messages
sudo ua detach
# expect success and no error messages
```
[Where problems could occur]
In order to require the correct versions for both xenial and bionic and later releases, the Depends line is somewhat complex. The same line is required under Build-Depends as well. So if there is a mistake, such as if the version constraints incorrectly include a version they shouldn't, then this could cause errors during build as well as during install.
[Other Info]
The complexity in the depends line is because of the following versions of distro-info. This list includes which release they are one and which ones will work as our dependency:
- xenial: 0.14build1 doesn't work
- xenial: 0.14ubuntu0.2 works
- bionic: 0.18 doesn't work
- bionic: 0.18ubuntu0.18.04.1 works
focal and later have higher version numbers than 0.18
So to grab the correct version across all versions, we need to set a minumum version of 0.18ubuntu0.18.04.1 OR get exactly 0.14ubuntu0.2, but nothing in between.
[Original Description]
27.0~16.04.1 on Xenial. ubuntu-
Resulted in this:
Jun 15 13:34:46 MAAS systemd[1]: Starting Ubuntu Advantage APT and MOTD Messages...
Jun 15 13:34:46 MAAS python3[15434]: Traceback (most recent call last):
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/
Jun 15 13:34:46 MAAS python3[15434]: update_
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/
Jun 15 13:34:46 MAAS python3[15434]: if not util.is_
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/
Jun 15 13:34:46 MAAS python3[15434]: out, _err = subp(["
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/
Jun 15 13:34:46 MAAS python3[15434]: out, err = _subp(args, rcs, capture, timeout, env=env)
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/
Jun 15 13:34:46 MAAS python3[15434]: stderr=
Jun 15 13:34:46 MAAS python3[15434]: uaclient.
Jun 15 13:34:46 MAAS systemd[1]: ua-messaging.
Jun 15 13:34:46 MAAS systemd[1]: Failed to start Ubuntu Advantage APT and MOTD Messages.
Jun 15 13:34:46 MAAS systemd[1]: ua-messaging.
Jun 15 13:34:46 MAAS systemd[1]: ua-messaging.
Installed distro-info was 0.14build1 ; upgrading to current fixed it.
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
description: | updated |
Changed in ubuntu-advantage-tools (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in ubuntu-advantage-tools (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in ubuntu-advantage-tools (Ubuntu Focal): | |
status: | New → In Progress |
Changed in ubuntu-advantage-tools (Ubuntu Hirsute): | |
status: | New → In Progress |
Hi,
I also see this problem with fresh installed Xenial.
It's interesting to see that it's a bit tricky to reproduce this problem. I have to upgrade "ubuntu- advantage- tools" shortly after installing Xenial.
Cheers!