Init problems after install for the proof-of-concept scenario - Missing Step?

Hi All,
I’m having problems with install for the proof-of-concept scenario, with all MAAS components installed on a single host.

I’m getting stuck when I attempt to initial maas in new Ubuntu Environment and 3.2 fresh install.

Any ideas? I feel there is a step missing here.

Command:
sudo snap install --channel=3.2/beta maas
sudo snap install maas maas-test-db
sudo maas init region+rack --database-uri maas-test-db:/// **** FAILS HERE

snap list
core18 20220309 2344 latest/stable canonical✓ base
core20 20220318 1405 latest/stable canonical✓ base
lxd 4.0.9-8e2046b 22753 4.0/stable/… canonical✓ -
maas 3.2.0~beta1-11298-g.b74133ead 19262 3.2/beta canonical✓ -
maas-cli 0.6.5 13 latest/stable canonical✓ -
maas-test-db 12.4-22-g.aed1dfe 91 3.1/stable canonical✓ -

Confirm that the DB is running:
Command
maas-test-db.psql
\l

maasdb=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------±---------±---------±--------±------±----------------------
maasdb | maas | UTF8 | C | C |
postgres | postgres | UTF8 | C | C |
template0 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres


Problems start here, all commands fail, never prompts me for a MAAS URL:

Command
sudo maas init region+rack --database-uri maas-test-db:///
OR
sudo maas init region+rack --database-uri maas-test-db:-#,

Error Message —>
usage: maas [-h] COMMAND …

optional arguments:
-h, --help show this help message and exit

drill down:
COMMAND
login Log in to a remote API, and remember its description and credentials.
logout Log out of a remote API, purging any stored credentials.
list List remote APIs that have been logged-in to.
refresh Refresh the API descriptions of all profiles.
init Initialize controller.
apikey Used to manage a user’s API keys. Shows existing keys unless --generate or
–delete is passed.
configauth Configure external authentication.
createadmin Create a MAAS administrator account.
changepassword
Change a MAAS user’s password.

unrecognized arguments: region+rack --database-uri maas-test-db:///

command
sudo maas init

Configuring authentication
No such group: maas
No such group: maas

*** UPDATE***
Hello All,

I’m reinstalled the Ubuntu and began the MAAS install, I’ve now been able to to make it beyond the following steps:

Command:
sudo snap install --channel=3.2/beta maas
sudo snap install maas maas-test-db
sudo maas init region+rack --database-uri maas-test-db:///

Hi, welcome to the MAAS community :slight_smile:

I see you are using 3.2/beta - just remember that it is not ready for production. If you are doing proof of concept work, maybe it is better to use 3.1?

Cheers,
Anton

@nnagreg, did you ever completely resolve this issue?

Hi, I ran into the same issue.
The installation seems to be complete.

sudo apt-add-repository ppa:maas/3.4
sudo apt-get -y install maas
.
.
.

Setting up maas (1:3.4.2-14353-g.5a5221d57-0ubuntu1~22.04.1) ...
Processing triggers for ufw (0.36.1-4ubuntu0.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.7) ...
Scanning processes...
Scanning candidates...
Scanning linux images...

Restarting services...

Following the installation steps on https://maas.io/docs/how-to-install-maas

sudo maas init region+rack --database-uri "postgres://$MAAS_DBUSER:$MAAS_DBPASS@$HOSTNAME/$MAAS_DBNAME"
usage: maas [-h] COMMAND ...

options:
  -h, --help      show this help message and exit

drill down:
  COMMAND
    login         Log in to a remote API, and remember its description and credentials.
    logout        Log out of a remote API, purging any stored credentials.
    list          List remote APIs that have been logged-in to.
    refresh       Refresh the API descriptions of all profiles.
    init          Initialize controller.
    apikey        Used to manage a user's API keys. Shows existing keys unless --generate or --delete is passed.
    configauth    Configure external authentication.
    config-tls    Configure MAAS Region TLS.
    config-vault  Configure MAAS Region Vault integration.
    createadmin   Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.

https://maas.io/

unrecognized arguments: region+rack --database-uri postgres://maas_db_user:<redacted>@localhost/maas_database

I ran in to the unrecognized argument for mass init error. Also maas status gives me the below issue.

sudo maas status
usage: maas [-h] COMMAND ...

options:
  -h, --help      show this help message and exit

drill down:
  COMMAND
    login         Log in to a remote API, and remember its description and credentials.
    logout        Log out of a remote API, purging any stored credentials.
    list          List remote APIs that have been logged-in to.
    refresh       Refresh the API descriptions of all profiles.
    init          Initialize controller.
    apikey        Used to manage a user's API keys. Shows existing keys unless --generate or --delete is passed.
    configauth    Configure external authentication.
    config-tls    Configure MAAS Region TLS.
    config-vault  Configure MAAS Region Vault integration.
    createadmin   Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.

https://maas.io/

argument COMMAND: invalid choice: 'status' (choose from 'login', 'logout', 'list', 'refresh', 'init', 'apikey', 'configauth', 'config-tls', 'config-vault', 'createadmin', 'changepassword')

Please let me know if you need more info on this.

Thanks

Hi, you installed MAAS with Deb packages so you can’t maas init. When you have run sudo apt get install maas you have already initialized Maas as a region+rack so you should be already good to go

@r00ta Thank for helping out. You are correct maas was already initialized.