group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #39957
[Bug 1932028] Re: missing version dependency on distro-info
This bug was fixed in the package ubuntu-advantage-tools -
27.2.1~21.04.1
---------------
ubuntu-advantage-tools (27.2.1~21.04.1) hirsute; urgency=medium
* Backport new upstream release: (LP: #1934902) to hirsute
-- Chad Smith <chad.smith@xxxxxxxxxxxxx> Fri, 16 Jul 2021 12:49:23
-0600
** Changed in: ubuntu-advantage-tools (Ubuntu Hirsute)
Status: In Progress => Fix Released
** Changed in: ubuntu-advantage-tools (Ubuntu Focal)
Status: In Progress => 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/1932028
Title:
missing version dependency on distro-info
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 Hirsute:
Fix Released
Bug description:
[Impact]
If a user on xenial or on bionic has an old version of distro-info and
then upgraded ubuntu-advantage-tools, they will get periodic
tracebacks from our update_messaging systemd unit, and enabling
services with ua will always fail.
The fix is to specify the required versions of distro-info that
ubuntu-advantage-tools needs to function.
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-client/staging - check with the ubuntu-advantage-tools team
before proceeding to make sure this is the case.
First reproduce the issue.
In a xenial container:
```
sudo apt install distro-info=0.14build1 distro-info-data=0.28
sudo apt install ubuntu-advantage-tools
sudo python3 /usr/lib/ubuntu-advantage/ua_update_messaging.py
# 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-info-data=0.37
sudo apt install ubuntu-advantage-tools
sudo python3 /usr/lib/ubuntu-advantage/ua_update_messaging.py
# 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-client/staging
sudo apt-get update
sudo apt install ubuntu-advantage-tools
sudo python3 /usr/lib/ubuntu-advantage/ua_update_messaging.py
# 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-advantage-tools was upgraded, the rest
of the machine is painfully behind.
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/ubuntu-advantage/ua_update_messaging.py", line 302, in <module>
Jun 15 13:34:46 MAAS python3[15434]: update_apt_and_motd_messages(cfg=cfg)
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/ubuntu-advantage/ua_update_messaging.py", line 284, in update_apt_and_motd_messages
Jun 15 13:34:46 MAAS python3[15434]: if not util.is_lts(series):
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/python3/dist-packages/uaclient/util.py", line 353, in is_lts
Jun 15 13:34:46 MAAS python3[15434]: out, _err = subp(["/usr/bin/ubuntu-distro-info", "--supported-esm"])
Jun 15 13:34:46 MAAS python3[15434]: File "/usr/lib/python3/dist-packages/uaclient/util.py", line 608, in subp
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/python3/dist-packages/uaclient/util.py", line 565, in _subp
Jun 15 13:34:46 MAAS python3[15434]: stderr=err.decode("utf-8"),
Jun 15 13:34:46 MAAS python3[15434]: uaclient.util.ProcessExecutionError: Failed running command '/usr/bin/ubuntu-distro-info --supported-esm' [exit(1)]. Message: ubuntu-distro-info: unrecognized option `--supported-esm'
Jun 15 13:34:46 MAAS systemd[1]: ua-messaging.service: Main process exited, code=exited, status=1/FAILURE
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.service: Unit entered failed state.
Jun 15 13:34:46 MAAS systemd[1]: ua-messaging.service: Failed with result 'exit-code'.
Installed distro-info was 0.14build1 ; upgrading to current fixed it.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1932028/+subscriptions