After adding a second rackd to a region+rack maas deployment, I removed the second rackd.
The controller was properly disconnected and removed, but the regiond.log keeps showing errors like this:
2019-06-20 11:57:56 maasserver.rack_controller: [critical] Failed configuring DHCP on rack controller 'id:3'.
Traceback (most recent call last):
File "/snap/maas/x2/usr/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/internet/asyncioreactor.py", line 290, in run
f(*args, **kwargs)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 500, in errback
self._startRunCallbacks(fail)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/snap/maas/x2/lib/python3.6/site-packages/maasserver/rack_controller.py", line 256, in <lambda>
d.addErrback(lambda f: f.trap(NoConnectionsAvailable))
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/failure.py", line 359, in trap
self.raiseException()
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/failure.py", line 385, in raiseException
raise self.value.with_traceback(self.tb)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
result = inContext.theWork()
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/snap/maas/x2/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/snap/maas/x2/lib/python3.6/site-packages/provisioningserver/utils/twisted.py", line 894, in callInContext
return func(*args, **kwargs)
File "/snap/maas/x2/lib/python3.6/site-packages/provisioningserver/utils/twisted.py", line 235, in wrapper
result = func(*args, **kwargs)
File "/snap/maas/x2/lib/python3.6/site-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File "/snap/maas/x2/lib/python3.6/site-packages/maasserver/utils/orm.py", line 563, in retrier
return func(*args, **kwargs)
File "/snap/maas/x2/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/snap/maas/x2/usr/lib/python3/dist-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/snap/maas/x2/usr/lib/python3/dist-packages/django/db/models/query.py", line 380, in get
self.model._meta.object_name
maasserver.models.node.DoesNotExist: RackController matching query does not exist.
When connection to regiond is lost, rackd should stop interacting with other services.