MaaS 3.4 with Debian packages, Rack fail to register

Hello,

I’m testing MaaS 3.4 1:3.4.0~rc1-14283-g.89901d5cb-0ubuntu1~22.04.1 Debian packages with two Ubuntu 22.04 hosts as Virtual Machines (Virt-Manager in my Ubuntu 22.04 laptop).

Procedure:

Region Controller

IPs: eth0 192.168.122.XXX`

apt-add-repository ppa:maas/3.4-next
apt update
apt install maas-region-controller
maas createadmin

So far, so good. I can access MaaS Web UI and finish its setup.

Rack Controller:

IPs: eth0 192.168.122.XXY, eth1 192.168.64.XXY` for PXE (isolated Libvirt network)

apt-add-repository ppa:maas/3.4-next
apt update
apt install maas-rack-controller
maas-rack register --url http://192.168.122.XXX:5240/MAAS --secret $SECRET

However, it does not do anything.

In the Region, I’m watching:

tail -F /var/log/maas/*.log /var/log/maas/proxy/*.log /var/log/maas/http/*.log

Nothing shows up when I try to register it.

However, if I remove the Debian packages (only in the Rack controller) and install it via snap, then it works:

apt purge maas-rack-controller
apt autoremove
snap install maas
maas init rack --maas-url http://192.168.122.XXX:5240/MAAS --secret $SECRET
# I noticed it was the previous version, then, I refreshed it
snap refresh maas --channel=3.4/beta

Then it registers itself! And I can see stuff on the logs.

I’m not interested in the snap packages at this time.

I appreciate any help!

Thanks in advance

Hi @tmartins !

Thank you for reporting this. Let me try to reproduce it and get back to you in the next hours

I think I reproduced the error locally and the issue should be on the rack controller. Could you please run tail -F /var/log/maas/*.log on the rack? Do you have any error statement there?

Hi @r00ta,

This seems to be an easy one! Just a permission issue.

When I run:

maas-rack register --url http://192.168.122.XXX:5240/MAAS --secret $SECRET
==> /var/log/maas/rackd.log <==
Traceback (most recent call last):
  File "/usr/sbin/rackd", line 33, in <module>
    sys.exit(load_entry_point('maas==3.4.0rc1', 'console_scripts', 'rackd')())
  File "/usr/lib/python3/dist-packages/provisioningserver/server.py", line 95, in run
    runService("maas-rackd")
  File "/usr/lib/python3/dist-packages/provisioningserver/server.py", line 90, in runService
    UnixApplicationRunner(config).run()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 370, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 432, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/usr/lib/python3/dist-packages/provisioningserver/plugin.py", line 276, in makeService
    secret = MAAS_SHARED_SECRET.get()
  File "/usr/lib/python3/dist-packages/provisioningserver/utils/env.py", line 64, in get
    self.path.read_text(encoding="ascii")
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
PermissionError: [Errno 13] Permission denied: '/var/lib/maas/secret'
root@maas-rackd-1:~# ll /var/lib/maas/secret
-rw------- 1 root maas 32 Jul 10 17:06 /var/lib/maas/secret

I’ll set it to 0640. Let me know if this isn’t a good idea.

Yeah it’s the same issue I get. I reported the bug as https://bugs.launchpad.net/maas/+bug/2026802 . I think your workaround is fine for the time being until we fix this upstream

2 Likes

The fix has landed. It will be available in the next minor and major releases. Thank you!

1 Like