Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ubuntu pro info on registration #229

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

srunde3
Copy link
Contributor

@srunde3 srunde3 commented Mar 14, 2024

A fix (#215) to incorrect Livepatch reporting unintentionally removed Ubuntu Pro info during registration. This reverts that change.

Copy link
Contributor

@Perfect5th Perfect5th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Perfect5th Perfect5th merged commit 9683f20 into canonical:master Mar 14, 2024
5 checks passed
@st3v3nmw
Copy link
Collaborator

Guys, this broke the snap 😢.

The new calls to from landscape.client.manager.ubuntuproinfo import get_ubuntu_pro_info have broken the snap since it cannot do anything apt related without a major rewrite to use the packagekit-control interface.

We're getting this error during registration:

Traceback (most recent call last):
  File "/snap/landscape-client/x1/usr/bin/pro", line 33, in <module>
    sys.exit(load_entry_point('ubuntu-pro-client==8001', 'console_scripts', 'ubuntu-advantage')())
  File "/snap/landscape-client/x1/usr/bin/pro", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/snap/landscape-client/x1/usr/lib/python3/dist-packages/uaclient/cli/__init__.py", line 15, in <module>
    from uaclient import (
  File "/snap/landscape-client/x1/usr/lib/python3/dist-packages/uaclient/actions.py", line 9, in <module>
    from uaclient import (
  File "/snap/landscape-client/x1/usr/lib/python3/dist-packages/uaclient/config.py", line 9, in <module>
    from uaclient import (
  File "/snap/landscape-client/x1/usr/lib/python3/dist-packages/uaclient/apt.py", line 14, in <module>
    from apt.progress.base import AcquireProgress  # type: ignore
  File "/snap/landscape-client/x1/usr/lib/python3/dist-packages/apt/__init__.py", line 36, in <module>
    apt_pkg.init_system()
apt_pkg.Error: E:Error reading the CPU table

It's the same issue we documented here.

@st3v3nmw
Copy link
Collaborator

I now wonder how it was working before #215 🤔. I used to install the snap in devmode so that's probably why we didn't notice it then,... it's not so happy when strictly confined (installed as dangerous)

@mcw-work
Copy link
Contributor

mcw-work commented Mar 22, 2024 via email

@srunde3
Copy link
Contributor Author

srunde3 commented Mar 26, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants