[2.5] RBAC - Cannot create a device as an admin role for "global entities" and all resource pools

Bug #1808090 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse

Bug Description

After upgrading to 2.5.1-7472-g266748600-0ubuntu1~18.04.1 I cannot create devices (when I previously could). Note that this is a previously working MAAS without RBAC.

The user in RBAC has admin role in all scopes available.

2018-12-12 03:39:38 maasserver.websockets.protocol: [critical] Error on request (185) device.create: bgdkcr
        Traceback (most recent call last):
          File "/usr/lib/python3.6/threading.py", line 864, in run
            self._target(*self._args, **self._kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 852, in worker
            return target()
          File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
            task()
          File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
            task()
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 885, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 234, in wrapper
            result = func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 563, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.6/contextlib.py", line 52, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 386, in prep_user_execute
            return method(params)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/device.py", line 299, in create
            data = super(DeviceHandler, self).create(params)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 462, in create
            self._meta.pk: getattr(obj, self._meta.pk)})
          File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 317, in get_object
            raise HandlerDoesNotExistError(pk)
        maasserver.websockets.base.HandlerDoesNotExistError: bgdkcr

Error surfaced in the UI is without context. See attached.

Tags: rbac track

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote :
description: updated
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.5.1
description: updated
tags: added: rbac track
Changed in maas:
assignee: nobody → Alberto Donato (ack)
description: updated
Revision history for this message
Andres Rodriguez (andreserl) wrote :
description: updated
Changed in maas:
status: New → In Progress
assignee: Alberto Donato (ack) → Blake Rouse (blake-rouse)
Changed in maas:
status: In Progress → 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.