Upgrade MAAS from 2.4 to 2.5 version

Hi,

I try to upgrade the MAAS server from 2.4 to 2.5.

I did the following stepps to upgrade maas:

  1. apt update

  2. apt upgrade

  3. add-apt-repository ppa:maas/stable

  4. apt-get update

  5. apt upgrade
    At the upgrade process I get the following error:
    Installing new version of config file /etc/maas/preseeds/enlist …
    Installing new version of config file /etc/sudoers.d/99-maas-region-sudoers …
    Setting up maas-dns (2.5.2-7523-ge4ecbd54d-0ubuntu1~18.04.1) …
    Setting up libgd3:amd64 (2.2.5-4ubuntu0.3) …
    Setting up maas-region-controller (2.5.2-7523-ge4ecbd54d-0ubuntu1~18.04.1) …
    Operations to perform:
    Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
    Running migrations:
    Applying maasserver.0161_pod_storage_pools… OK
    Applying maasserver.0162_storage_pools_notification… OK
    Applying maasserver.0163_create_new_power_parameters_with_jsonfield… OK
    Applying maasserver.0164_copy_over_existing_power_parameters… OK
    Applying maasserver.0165_remove_and_rename_power_parameters… OK
    Applying maasserver.0166_auto_select_s390x_extra_arches…Traceback (most recent call last):
    File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
    main”, mod_spec)
    File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
    exec(code, run_globals)
    File “/usr/lib/python3/dist-packages/maasserver/main.py”, line 9, in
    raise SystemExit(execute_from_command_line())
    File “/usr/lib/python3/dist-packages/maasserver/init.py”, line 56, in execute_from_command_line
    management.execute_from_command_line()
    File “/usr/lib/python3/dist-packages/django/core/management/init.py”, line 364, in execute_from_command_line
    utility.execute()
    File “/usr/lib/python3/dist-packages/django/core/management/init.py”, line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File “/usr/lib/python3/dist-packages/django/core/management/base.py”, line 283, in run_from_argv
    self.execute(*args, **cmd_options)
    File “/usr/lib/python3/dist-packages/django/core/management/base.py”, line 330, in execute
    output = self.handle(*args, **options)
    File “/usr/lib/python3/dist-packages/maasserver/management/commands/dbupgrade.py”, line 426, in handle
    fake_initial=self._south_was_performed(database))
    File “/usr/lib/python3/dist-packages/django/core/management/init.py”, line 131, in call_command
    return command.execute(*args, **defaults)
    File “/usr/lib/python3/dist-packages/django/core/management/base.py”, line 330, in execute
    output = self.handle(*args, **options)
    File “/usr/lib/python3/dist-packages/django/core/management/commands/migrate.py”, line 204, in handle
    fake_initial=fake_initial,
    File “/usr/lib/python3/dist-packages/django/db/migrations/executor.py”, line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
    File “/usr/lib/python3/dist-packages/django/db/migrations/executor.py”, line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
    File “/usr/lib/python3/dist-packages/django/db/migrations/executor.py”, line 244, in apply_migration
    state = migration.apply(state, schema_editor)
    File “/usr/lib/python3/dist-packages/django/db/migrations/migration.py”, line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
    File “/usr/lib/python3/dist-packages/django/db/migrations/operations/special.py”, line 193, in database_forwards
    self.code(from_state.apps, schema_editor)
    File “/usr/lib/python3/dist-packages/maasserver/migrations/builtin/maasserver/0166_auto_select_s390x_extra_arches.py”, line 12, in add_s390x_to_pkg_repository_to_arches
    url=‘http://ports.ubuntu.com/ubuntu-ports’)
    File “/usr/lib/python3/dist-packages/django/db/models/manager.py”, line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
    File “/usr/lib/python3/dist-packages/django/db/models/query.py”, line 380, in get
    self.model._meta.object_name
    fake.DoesNotExist: PackageRepository matching query does not exist.
    dpkg: error processing package maas-region-controller (–configure):
    installed maas-region-controller package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of maas:
    maas depends on maas-region-controller (= 2.5.2-7523-ge4ecbd54d-0ubuntu1~18.04.1); however:
    Package maas-region-controller is not configured yet.

    dpkg: error processing package maas (–configure):
    dependency problems - leaving unconfigured
    Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1.2) …
    Setting up nginx-core (1.14.0-0ubuntu1.2) …
    Setting up maas-rack-controller (2.5.2-7523-ge4ecbd54d-0ubuntu1~18.04.1) …

Since you are upgrading versions, please try:

sudo apt-get dist-upgrade

This time I did a apt-get dist-upgrade after the add-apt-repository ppa:maas/stable. But I still get the same error.

Please file a bug report in https://bugs.launchpad.net/maas/+filebug

Include the exact MAAS versions you were upgrading from and to. Include apt/dpkg logs, include MAAS logs, and include any settings you may have changed in MAAS to attempt to reproduce this issue.

Hi,

Thanks, I created a bug: https://bugs.launchpad.net/maas/+bug/1826388

I found the issue why this bug got triggered, I changed in Settings -> “Package Repositories” -> “Ubuntu extra architectures” the repo URL to http://10.8.1.240/Ubuntu/.

Kind regards,

Michiel Piscaer