Ubuntu ESM not working in WSL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
This bug impacts users which are running on environments where '/usr/bin/cloud-id' is present, but returns any error (even for valid reasons, like cloud-init being installed on the system, but disabled, for example). UA client will raise this error while trying to use this tool to detect the cloud.
The solution to this problem is to rely only on cloud-id when trying to determine the cloud type, and assuming not on cloud when the command is not present or if it fails.
https:/
and
https:/
[Test Case]
To reproduce:
With ubuntu-
- Make sure the '/run/cloud-
`$ mv /run/cloud-
- Run `$ sudo ua status`
- Verify that it fails
To verify the fix:
Repeat the above process using ubuntu-advantage tools 27.3, and verify that the operation succeeds and the status is shown on screen.
[Regression Potential]
When running on a non-cloud system, this fix brings no impact, as we expect cloud-id to be absent and we are not running on cloud.
When running on a specific cloud, this fix brings the scenario where we should detect the cloud and are unable to, due to problems with cloud-id itself. This is not a problem though: considering no-cloud when not in aws/azure/gcp has no impact on UA at all, and those three providers have images with cloud-id working properly.
[Original Description]
Description: Ubuntu 16.04.7 LTS
Release: 16.04
ubuntu-
Installiert: 27.2.2~16.04.1
Installations
Versionstabelle:
*** 27.2.2~16.04.1 500
500 http://
100 /var/lib/
sudo ua status
Unexpected error(s) occurred.
For more details, see the log: /var/log/
To file a bug run: ubuntu-bug ubuntu-
2021-09-23 07:55:53,550 - cli.py:(1297) [ERROR]: Unhandled exception, please file a bug
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return args.action(args, cfg)
File "/usr/lib/
status = cfg.status(
File "/usr/lib/
response = self._attached_
File "/usr/lib/
self.
File "/usr/lib/
ent_status, details = ent.user_
File "/usr/lib/
applicability, details = self.applicabil
File "/usr/lib/
for error_message, functor, expected_result in self.static_
File "/usr/lib/
static_
File "/usr/lib/
cloud_id = get_cloud_type() or ""
File "/usr/lib/
return f()
File "/usr/lib/
out, _err = util.subp(
File "/usr/lib/
out, err = _subp(args, rcs, capture, timeout, env=env)
File "/usr/lib/
stderr=
uaclient.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 4.4.0-19041-
ApportVersion: 2.20.1-0ubuntu2.30
Architecture: amd64
Date: Thu Sep 23 07:56:47 2021
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
Hello, thanks for reporting this bug. This is a known issue, which was fixed for version 27.3.
We are in process of releasing this version, so you can expect it to be available in a couple weeks.