Comment 1 for bug 1761120

Revision history for this message
Björn Tillenius (bjornt) wrote :

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/django/db/models/query.py", line 232, in __len__
    self._fetch_all()
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/query.py", line 1118, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 889, in execute_sql
    cursor.execute(sql, params)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/snap/maas/x1/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "maasserver_config" does not exist
LINE 1: ..._config"."name", "maasserver_config"."value" FROM "maasserve...