Failed to update regiond's processes and endpoints

Bug #2033505 reported by Anton Troyanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
High
Christian Grabowski

Bug Description

It seems that 996df30a06ab3c8e75c36f4ee8b24e2118ed9686 introduced this issue, as `_registerConnection` return was changed:
```
- return connection
+ return (connection, created)
```

Aug 30 08:54:39 maas maas-regiond[1350]: maasserver.ipc: [critical] Failed to update regiond's processes and endpoints; maas:pid=1350 record's may be out of date
Aug 30 08:54:39 maas maas-regiond[1350]: Traceback (most recent call last):
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/internet/asyncioreactor.py", line 271, in _onTimer
Aug 30 08:54:39 maas maas-regiond[1350]: self.runUntilCurrent()
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/internet/base.py", line 991, in runUntilCurrent
Aug 30 08:54:39 maas maas-regiond[1350]: call.func(*call.args, **call.kw)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 700, in errback
Aug 30 08:54:39 maas maas-regiond[1350]: self._startRunCallbacks(fail)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
Aug 30 08:54:39 maas maas-regiond[1350]: self._runCallbacks()
Aug 30 08:54:39 maas maas-regiond[1350]: --- <exception caught here> ---
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
Aug 30 08:54:39 maas maas-regiond[1350]: current.result = callback( # type: ignore[misc]
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/maasserver/ipc.py", line 622, in ignore_cancel
Aug 30 08:54:39 maas maas-regiond[1350]: failure.trap(CancelledError)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
Aug 30 08:54:39 maas maas-regiond[1350]: self.raiseException()
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
Aug 30 08:54:39 maas maas-regiond[1350]: raise self.value.with_traceback(self.tb)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
Aug 30 08:54:39 maas maas-regiond[1350]: result = inContext.theWork() # type: ignore[attr-defined]
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in <lambda>
Aug 30 08:54:39 maas maas-regiond[1350]: inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
Aug 30 08:54:39 maas maas-regiond[1350]: return self.currentContext().callWithContext(ctx, func, *args, **kw)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
Aug 30 08:54:39 maas maas-regiond[1350]: return func(*args, **kw)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 856, in callInContext
Aug 30 08:54:39 maas maas-regiond[1350]: return func(*args, **kwargs)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
Aug 30 08:54:39 maas maas-regiond[1350]: result = func(*args, **kwargs)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
Aug 30 08:54:39 maas maas-regiond[1350]: return func_outside_txn(*args, **kwargs)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/maasserver/utils/orm.py", line 574, in retrier
Aug 30 08:54:39 maas maas-regiond[1350]: return func(*args, **kwargs)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/usr/lib/python3.10/contextlib.py", line 79, in inner
Aug 30 08:54:39 maas maas-regiond[1350]: return func(*args, **kwds)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/maasserver/ipc.py", line 590, in _update
Aug 30 08:54:39 maas maas-regiond[1350]: self._updateConnections(process, conn["rpc"]["connections"].copy())
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
Aug 30 08:54:39 maas maas-regiond[1350]: result = func(*args, **kwargs)
Aug 30 08:54:39 maas maas-regiond[1350]: File "/snap/maas/x1/lib/python3.10/site-packages/maasserver/ipc.py", line 521, in _updateConnections
Aug 30 08:54:39 maas maas-regiond[1350]: previous_connection_ids.discard(db_conn.id)
Aug 30 08:54:39 maas maas-regiond[1350]: builtins.AttributeError: 'tuple' object has no attribute 'id'

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Changed in maas:
assignee: nobody → Christian Grabowski (cgrabowski)
milestone: none → 3.5.0
status: Triaged → In Progress
Changed in maas:
importance: Critical → High
Changed in maas:
status: In Progress → 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.