Fresh MAAS 3.2 install failed to find controller

Hi.
I installed a fresh 3.2 MAAS using the doc here : https://maas.io/docs/how-to-install-maas
MAAS was successfully installed, but it seems that there is a bug because my “Controllers” page is empty, even though the rack controller is running on the same node.


(it says Loading forever)

This is preventing me from going futher in my deployement. Do you know how to solve this ?

Everything (postgres, all maas services) is running on the same node which as an ip of 192.168.30.1.
Using the CLI ( maas $PROFILE rack-controllers read | grep hostname | cut -d '"' -f 4 ) does return the name of the node.

EDIT: The install was done on ubuntu server 22.04, with snap

The controller node seem to be registered in the DNS but when I click on its name, I am redirected to an empty controller page:

tail this log file (tail -f /var/snap/maas/common/log/regiond.log) and press hard refresh (ctrl F5) on the controller page. interested to see if you have the same error as I do. **see recent post Controllers not displaying servers after update 3.2.1

2 Likes

Yeah it is the same issue … The logs:

crane@nts-dev-0:~$ tail -f /var/snap/maas/common/log/regiond.log
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 553, in list
	    return [self.full_dehydrate(obj, for_list=True) for obj in objs]
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 553, in <listcomp>
	    return [self.full_dehydrate(obj, for_list=True) for obj in objs]
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 233, in full_dehydrate
	    return self.dehydrate(obj, data, for_list=for_list)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/handlers/controller.py", line 180, in dehydrate
	    vlan_counts[self._vlans_ha[vlan_id]] += 1
	builtins.KeyError: None

2022-08-04 14:55:09 maasserver.websockets.protocol: [critical] Error on request (1) controller.list: None
	Traceback (most recent call last):
	  File "/usr/lib/python3.8/threading.py", line 870, in run
	    self._target(*self._args, **self._kwargs)
	  File "/snap/maas/23093/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 821, in worker
	    return target()
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
	    task()
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
	    task()
	--- <exception caught here> ---
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
	    result = inContext.theWork()
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
	    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/snap/maas/23093/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
	    return func(*args,**kw)
	  File "/snap/maas/23093/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 856, in callInContext
	    return func(*args, **kwargs)
	  File "/snap/maas/23093/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 202, in wrapper
	    result = func(*args, **kwargs)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
	    return func_outside_txn(*args, **kwargs)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/utils/orm.py", line 559, in retrier
	    return func(*args, **kwargs)
	  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
	    return func(*args, **kwds)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 418, in prep_user_execute
	    return self._call_method_track_queries(
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 442, in _call_method_track_queries
	    result = method(params)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 553, in list
	    return [self.full_dehydrate(obj, for_list=True) for obj in objs]
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 553, in <listcomp>
	    return [self.full_dehydrate(obj, for_list=True) for obj in objs]
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/base.py", line 233, in full_dehydrate
	    return self.dehydrate(obj, data, for_list=for_list)
	  File "/snap/maas/23093/lib/python3.8/site-packages/maasserver/websockets/handlers/controller.py", line 180, in dehydrate
	    vlan_counts[self._vlans_ha[vlan_id]] += 1
	builtins.KeyError: None

We should do a bug report on launchpad

While this is not a solution, downgrading to MAAS 3.1 worked for me as a temporary work-around.

I might be able to go back to 3.2 (from 3.2.1) but not sure if I can fully downgrade to 3.1 if there were DB changes. Bug sounds like a good start

This also happen in 20.04 on snap and regular package, using the ppa.

did you file the bug report ?

I am overloaded with work (in part due to this bug delayed some stuff I gotta do :sweat_smile:) so I didn’t have time atm.

EDIT: I saw that you created the BR, thanks :slight_smile:

1 Like

You need to add the controller.

sudo maas init rack --maas-url $MAAS_URL_OF_NEW_MAAS --secret $SECRET_FOR_NEW_MAAS

where the secret is found in /var/snap/maas/common/maas/secret.

Let me guess if you are using ubuntu 22.04 and mass 3.2, don’t use 22.04, use 20.04 instead will solve your problem.

This should be fixed in MAAS 3.2.2. We are sorry for the inconvenience.

1 Like

It happens to the best of us :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.