Running pro security-status on both fresh ISO-based installations and do-release-upgrade instances of Ubuntu 24.04 results in errors coming from /usr/lib/python3/dist-packages/uaclient/apt.py
Expected behavior
A clean listing of packages by component without the Python errors.
Current behavior
/usr/lib/python3/dist-packages/uaclient/apt.py is erroring out when looking for certain files and folders :
me@cbx1c:~$ sudo pro security-status
/usr/lib/python3/dist-packages/uaclient/apt.py:288: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
/usr/lib/python3/dist-packages/uaclient/apt.py:270: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/preferences.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init_system()
1737 packages installed:
1608 packages from Ubuntu Main/Restricted repository
110 packages from Ubuntu Universe/Multiverse repository
19 packages from third parties
To Reproduce
Please include details on how to reproduce the bug.
New or upgraded instance of Ubuntu 24.04 (Noble Numbat)
Run pro security-status and you'll seed this:
me@cbx1c:~$ sudo pro security-status
/usr/lib/python3/dist-packages/uaclient/apt.py:288: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
/usr/lib/python3/dist-packages/uaclient/apt.py:270: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/preferences.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init_system()
1737 packages installed:
1608 packages from Ubuntu Main/Restricted repository
110 packages from Ubuntu Universe/Multiverse repository
19 packages from third parties
[...]
System information:
Ubuntu release: 24.04 LTS (Noble Numbat)
Pro Client version: 31.2.3
Additional context
You can work around it by populating /var/lib/ubuntu-advantage/apt-esm/etc/apt/ with contents of /etc/apt:
me@cbx1c:~$ sudo find /etc/apt -maxdepth 1 ! -path /etc/apt -exec ln -sf {} /var/lib/ubuntu-advantage/apt-esm/etc/apt/. \;
me@cbx1c:~$ pro security-status
1737 packages installed:
1608 packages from Ubuntu Main/Restricted repository
110 packages from Ubuntu Universe/Multiverse repository
19 packages from third parties
Thanks for the report @ThinGuy! This was first reported in #3060, is fixed, and is being released in v32 of ubuntu-pro-client (GH release PR, LP SRU bug)
Description of the bug
Running
pro security-status
on both fresh ISO-based installations anddo-release-upgrade
instances of Ubuntu 24.04 results in errors coming from /usr/lib/python3/dist-packages/uaclient/apt.pyExpected behavior
A clean listing of packages by component without the Python errors.
Current behavior
/usr/lib/python3/dist-packages/uaclient/apt.py is erroring out when looking for certain files and folders :
To Reproduce
Please include details on how to reproduce the bug.
pro security-status
and you'll seed this:System information:
Additional context
You can work around it by populating /var/lib/ubuntu-advantage/apt-esm/etc/apt/ with contents of /etc/apt: