[2.4, devel] Node failed to be commissioned, because of the following error: ScriptSet matching query does not exist.

Bug #1748034 reported by Andres Rodriguez on 2018-02-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Lee Trager

Bug Description

I was testing a bad patch when I came across this issue. This patch was in src/maasserver/rpc/boot.py:

What happened is that:

1. tried to commission the machine
2. the machine booted, error out when getting the kernel to boot so it fall'd back to boot enlistment
3. enlistment booted, I noticed i stopped the buuild.
4. fixed the patch
5. This error now shows every time I try to commission

What's even more interesting, is that I left without retrying commissioning and after a while, it actually allowed me to commission the machine.

This means that there's something going bad and then it doens't anymore...

2018-02-07 17:38:58 regiond: [info] 192.168.122.1 GET /MAAS/rpc/ HTTP/1.1 --> 200 OK (referrer: -; agent: provisioningserver.rpc.clusterservice.ClusterClientService)
2018-02-07 17:39:12 maasserver.websockets.protocol: [critical] Error on request (421) machine.action: ScriptSet matching query does not exist.
        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 842, 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 875, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 232, in wrapper
            result = func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 754, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 561, 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/handlers/machine.py", line 743, in action
            return action.execute(**extra_params)
          File "/usr/lib/python3/dist-packages/maasserver/node_action.py", line 247, in execute
            testing_scripts=testing_scripts)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 738, in call_within_transaction
            return func_within_txn(*args, **kwargs)
          File "/usr/lib/python3.6/contextlib.py", line 52, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 1901, in start_commissioning
            self, testing_scripts)
          File "/usr/lib/python3/dist-packages/metadataserver/models/scriptset.py", line 179, in create_testing_script_set
            script_set.delete()
          File "/usr/lib/python3/dist-packages/metadataserver/models/scriptset.py", line 500, in delete
            elif self == self.node.current_testing_script_set:
          File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 184, in __get__
            rel_obj = self.get_object(instance)
          File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 159, in get_object
            return qs.get(self.field.get_reverse_related_filter(instance))
          File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 380, in get
            self.model._meta.object_name
        metadataserver.models.scriptset.DoesNotExist: ScriptSet matching query does not exist.

Changed in maas:
importance: Undecided → Critical
status: New → Confirmed
status: Confirmed → Triaged
milestone: none → 2.4.0alpha1
tags: added: hardware-testing
description: updated
Changed in maas:
milestone: 2.4.0alpha1 → 2.4.0alpha2
Changed in maas:
milestone: 2.4.0alpha2 → 2.4.0beta1
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
Changed in maas:
milestone: 2.4.0beta1 → 2.4.0beta2
Lee Trager (ltrager) wrote :

Looking at the line numbers from the stack trace this appears to be from a previous version(6db74f). I've landed fixes since then to scriptset.py. I think this is a duplicate of LP:1751946 which has landed in master and 2.3. Could you please try to reproduce with the latest master/2.3?

Changed in maas:
status: Triaged → Incomplete
Lee Trager (ltrager) wrote :

If you can reproduce it with master can you please provide a new stack trace?

Changed in maas:
milestone: 2.4.0beta2 → 2.4.0beta3
Changed in maas:
milestone: 2.4.0beta3 → 2.4.0beta4
Changed in maas:
milestone: 2.4.0beta4 → 2.4.x
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers