We may have to do light modifications about MaaS curtin generation.
For this purpose we may have to rebuild the snap.
So we have done this trial, for sure, modifying nothing at first, to see if it is doable:
Then we follow the legit MaaS install region+rack and everything seems to work correctly.
But then we got [Errno 111] Connection refused trying to use the maas-cli.
Any advices on how to understand what we miss here?
I have checked the log and it contains lots of errors like this :
2023-02-22 15:26:51 maasserver.start_up: [error] Database error during start-up
Traceback (most recent call last):
File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "maasserver_config" does not exist
LINE 1: ..._config"."name", "maasserver_config"."value" FROM "maasserve...
But we dont understand why this shall happens by just repacking the snap without any modifications.
This error indicates that your database doesn’t contain required tables.
Did you execute maas init? That command should apply DB migrations and create all the required schemas.
Also which database you are using, standalone PostgreSQL or the one from maas-test-db snap?
I rebuild the VM from scratch with cloud-init each time.
Everything is automated.
Yep, init has been executed and return no error.
Yep, stand alone PostgreSQL.
Works with original snaps.
Trials done ten times already…
I just exchange those lines under my cloud-init scripts :
I am isolated from the internet and so from the snap store; so I can’t do snap install maas.
So I am doing snap download maas to get the snap from another computer which have internet access. Same for other snap dependencies.
And I got 26658 not 26661…
And I am not installing firstly the original snap, why should this be required ?
And I am not using maas-test-db but a separated postgreSQL host.
I feel this conversation will never converge to an understanding of what is failing, and why it shall, or not, fail and for which reasons.
So forget it, I’ll try to accomplish what I need using .deb packages install.
If not possible, I’ll just drop this current experiment.
It is taking too much of efforts compare to the target.
The only one Idea I got left, is to re-check snap connections.
By default snap connections maas on the re-packed MAAS will be disconnected (most of them)
That seems to have solved the issue !
Very much Thanks !
So where is this documented :
“Thats because when you install snap with --dangerous flag provided, autoconnect is not performed.”