pro status --all fails on 22.10
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Grant Orndorff | ||
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
|
Grant Orndorff |
Bug Description
[ Original Description ]
When running "pro status --all" on kinetic I get an unexpected error.
ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.19.0-29-generic x86_64
NonfreeKernelMo
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Fri Feb 3 08:13:17 2023
DistributionCha
# This is the distribution channel descriptor for the OEM CDs
# For more information see http://
canonical-
InstallationDate: Installed on 2020-05-18 (990 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20200511-12:31
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: Upgraded to kinetic on 2022-08-30 (156 days ago)
cloud-id.txt-error: Invalid command specified 'cloud-id'.
livepatch-
modified.
mtime.conffile.
ua-status.
[Impact]
If the user has a null effective date in machine-token.json, the pro status command will fail, since we output that date and we assume that it should not be null
[ Test Case ]
We provide an integration test result where we modify the contract to have a null effective date and show that pro status does not break because of that.
[ Regression potential ]
We are just better handling null effective date on the contract server response for status. Since we are just addressing a broken scenario, we don't believe this fix pose a major regression potential
[ Discussion]
If we detect that we have a null effect date delivered on machine-token.json, we are now showing that date as "Unknown/Expired" on the pro status output. This will better reflect the situation the machine is at and while also preventing the command to fail
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)
tags: | removed: need-amd64-retrace |
Changed in ubuntu-advantage-tools (Ubuntu): | |
assignee: | nobody → Grant Orndorff (orndorffgrant) |
status: | Confirmed → In Progress |
description: | updated |
Working - 22.10 with older tools
ii ubuntu- advantage- tools 27.11.3~22.10.1 amd64 management tools for Ubuntu Advantage
$ lxc exec k bash
root@k:~# pro status --all
SERVICE AVAILABLE DESCRIPTION
cc-eal no Common Criteria EAL2 Provisioning Packages
cis no Security compliance and audit tools
esm-apps no Expanded Security Maintenance for Applications
esm-infra no Expanded Security Maintenance for Infrastructure
fips no NIST-certified core packages
fips-updates no NIST-certified core packages with priority security updates
livepatch no Canonical Livepatch service
realtime-kernel no Beta-version Ubuntu Kernel with PREEMPT_RT patches
ros no Security Updates for the Robot Operating System
ros-updates no All Updates for the Robot Operating System
This machine is not attached to an Ubuntu Pro subscription. /ubuntu. com/pro
See https:/
[info] A new version is available: 27.13.3~22.10.1 advantage- tools
Please run:
sudo apt-get install ubuntu-
to get the latest version with new features and bug fixes.