Missing module in MAAS snap, required for AMT power

Bug #2081262 reported by Rafael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
High
Alexsander de Souza
3.5
Fix Released
Undecided
MAAS Lander
3.6
Fix Committed
High
Alexsander de Souza

Bug Description

Attempting to set the power as AMT in MAAS

maas 3.5.1-16317-g.409891638 36889 3.5/stable canonical✓ -

returns the following error:

"you may need to install the SOAP::Lite module"

I am not a SNAP expert, but I guess the python module is missing in the package.

Error Detail:

maas-agent[3514]: ERR Error executing power command error="exit status 1" ActivityID=1 ActivityType=power-query Attempt=3 Namespace=default RunID=ad60c93a-9332-4524-ad4c-a4b51502f2e8 TaskQueue=agent:power@vlan-1 WorkerID=sahwnt@agent:3514 WorkflowID=31f80d67-4f99-41d6-9c2e-b55bd912a0d3 WorkflowType=power-query stderr="main function encountered error\nTraceback (most recent call last):\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 700, in errback\n self._startRunCallbacks(fail)\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 763, in _startRunCallbacks\n self._runCallbacks()\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 857, in _runCallbacks\n current.result = callback( # type: ignore[misc]\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 1750, in gotResult\n current_context.run(_inlineCallbacks, r, gen, status)\n--- <exception caught here> ---\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 1656, in _inlineCallbacks\n result = current_context.run(\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/python/failure.py\", line 489, in throwExceptionIntoGenerator\n return g.throw(self.type, self.value, self.tb)\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/power_driver_command.py\", line 97, in _run\n status = await driver.query(None, context)\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/internet/defer.py\", line 1660, in _inlineCallbacks\n result = current_context.run(gen.send, result)\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/__init__.py\", line 360, in query\n raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/__init__.py\", line 348, in query\n state = yield deferToThread(\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/python/threadpool.py\", line 244, in inContext\n result = inContext.theWork() # type: ignore[attr-defined]\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/python/threadpool.py\", line 260, in <lambda>\n inContext.theWork = lambda: context.call( # type: ignore[attr-defined]\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/python/context.py\", line 117, in callWithContext\n return self.currentContext().callWithContext(ctx, func, *args, **kw)\n File \"/snap/maas/36889/usr/lib/python3/dist-packages/twisted/python/context.py\", line 82, in callWithContext\n return func(*args, **kw)\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/amt.py\", line 477, in power_query\n return self.amttool_query_state(ip_address, power_pass)\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/amt.py\", line 242, in amttool_query_state\n output = self._issue_amttool_command(\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/amt.py\", line 187, in _issue_amttool_command\n return self._run(command, power_pass, stdin=stdin)\n File \"/snap/maas/36889/lib/python3.10/site-packages/provisioningserver/drivers/power/amt.py\", line 170, in _run\n raise PowerActionError(\nprovisioningserver.drivers.power.PowerActionError: Failed to run command: ('amttool', '10.6.2.1', 'info') with error: Can't locate SOAP/Lite.pm in @INC (you may need to install the SOAP::Lite module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /snap/maas/36889/usr/bin/amttool line 4.\nBEGIN failed--compilation aborted at /snap/maas/36889/usr/bin/amttool line 4.\n\n"

Related branches

Revision history for this message
Rafael (rvallel) wrote :

Actually it seems to be a Perl module...
And it seems to be there, if I search in the tree.
For some reason is not finding it. perhaps missing dependencies, or incorrect paths

summary: - Missing Python module in MAAS snap, required for AMT power
+ Missing module in MAAS snap, required for AMT power
Revision history for this message
Rafael (rvallel) wrote (last edit ):

this may be a duplicate of other AMT bugs like #2056740, I am not sure. They seem to be dealing with flags and other problems

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

as power-drivers are now called by the agent, we need to set `PERL5LIB` in the `run-maas-agent` script also

Changed in maas:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Alexsander de Souza (alexsander-souza)
milestone: none → 3.6.0
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.