piston3 package is unnecessarily distro-specific (MAAS breaks after do-release-upgrade from focal to jammy)

Bug #2025443 reported by Trent Lloyd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned

Bug Description

Upgrading from MAAS 3.2 to 3.3 requires also upgrading from Focal to Jammy. The PPA for MAAS 3.2 only supports Focal and the PPA for MAAS 3.3 only supports Jammy.

After you upgrade from Focal to Jammy, MAAS is broken until you also upgrade it. This doesn't work (by default) in one step because there are 2 different PPAs.

The main reason it breaks is that the 3.2/focal python3-django-piston3 package incorectly places it's files in /usr/lib/python3.8 instead of /usr/lib/python3 and so can't be used by python3.11 on jammy.

This is simply due to a missing "--with python3" in debian/rules, which would allow the package to continue working for the brief period until the MAAS 3.3 upgrade is started because the files will be in the version-agnostic path (where they should be).

ModuleNotFoundError: No module named 'piston3'
Traceback (most recent call last):
  File "/usr/sbin/regiond", line 11, in <module>
    load_entry_point('maas==3.2.8', 'console_scripts', 'regiond')()
  File "/usr/lib/python3/dist-packages/maasserver/server.py", line 107, in run
    runMasterServices()
  File "/usr/lib/python3/dist-packages/maasserver/server.py", line 21, in runMasterServices
    runService("maas-regiond-master")
  File "/usr/lib/python3/dist-packages/provisioningserver/server.py", line 90, in runService
    UnixApplicationRunner(config).run()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 370, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 432, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/usr/lib/python3/dist-packages/maasserver/plugin.py", line 215, in makeService
    self._configureDjango()
  File "/usr/lib/python3/dist-packages/maasserver/plugin.py", line 86, in _configureDjango
    django.setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 224, in create
    import_module(entry)
  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 1004, in _find_and_load_unlocked

Related branches

Revision history for this message
Trent Lloyd (lathiat) wrote :
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 3.5.0
Revision history for this message
Trent Lloyd (lathiat) wrote :

If/once merged and this should be backported to the python3-django-piston3 package in the MAAS 3.2 and later PPAs.

Revision history for this message
Alberto Donato (ack) wrote :

This won't fix the upgrade issue.

When performing the upgrade from focal to jammy, to keep MAAS functional you have to

1) add the 3.3 PPA (which won't have packages for focal)
2) pass --allow-third-party to do-release-upgrade, so that PPAs are kept on during the upgrade

This should upgrade all packages at once

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.