MAAS 3.3 Beta 1 released

We are happy to announce that MAAS 3.3 Beta 1 has been released, with concerted efforts to improve MAAS on multiple fronts. New features include:

Improved capabilities include the following:

Greatly expanded documentation sections include:

Read more in the release notes to catch up with what we’ve done so far this cycle.

2 Likes

How can I update the maas-test-db snap to 3.3/beta? When I try
snap refresh --channel=3.3/beta maas-test-db

it says “error: snap “maas-test-db” is not available on 3.3/beta”

@kevin-reeuwijk, have you tried a snap info maas-test-db ?

when i do this, i get this list:

  3.2/stable:       12.4-24-g.8add233 2022-06-23 (105) 33MB -
  3.2/candidate:    ↑                                       
  3.2/beta:         12.4-24-g.8add233 2022-03-24 (101) 33MB -
  3.2/edge:         12.4-24-g.8add233 2022-05-18 (105) 33MB -
  latest/stable:    –                                       
  latest/candidate: –                                       
  latest/beta:      –                                       
  latest/edge:      14.2-29-g.ed8d7f2 2022-07-05 (127) 35MB -
  3.3/stable:       –                                       
  3.3/candidate:    –                                       
  3.3/beta:         14.2-29-g.ed8d7f2 2022-10-17 (127) 35MB -
  3.3/edge:         ↑                                       
  3.1/stable:       12.4-22-g.aed1dfe 2021-11-25  (91) 33MB -
  3.1/candidate:    ↑                                       
  3.1/beta:         ↑                                       
  3.1/edge:         12.4-22-g.aed1dfe 2021-11-17  (91) 33MB -
  3.0/stable:       12.4-17-g.9e70484 2021-06-22  (54) 39MB -
  3.0/candidate:    ↑                                       
  3.0/beta:         ↑                                       
  3.0/edge:         12.4-17-g.9e70484 2021-10-11  (73) 33MB -
  2.9/stable:       12.4-17-g.9e70484 2020-12-09  (53) 39MB -
  2.9/candidate:    ↑                                       
  2.9/beta:         ↑                                       
  2.9/edge:         12.4-17-g.9e70484 2020-12-09  (53) 39MB -
  2.8/stable:       10.6-14-g.70a88b9 2020-06-29  (34) 28MB -
  2.8/candidate:    ↑                                       
  2.8/beta:         ↑                                       
  2.8/edge:         10.6-14-g.70a88b9 2020-06-15  (34) 28MB -

I get the same list, and 3.3/beta is in there, with a PostgreSQL 14 version. But it won’t let me install it.

can you run snap info maas-test-db and post the output?

root@maas:~# snap info maas-test-db
name:      maas-test-db
summary:   PostgreSQL database server for use with the MAAS snap
publisher: Canonical✓
store-url: https://snapcraft.io/maas-test-db
contact:   https://discourse.maas.io/
license:   AGPL-3.0
description: |
  This snap provides a PostgreSQL database server that can be used by the MAAS
  snap for a simple test setup.

  It is not meant to be upgradable nor to be used for any production purpose.
commands:
  - maas-test-db.psql
services:
  maas-test-db.postgres: simple, enabled, active
snap-id:      idVMgkvkiKaOC8BjKlJRPUH50fvibpp8
tracking:     3.2/stable
refresh-date: today at 10:39 UTC
channels:
  3.2/stable:       12.4-24-g.8add233 2022-06-23 (105) 33MB -
  3.2/candidate:    ↑
  3.2/beta:         12.4-24-g.8add233 2022-03-24 (101) 33MB -
  3.2/edge:         12.4-24-g.8add233 2022-05-18 (105) 33MB -
  latest/stable:    –
  latest/candidate: –
  latest/beta:      –
  latest/edge:      14.2-29-g.ed8d7f2 2022-07-05 (127) 35MB -
  3.3/stable:       –
  3.3/candidate:    –
  3.3/beta:         14.2-29-g.ed8d7f2 2022-10-17 (127) 35MB -
  3.3/edge:         ↑
  3.1/stable:       12.4-22-g.aed1dfe 2021-11-25  (91) 33MB -
  3.1/candidate:    ↑
  3.1/beta:         ↑
  3.1/edge:         12.4-22-g.aed1dfe 2021-11-17  (91) 33MB -
  3.0/stable:       12.4-17-g.9e70484 2021-06-22  (54) 39MB -
  3.0/candidate:    ↑
  3.0/beta:         ↑
  3.0/edge:         12.4-17-g.9e70484 2021-10-11  (73) 33MB -
  2.9/stable:       12.4-17-g.9e70484 2020-12-09  (53) 39MB -
  2.9/candidate:    ↑
  2.9/beta:         ↑
  2.9/edge:         12.4-17-g.9e70484 2020-12-09  (53) 39MB -
  2.8/stable:       10.6-14-g.70a88b9 2020-06-29  (34) 28MB -
  2.8/candidate:    ↑
  2.8/beta:         ↑
  2.8/edge:         10.6-14-g.70a88b9 2020-06-15  (34) 28MB -
installed:          12.4-24-g.8add233            (105) 33MB -

I thought maybe it was blocked because the OS was Ubuntu 20.04 LTS and not 22.04 LTS. So I upgraded the OS to 22.04 LTS and tried again after, but got the same error.

yeah, something isn’t working as i expect it to; let me ask the team.

@kevin-reeuwijk, the snap description seems to indicate that this is not a upgradeable snap. you have to remove the old one and install a new one.

I see. I don’t know how to migrate the data though, so I guess without an upgrade I’m stuck on v12 until I can rebuild the server. I’ll build it with a regular PostgresDB install next time.

@kevin-reeuwijk, if you think the maas-test-db needs to be migrate-able, you should add a feature request. i think the designers of the test mode didn’t expect people to migrate their test DB at all. maybe that’s a wrong assumption?

It’s fair for the maas-test-db not to be upgradeable, but it does seem likely that people would want to migrate their DB from the maas-test-db snap to a regular PostgresDB. Is there a procedure for that documented anywhere?

@kevin-reeuwijk, there might be something in here (Tips and Tricks). some of it looks badly written. lemme know if you don’t find anything worth trying.

Thanks, while somewhat outdated the information helped me to move the data from the old snap to the new one, like so:

snap stop maas
pg_dump -U maas -h /var/snap/maas-test-db/common/postgres/sockets -d maasdb -F t -f maasdb-dump.tar
snap stop maas-test-db
snap remove maas-test-db
snap install --channel=3.3/beta maas-test-db
snap start maas-test-db
/snap/maas-test-db/current/usr/bin/dropdb -U postgres -h /var/snap/maas-test-db/common/postgres/sockets maasdb
/snap/maas-test-db/current/usr/bin/createdb -U postgres -h /var/snap/maas-test-db/common/postgres/sockets maasdb -O maas
/snap/maas-test-db/current/usr/bin/pg_restore -U maas -h /var/snap/maas-test-db/common/postgres/sockets -d maasdb ./maasdb-dump.tar
snap start maas
1 Like

@kevin-reeuwijk, can you point out what was outdated? i’d like to fix it. tia.

Ok, here’s what I found:

  • /snap/maas/current/helpers/migrate-vd no longer exists, so the entire “Migrating an existing snap installation” section doesn’t work.
  • The “Manually exporting the MAAS database” section was most helpful to me, but it’s not written for the maas-test-db snap, which required me to adjust some things:
    • For the maas-test-db snap, the Postgres socket is located at /var/snap/maas-test-db/common/postgres/sockets instead of /var/snap/maas/common/postgres/sockets
    • The binaries for Postgres are not in the path and need to be run from /snap/maas-test-db/current/usr/bin
    • You don’t need to run the Postgres command as the postgres user when using the maas-test-db snap
    • You need to manually delete & recreate an empty maasdb after installing the Postgres v14 maas-test-db snap, so that the DB can be restored over it.
1 Like

thanks! nice. :slight_smile: :slight_smile: :slight_smile:

@kevin-reeuwijk, i ran out of time updating the doc (all-company meeting coming up for a week). if you want to edit the tips and tricks document, and flesh out the instructions, feel free, or i’ll finish it up in a couple of weeks. tia!

hi, unfortunately I fails with this error:
root@maas:~# pg_dump -U maas -h /var/snap/maas-test-db/common/postgres/sockets -d maasdb -F t -f maasdb-dump.tar
Error: You must install at least one postgresql-client- package
root@maas:~# export PATH=/snap/maas-test-db/current/usr/bin:$PATH
root@maas:~# pg_dump -U maas -h /var/snap/maas-test-db/common/postgres/sockets -d maasdb -F t -f maasdb-dump.tar
pg_dump: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
root@maas:~# export LD_LIBRARY_PATH=/snap/maas-test-db/current/usr/lib:$LD_LIBRARY_PATH
root@maas:~# pg_dump -U maas -h /var/snap/maas-test-db/common/postgres/sockets -d maasdb -F t -f maasdb-dump.tar
pg_dump: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

it looks like postgres isn’t properly installed, but i could be wrong?