Unexpected error occurred by ua detach
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 | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
Due to this race condition, user may seen unhanded exception when running a Pro command. Additionally, since the race condition is not obvious, users will be really confused on why the command failed in the first place
[ Test Plan ]
Because of the nature of this race condition, it is not straightforward to reproduce this issue. Our fix is basically trying to remove the file and handling the exception instead of checking if the file exists and then removing it. Since we call the function that generated this issue on several Pro commands that are covered in the integration test, we will assume that the full run will guarantee the we have not changed any behavior while addressing the race condition.
[ Where problems could occur ]
We don't believe any problems can occur here, as we are using a less error prone approach to deleting files in Python
[ Original Description ]
On Bionic, ua attach was successful, but a subsequent ua detach failed.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.4.0-84-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.26
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Jul 4 10:12:41 2023
InstallationDate: Installed on 2023-06-28 (5 days ago)
InstallationMedia: Ubuntu 18.04.6 LTS "Bionic Beaver" - Release amd64 (20210915)
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-id.txt-error: Invalid command specified 'cloud-id'.
livepatch-
Failed running command '/snap/
token obtained from https:/
uaclient.conf:
contract_url: https:/
log_level: debug
ubuntu-
["2023-
["2023-
Hello, Nathan
Thanks for reporting this bug.
Seems we hit a race condition when removing a file. If you try to detach again, does the error persist?
The team will be working on a solution.