pro cli errors on corrupted lock file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Lucas Albuquerque Medeiros de Moura | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
In some scenarios, the system could end up with a corrupted pro-client lock file. In that case the pro client would fail without a useful error message.
The fix is to provide a helpful error message in this situation so that the user can remove the corrupt lock file and retry the operation.
[Test Case]
This will be covered by our full test run for u-a-t 27.14.
The specific test that covers this scenario can be inspected here:
https:/
[Regression Potential]
If we made an error in the python changes, then it could result in a new unhandled exception.
We recommend the user to remove the corrupted lock file. If the lock file still represented a running pro process despite its corruption, then the user may end up running two pro processes at once that are both trying to make changes to the system. That would likely result in new errors.
[Discussion]
Corruption could either occur from an incomplete file write, or from interference from some other process. It seems highly unlikely that the process that needed the lock is still running if the lock file is corrupted.
[Original Description]
unbuntu-advantage charm on newly deployed juju stack is erroring out both on CLI and the json output to config-changed
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 4.15.0-197-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.28
Architecture: amd64
Date: Thu Nov 17 18:26:55 2022
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-id.txt: ovf
jobs-status.json: {"update_
mtime.conffile.
ua-status.
information type: | Private → Public |
summary: |
- ubuntu-advantage output erroring out on juju stack + pro cli errors on corrupted lock file |
tags: | added: sc-1361 |
tags: | removed: need-amd64-retrace |
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Lucas Albuquerque Medeiros de Moura (lamoura) |
description: | updated |
description: | updated |
Hello Nathan, thanks for reporting this bug.
This is reproducible on any system where the lock file is corrupted. We'll work on a fix.
As a temporary workaround, could you please remove `/var/lib/ ubuntu- advantage/ lock` and run it again? If this fails, please let us know.