Comment 2 for bug 1702527

Revision history for this message
Greg Lutostanski (lutostag) wrote :

2017-07-05 17:52:18 maasserver.websockets.protocol: [critical] Error on request (33) subnet.delete: Subnet matching query does not exist.

Traceback (most recent call last):
  File "/snap/maas/91/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/provisioningserver/utils/twisted.py", line 842, in worker
    return target()
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/_threads/_threadworker.py", line 46, in work
    task()
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/_threads/_team.py", line 190, in doWork
    task()
--- <exception caught here> ---
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/python/threadpool.py", line 246, in inContext
    result = inContext.theWork()
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/python/threadpool.py", line 262, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/snap/maas/91/lib/python3.5/site-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/snap/maas/91/lib/python3.5/site-packages/provisioningserver/utils/twisted.py", line 875, in callInContext
    return func(*args, **kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/provisioningserver/utils/twisted.py", line 232, in wrapper
    result = func(*args, **kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/utils/orm.py", line 686, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/utils/orm.py", line 504, in retrier
    return func(*args, **kwargs)
  File "/snap/maas/91/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/websockets/handlers/subnet.py", line 97, in delete
    subnet.delete()
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/subnet.py", line 471, in delete
    super().delete(*args, **kwargs)
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/base.py", line 872, in delete
    collector.delete()
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/deletion.py", line 314, in delete
    sender=model, instance=obj, using=self.using
  File "/snap/maas/91/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/snap/maas/91/lib/python3.5/site-packages/maasserver/models/signals/staticipaddress.py", line 151, in post_delete_check_range_utilization
    if instance.subnet is None:
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/fields/related.py", line 602, in __get__
    rel_obj = qs.get()
  File "/snap/maas/91/lib/python3.5/site-packages/django/db/models/query.py", line 334, in get
    self.model._meta.object_name
maasserver.models.subnet.DoesNotExist: Subnet matching query does not exist.

Is the interesting part from the log