Hello all,
I’m creating a home lab with MAAS. Everything works well, but I’m trying to use WoL (Wake-on-LAN) as the power driver. I decided to use webhooks to perform the operations of starting the servers.
This is my configuration:
After creating a webhook and attempting to test it, an error was raised in the regiond logs:
Jul 20 19:00:58 router01 regiond[8504]: maasserver.websockets.protocol: [critical] Error on request (15) machine.action: Error determining BMC task queue for machine cspgxa
Jul 20 19:00:58 router01 regiond[8504]: Traceback (most recent call last):
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3.10/threading.py", line 953, in run
Jul 20 19:00:58 router01 regiond[8504]: self._target(*self._args, **self._kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 821, in worker
Jul 20 19:00:58 router01 regiond[8504]: return target()
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 47, in work
Jul 20 19:00:58 router01 regiond[8504]: task()
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 182, in doWork
Jul 20 19:00:58 router01 regiond[8504]: task()
Jul 20 19:00:58 router01 regiond[8504]: --- <exception caught here> ---
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
Jul 20 19:00:58 router01 regiond[8504]: result = inContext.theWork() # type: ignore[attr-defined]
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in <lambda>
Jul 20 19:00:58 router01 regiond[8504]: inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
Jul 20 19:00:58 router01 regiond[8504]: return self.currentContext().callWithContext(ctx, func, *args, **kw)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
Jul 20 19:00:58 router01 regiond[8504]: return func(*args, **kw)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 856, in callInContext
Jul 20 19:00:58 router01 regiond[8504]: return func(*args, **kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
Jul 20 19:00:58 router01 regiond[8504]: result = func(*args, **kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 770, in call_within_transaction
Jul 20 19:00:58 router01 regiond[8504]: with connected(), post_commit_hooks:
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 636, in __exit__
Jul 20 19:00:58 router01 regiond[8504]: self.fire()
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
Jul 20 19:00:58 router01 regiond[8504]: result = func(*args, **kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/maasserver/utils/asynchronous.py", line 210, in fire
Jul 20 19:00:58 router01 regiond[8504]: self._fire_in_reactor(hook).wait(LONGTIME)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/crochet/_eventloop.py", line 198, in wait
Jul 20 19:00:58 router01 regiond[8504]: result.raiseException()
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
Jul 20 19:00:58 router01 regiond[8504]: raise self.value.with_traceback(self.tb)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
Jul 20 19:00:58 router01 regiond[8504]: result = inContext.theWork() # type: ignore[attr-defined]
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in <lambda>
Jul 20 19:00:58 router01 regiond[8504]: inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
Jul 20 19:00:58 router01 regiond[8504]: return self.currentContext().callWithContext(ctx, func, *args, **kw)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
Jul 20 19:00:58 router01 regiond[8504]: return func(*args, **kw)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 856, in callInContext
Jul 20 19:00:58 router01 regiond[8504]: return func(*args, **kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
Jul 20 19:00:58 router01 regiond[8504]: result = func(*args, **kwargs)
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/maasserver/workflow/power.py", line 302, in convert_power_action_to_power_workflow
Jul 20 19:00:58 router01 regiond[8504]: task_queue=get_temporal_task_queue_for_bmc(machine),
Jul 20 19:00:58 router01 regiond[8504]: File "/usr/lib/python3/dist-packages/maasserver/workflow/power.py", line 275, in get_temporal_task_queue_for_bmc
Jul 20 19:00:58 router01 regiond[8504]: raise UnroutablePowerWorkflowException(
Jul 20 19:00:58 router01 regiond[8504]: maasserver.workflow.power.UnroutablePowerWorkflowException: Error determining BMC task queue for machine cspgxa
Jul 20 19:00:58 router01 regiond[8504]:
I didn’t see any traffic between regiond and the webhook.
P.S. 1 - I’m using this webhook: maas-wol service to use with the MAAS webhook power driver · GitHub with a small modification (to send the magic packet on a specific network interface).
