The region process doesn't start properly after 'maas init' in the snap

Bug #1761120 reported by Björn Tillenius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

After installing the snap and running 'maas init' to set up MAAS, I can't connect to the MAAS URL. This is in the regiond.log:

  https://paste.ubuntu.com/p/DNCBhQ887b/

If I restart supervisord, MAAS starts properly.

I tested this with revision 30cf5f1d27917dc8a45949a03f6fd34c0f0d6c88

After some bisecting, it seems that this is the commit that is to blame:

commit 7e74081aa6f6b3a7987e5da9287d1c6054e6d41c
Author: Blake Rouse <email address hidden>
Date: Mon Mar 19 22:34:50 2018 +0000

    Add options to regiond.conf and snap to adjust the number of regiond workers and enable debugging.

Revision history for this message
Björn Tillenius (bjornt) wrote :
Download full text (4.5 KiB)

018-04-04 09:28:00 twisted.scripts: [info] twistd 17.9.0 (/snap/maas/x1/usr/bin/python3 3.6.5) starting up.
2018-04-04 09:28:00 twisted.scripts: [info] reactor class: twisted.internet.asyncioreactor.AsyncioSelectorReactor.
2018-04-04 09:28:00 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 64, in execute
    return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: relation "maasserver_config" does not exist
LINE 1: ..._config"."name", "maasserver_config"."value" FROM "maasserve...
                                                             ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/start_up.py", line 67, in start_up
    yield security.get_shared_secret()
  File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/snap/maas/x1/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/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/snap/maas/x1/lib/python3.6/site-packages/provisioningserver/utils/twisted.py", line 875, in callInContext
    return func(*args, **kwargs)
  File "/snap/maas/x1/lib/python3.6/site-packages/provisioningserver/utils/twisted.py", line 232, in wrapper
    result = func(*args, **kwargs)
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/utils/orm.py", line 712, in call_with_connection
    return func(*args, **kwargs)
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/utils/__init__.py", line 192, in call_with_lock
    return func(*args, **kwargs)
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/utils/orm.py", line 563, in retrier
    return func(*args, **kwargs)
  File "/snap/maas/x1/usr/lib/python3.6/contextlib.py", line 52, in inner
    return func(*args, **kwds)
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/security.py", line 87, in get_shared_secret_txn
    secret_in_db_hex = Config.objects.get_config("rpc_shared_secret")
  File "/snap/maas/x1/lib/python3.6/site-packages/maasserver/models/config.py", line 151, in get_config
    return self.get(name=name).value
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/query.py", line 374, in get
    num = len(clone)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/dj...

Read more...

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.4.x
description: updated
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
milestone: 2.4.x → 2.4.0beta2
Revision history for this message
Björn Tillenius (bjornt) wrote :

This is no longer an issue. I guess some commit fixed this issue as a side effect.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.