ScriptSet matching query does not exist

Bug #2031165 reported by Luis Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
Undecided
Unassigned

Bug Description

I was able to deploy a machine,, then I released it.. and now I can't even see the configuration. I am getting the following error in regiond.log

2023-08-11 15:14:47 maasserver.websockets.protocol: [critical] Error on request (4) machine.set_active: ScriptSet matching query does not exist.
 Traceback (most recent call last):
   File "/usr/lib/python3.10/threading.py", line 953, in run
     self._target(*self._args, **self._kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 822, in worker
     return target()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
     task()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
     task()
 --- <exception caught here> ---
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
     result = inContext.theWork() # type: ignore[attr-defined]
   File "/snap/maas/28521/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/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
     return func(*args, **kw)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
     return func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
     result = func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/snap/maas/28521/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/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 437, in prep_user_execute
     return self._call_method_track_queries(
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 461, in _call_method_track_queries
     result = method(params)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 809, in set_active
     obj_data = self.get(params)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 700, in get
     return self.full_dehydrate(obj)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 219, in full_dehydrate
     field_obj = getattr(obj, field_name)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
     rel_obj = self.get_object(instance)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
     return qs.get(self.field.get_reverse_related_filter(instance))
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/query.py", line 435, in get
     raise self.model.DoesNotExist(
 metadataserver.models.scriptset.DoesNotExist: ScriptSet matching query does not exist.

2023-08-11 15:14:47 maasserver.websockets.protocol: [critical] Error on request (6) machine.get: ScriptSet matching query does not exist.
 Traceback (most recent call last):
   File "/usr/lib/python3.10/threading.py", line 953, in run
     self._target(*self._args, **self._kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 822, in worker
     return target()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
     task()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
     task()
 --- <exception caught here> ---
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
     result = inContext.theWork() # type: ignore[attr-defined]
   File "/snap/maas/28521/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/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
     return func(*args, **kw)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
     return func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
     result = func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/snap/maas/28521/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/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 437, in prep_user_execute
     return self._call_method_track_queries(
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 461, in _call_method_track_queries
     result = method(params)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 700, in get
     return self.full_dehydrate(obj)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 219, in full_dehydrate
     field_obj = getattr(obj, field_name)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
     rel_obj = self.get_object(instance)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
     return qs.get(self.field.get_reverse_related_filter(instance))
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/query.py", line 435, in get
     raise self.model.DoesNotExist(
 metadataserver.models.scriptset.DoesNotExist: ScriptSet matching query does not exist.

2023-08-11 15:14:47 maasserver.websockets.protocol: [critical] Error on request (7) machine.get: ScriptSet matching query does not exist.
 Traceback (most recent call last):
   File "/usr/lib/python3.10/threading.py", line 953, in run
     self._target(*self._args, **self._kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 822, in worker
     return target()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
     task()
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
     task()
 --- <exception caught here> ---
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
     result = inContext.theWork() # type: ignore[attr-defined]
   File "/snap/maas/28521/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/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
     return func(*args, **kw)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
     return func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
     result = func(*args, **kwargs)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/snap/maas/28521/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/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 437, in prep_user_execute
     return self._call_method_track_queries(
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 461, in _call_method_track_queries
     result = method(params)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 700, in get
     return self.full_dehydrate(obj)
   File "/snap/maas/28521/lib/python3.10/site-packages/maasserver/websockets/base.py", line 219, in full_dehydrate
     field_obj = getattr(obj, field_name)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
     rel_obj = self.get_object(instance)
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
     return qs.get(self.field.get_reverse_related_filter(instance))
   File "/snap/maas/28521/usr/lib/python3/dist-packages/django/db/models/query.py", line 435, in get
     raise self.model.DoesNotExist(
 metadataserver.models.scriptset.DoesNotExist: ScriptSet matching query does not exist.

Revision history for this message
Luis Rodriguez (laragones) wrote :

I am using snap maas 3.3.4-13189-g.f88272d1e 28521 3.3/stable canonical✓ -

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Hi,

did you experience anything unusual during commissioning or the deployment of this machine?

can you share the full logs with us?

Changed in maas:
status: New → Incomplete
Revision history for this message
Luis Rodriguez (laragones) wrote : Re: [Bug 2031165] Re: ScriptSet matching query does not exist
Download full text (12.1 KiB)

I think something got corrupted in the database.

I managed to delete somehow the machine. Then new and then commission it
again

And the error stopped.

On Fri 25 Aug 2023 at 02:35, Alexsander de Souza <email address hidden>
wrote:

> Hi,
>
> did you experience anything unusual during commissioning or the
> deployment of this machine?
>
> can you share the full logs with us?
>
> ** Changed in: maas
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2031165
>
> Title:
> ScriptSet matching query does not exist
>
> Status in MAAS:
> Incomplete
>
> Bug description:
> I was able to deploy a machine,, then I released it.. and now I can't
> even see the configuration. I am getting the following error in
> regiond.log
>
> 2023-08-11 15:14:47 maasserver.websockets.protocol: [critical] Error on
> request (4) machine.set_active: ScriptSet matching query does not exist.
> Traceback (most recent call last):
> File "/usr/lib/python3.10/threading.py", line 953, in run
> self._target(*self._args, **self._kwargs)
> File
> "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py",
> line 822, in worker
> return target()
> File
> "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py",
> line 47, in work
> task()
> File
> "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/_threads/_team.py",
> line 182, in doWork
> task()
> --- <exception caught here> ---
> File
> "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/threadpool.py",
> line 244, in inContext
> result = inContext.theWork() # type: ignore[attr-defined]
> File
> "/snap/maas/28521/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/28521/usr/lib/python3/dist-packages/twisted/python/context.py",
> line 117, in callWithContext
> return self.currentContext().callWithContext(ctx, func, *args,
> **kw)
> File
> "/snap/maas/28521/usr/lib/python3/dist-packages/twisted/python/context.py",
> line 82, in callWithContext
> return func(*args, **kw)
> File
> "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py",
> line 857, in callInContext
> return func(*args, **kwargs)
> File
> "/snap/maas/28521/lib/python3.10/site-packages/provisioningserver/utils/twisted.py",
> line 203, in wrapper
> result = func(*args, **kwargs)
> File
> "/snap/maas/28521/lib/python3.10/site-packages/maasserver/utils/orm.py",
> line 771, in call_within_transaction
> return func_outside_txn(*args, **kwargs)
> File
> "/snap/maas/28521/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
> ...

Revision history for this message
Andre Ruiz (andre-ruiz) wrote (last edit ):

I just hit this issue. Fresh maas 3.3.4 installation, booted a few nodes, they all appear as New but cannot commission because of this error "ScriptSet matching query does not exist.".

If I try "Test" instead of "Commission", same error. But if I try "Rescue", then it works (powercyles, boots into rescue image, makes itself available for ssh).

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

This should be fixed in 3.4

Changed in maas:
milestone: none → 3.4.0-rc2
status: Incomplete → Fix Committed
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.