/usr/lib/ubuntu-advantage/timer.py:uaclient.exceptions.InvalidFileFormatError:read:loads:decode:raw_decode:/usr/lib/ubuntu-advantage/timer.py@176:run_jobs:read
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Renan Rodrigo | ||
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 | ||
Lunar |
Fix Released
|
Undecided
|
Renan Rodrigo |
Bug Description
[Original Description]
The Ubuntu Error Tracker has been receiving reports about a problem regarding ubuntu-
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
[Impact]
If the jobs-status.json file gets corrupted for any reason, users will see a degraded state on systemd, since we will not be able to run the timer job anymore.
[ Test Case ]
1) Launch a LXD container with an affected Ubuntu release
2) Install the Pro client version with the fix
3) Manually run the timer job, python3 /usr/lib/
4) Corrupt the /var/lib/
5) Run the job again and guarantee that it doesn't fail
6) Check /var/lib/
[ Regression potential ]
We deleting the corrupted file and running the job to recreate a correct one. Since we are just acting upon a corrupted file, we don't believe this change pose a significant regression potential
[ Discussion]
We are now checking if the jobs-status.json file can be read. If it can't, we delete the file and run the job normally to recreate it. We are also checking for error situations where we can't delete the file. In that situation we will log the error and not continue running the job
Related branches
- Sergio Durigan Junior (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 1426 lines (+827/-88)32 files modifiedapt-hook/json-hook.cc (+11/-6)
apt-hook/json-hook.hh (+2/-0)
debian/changelog (+26/-0)
debian/ubuntu-advantage-tools.postinst (+20/-2)
docs/explanations/apt_messages.md (+2/-2)
features/apt_messages.feature (+26/-1)
features/attached_status.feature (+22/-1)
features/motd_messages.feature (+27/-4)
features/security_status.feature (+2/-1)
features/steps/network.py (+1/-15)
features/ubuntu_pro.feature (+0/-3)
features/unattached_commands.feature (+1/-1)
lib/esm_cache.py (+7/-1)
lib/timer.py (+14/-1)
sru/release-27.13.3/test-conffile-temp-fix.sh (+222/-0)
sru/release-27.13.4/test-no-esm-apps-duplicates-attached.sh (+103/-0)
sru/release-27.13.4/test-no-esm-apps-duplicates.sh (+109/-0)
uaclient/apt_news.py (+6/-4)
uaclient/exceptions.py (+14/-0)
uaclient/files/files.py (+10/-6)
uaclient/jobs/update_messaging.py (+14/-4)
uaclient/messages.py (+14/-0)
uaclient/security.py (+9/-6)
uaclient/security_status.py (+1/-1)
uaclient/status.py (+3/-1)
uaclient/system.py (+24/-17)
uaclient/tests/test_esm_cache.py (+25/-1)
uaclient/tests/test_security.py (+2/-2)
uaclient/tests/test_security_status.py (+13/-0)
uaclient/tests/test_system.py (+55/-7)
uaclient/tests/test_ua_timer.py (+41/-0)
uaclient/version.py (+1/-1)
Changed in ubuntu-advantage-tools (Ubuntu): | |
assignee: | nobody → Renan Rodrigo (renanrodrigo) |
status: | New → Triaged |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
PR is up, will be fixed soon.