Selecting all machines in a state in the UI causes traceback in backend

Bug #1991229 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alexsander de Souza
maas-ui
Invalid
Undecided
Unassigned

Bug Description

If I click the checkbox to select all machines in a state (e.g. New or Ready) in the UI, I see a traceback like this in the backend, with a validation error:

2022-09-29 09:30:34 maasserver.websockets.protocol: [critical] Error on request (34) machine.list: {"status": ["Select a valid choice. =ready is not one of the available choices."]}
        Traceback (most recent call last):
          File "/usr/lib/python3.10/threading.py", line 946, in run
            self._target(*self._args, **self._kwargs)
          File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 822, in worker
            return target()
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
            task()
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
            task()
        --- <exception caught here> ---
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
            result = inContext.theWork() # type: ignore[attr-defined]
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in <lambda>
            inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/snap/maas/x6/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
            return func(*args, **kw)
          File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
            return func(*args, **kwargs)
          File "/snap/maas/x6/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
            result = func(*args, **kwargs)
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/utils/orm.py", line 574, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.10/contextlib.py", line 79, in inner
            return func(*args, **kwds)
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 437, in prep_user_execute
            return self._call_method_track_queries(
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 461, in _call_method_track_queries
            result = method(params)
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/base.py", line 546, in list
            qs_filter = self._filter(qs_filter, "list", params["filter"])
          File "/snap/maas/x6/lib/python3.10/site-packages/maasserver/websockets/handlers/node.py", line 1248, in _filter
            raise HandlerValidationError(form.errors)
        maasserver.websockets.base.HandlerValidationError: {'status': ['Select a valid choice. =ready is not one of the available choices.']}

Tags: ui

Related branches

Revision history for this message
Alberto Donato (ack) wrote :

After this, no action can be performed on the selection (all entries are disabled)

Changed in maas-ui:
importance: Undecided → Unknown
Changed in maas:
importance: Undecided → High
assignee: nobody → Alexsander de Souza (alexsander-souza)
milestone: none → 3.3.0
Changed in maas:
status: New → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.3.0 → 3.3.0-beta1
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Thorsten Merten (thorsten-merten) wrote :

This seems to be fixed for the frontend with the backend fix. Is this still an issue in MAAS 3.3+?

Changed in maas-ui:
importance: Unknown → Undecided
status: New → Invalid
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.