Issue while upgrading Maas

Hello,

We have been using Maas 2.8 for a few years now and it’s running on 2 VMs on Ubuntu 18.04, 1 master and 1 rack controller on a separate VLAN.
We want to upgrade both VMs to Ubuntu 22.04 and upgrade Maas at the same time to 3.3.
Maas is installed from the repositories and I see we can use snap as well.
I tried the steps in the documentation (using the PPA) and it did not work I already reverted to my snapshots multiple times.
What is the suggested way to upgrade in our case? Should we move to snap ? I don’t mind using snap I just don’t want to have to reinitialize our Maas because we have a lot of servers running on it already.

Thanks!

I wonder if this is postgres version related issue. What version are you using for database?

I am using 12.14:

$ pg_config --version
PostgreSQL 12.14 (Ubuntu 12.14-0ubuntu0.20.04.1)

We noted in the MAAS documentation that 3.3 requires Ubuntu 22.04. When we upgraded to 22.04, it automatically upgraded Postgresql client and libraries to 14. We didn’t want that because we haven’t yet upgraded our postegresql server from 12 to 14.
So, we are staying with MAAS 3.2.7 for now, on Ubuntu 20.04.

In contrast to you, we wish to avoid snaps. Apt/dpkg has a long proven track record from the user perspective, and in my limited experience snaps (of other packages, not maas) have sometimes yielded poorer performance and odd behaviour.

Also, you said it did not work but didn’t give any details. Others may be able to offer more assistance if you provide details.

Our installation was also challenging to move to MAAS 3.3.

I started out with a homogenous Ubuntu 20.04 environment - with a separate database server and a Maas server running both rack and region. Upgrading the database server first was required before the rack/region server, but that took some failures to discover. Once the database was updated and the operating systems on both servers were updated, then Maas updated successfully too. I’m using the Snap version and haven’t run into too many issues with it for some time now.

It took me a day or two to get all the kinks worked out of that upgrade process when it should have been a quick 20-minute escapade, IMO. That’s all the time the software upgrade ended up taking - but all the OS upgrades and DB upgrades required research and implementation. It’s frustrating, but keep at it, and you’ll get there.

Be thankful that your backups have proven how well-designed they are. :smiley:

Thanks

~~ Charles

noted. this wasn’t supposed to go sideways like this.

Hello there!

I see that you’ve encountered some challenges while attempting to upgrade your MAAS installation and you’re considering moving to the snap version. It’s great that you’re open to exploring different options and seeking advice from the community.

I want to encourage you to share your experiences and insights with me (I sort of am the MAAS documentation team), either by editing one of the documents, or just posting a comment here with the procedures that worked for you. Documenting real-world experiences and challenges faced during upgrades can be incredibly valuable for other users who may encounter similar situations, and for me, because I don’t always get a chance to try every permutation. By providing feedback and suggesting adjustments to the documentation, you can help improve it for the entire MAAS community.

I really do appreciate your input and I’d really like to be able to incorporate your experiences into the documentation, making it more comprehensive and helpful to others in similar scenarios, and preventing these kinds of headaches for the next group of users.

Thanks in advance for your willingness to contribute and for sharing your journey with the MAAS community. I hope you find a successful path forward with your upgrade process. Don’t hesitate to reach out if you have any further questions or need additional assistance along the way.

Hi guys,

I am sorry for the late reply but we had a ton of servers to upgrade to fix VITs and Maas upgrade had to be moved.
I am back on it and I have more information.
I am back at step 1 because I did a snapshot when it’s working, ubuntu 18.04 and Maas 2.8.7.
My goal is Ubuntu 22 and Maas 3.X

After upgrading to Ubuntu 20.04 here is the status:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
$ dpkg -l|grep maas
ii  maas                                   1:0.7                                    all          Transitional package to the maas snap
rc  maas-common                            2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS server common files
rc  maas-dhcp                              2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS DHCP server
rc  maas-proxy                             2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS Caching Proxy
ii  maas-rack-controller                   1:0.7                                    all          Transitional package to the maas snap
ii  maas-region-api                        1:0.7                                    all          Transitional package to the maas snap
ii  maas-region-controller                 1:0.7                                    all          Transitional package to the maas snap
ii  python3-django-maas                    2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS server Django web framework (Python 3)
ii  python3-maas-client                    2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS python API client (Python 3)
ii  python3-maas-provisioningserver        2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1  all          MAAS server provisioning libraries (Python 3)

Is it normal some packages are already in rc state here ?

I am now trying to install 2.9:
$ sudo add-apt-repository ppa:maas/2.9

And then:

$ apt list --upgradable
Listing... Done
curtin-common/focal 21.2-0ubuntu1~20.04.1 all [upgradable from: 21.2-0ubuntu1~18.04.1]
maas-rack-controller/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 1:0.7]
maas-region-api/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 1:0.7]
maas-region-controller/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 1:0.7]
maas/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 1:0.7]
python3-curtin/focal 21.2-0ubuntu1~20.04.1 all [upgradable from: 21.2-0ubuntu1~18.04.1]
python3-django-maas/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1]
python3-maas-client/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1]
python3-maas-provisioningserver/focal 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all [upgradable from: 2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1]
python3-pylxd/focal 2.2.11~ubuntu20.04-1 all [upgradable from: 2.2.11~ubuntu18.04-1]

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 maas : Conflicts: bind9
        Conflicts: isc-dhcp-server
        Conflicts: maas-cli
        Conflicts: maas-common
        Conflicts: maas-dhcp
        Conflicts: maas-proxy
E: Broken packages

I still can upgrade with:
$ sudo apt full-upgrade -y

It does:

The following packages will be REMOVED:
  maas maas-rack-controller maas-region-api maas-region-controller
The following NEW packages will be installed:
  freeipmi-tools libipmiconsole2 libipmidetect0 python3-pypureomapi
The following packages will be upgraded:
  curtin-common python3-curtin python3-django-maas python3-maas-client python3-maas-provisioningserver python3-pylxd
6 upgraded, 4 newly installed, 4 to remove and 0 not upgraded.

After a reboot:

$ dpkg -l|grep maas
    rc  maas                                   1:0.7                                     all          Transitional package to the maas snap
    rc  maas-common                            2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1   all          MAAS server common files
    rc  maas-dhcp                              2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1   all          MAAS DHCP server
    rc  maas-proxy                             2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1   all          MAAS Caching Proxy
    rc  maas-rack-controller                   1:0.7                                     all          Transitional package to the maas snap
    rc  maas-region-api                        1:0.7                                     all          Transitional package to the maas snap
    ii  python3-django-maas                    1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all          MAAS server Django web framework (Python 3)
    ii  python3-maas-client                    1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all          MAAS python API client (Python 3)
    ii  python3-maas-provisioningserver        1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1 all          MAAS server provisioning libraries (Python 3)

I now try to upgrade to 3.0
$ sudo apt-add-repository ppa:maas/3.0

And if I try to upgrade following the doc:

$ apt list --upgradable
Listing... Done
python3-django-maas/focal 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1 all [upgradable from: 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1]
python3-maas-client/focal 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1 all [upgradable from: 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1]
python3-maas-provisioningserver/focal 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1 all [upgradable from: 1:2.9.2-9164-g.ac176b5c4-0ubuntu1~20.04.1]
python3-pylxd/focal 2.3.1~alpha1-386-8-g.b36a7ac~ubuntu20.04.1 all [upgradable from: 2.2.11~ubuntu20.04-1]

$ sudo apt upgrade maas
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 maas : Depends: maas-rack-controller (= 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1)
        Depends: maas-region-controller (= 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1)
E: Broken packages

Should I install again those packages ? When I do I get new errors:

$ sudo apt install maas-rack-controller maas-region-controller
######
Preparing to unpack .../31-maas-region-controller_1%3a3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1_all.deb ...
Unpacking maas-region-controller (1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-qIEpI2/19-maas-common_1%3a3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo apt upgrade maas
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 maas-rack-controller : Depends: maas-common (= 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1)
 maas-region-api : Depends: maas-common (= 1:3.0.1-10052-g.82c730c57-0ubuntu1~20.04.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I think I am totally in the wrong way now…

Thanks!
I don’t have the option of reinstalling Maas because we have to many servers deployed on it.

Edit, just saw this:
ERROR: The MAAS Debian packages may not be installed alongside the MAAS Snap!
I am not familiar with snap and I thought I only used the package repositories…

Snap packages were the issue, once I removed them I could upgrade to 3.0, then I migrated to Postgres 12 and finished he Maas upgrade to 3.3.4.
All good, thank you!

2 Likes