Intel AMT and MAAS : cannot manage power from MAAS?

Hello,

I’m trying to set up power management through Intel AMT on MAAS, and i’m hitting a wall. The check power, power on, power off commands do not work, but I’m sure AMT is enabled and functioning as using MeshCentral to perform such tasks just work.

I’m selecting :

  • Power type : Intel AMT
  • Power password : The Password for the AMT (the username is admin)
  • Power address : 10.0.0.190 (the address is obtained through the maas DHCP)

How to debug this ?

For information, MeshCentral tells me the version of the Intel ME are these one : v16.1.25, TLS

I’m on MAAS 3.4.0~rc1.

Also, a bit of log from maas :

2023-07-17 15:36:49 maasserver.websockets.handlers.machine: [critical] Failed to update power state of machine.
	Traceback (most recent call last):
	--- <exception caught here> ---
	  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
	    current.result = callback(  # type: ignore[misc]
	  File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 1174, in eb_unknown
	    failure.trap(UnknownPowerType, NotImplementedError)
	  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
	    self.raiseException()
	  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
	    raise self.value.with_traceback(self.tb)
	  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
	    current.result = callback(  # type: ignore[misc]
	  File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 1946, in _massageError
	    error.trap(RemoteAmpError)
	  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
	    self.raiseException()
	  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
	    raise self.value.with_traceback(self.tb)
	twisted.internet.defer.CancelledError:

Note : it seems meshcommander only works with the --tls flag, e.g. # ./meshcmd AmtFeatures --password Password1234! --host 10.0.0.190 --user admin --tls works but not # ./meshcmd AmtFeatures --password Password1234! --host 10.0.0.190 --user admin --tls , so maybe that’s related ?

Hi @Reventlov

I will check if we have machine with Intel AMT in order to give it a try.

Power management is done by Rack Controller and meanwhile I can recommend you to check /var/snap/maas/common/log/rackd.log if you have MAAS installed as a snap, or /var/log/maas/rackd.log if you have a deb installation.

You can inspect AMT power driver code here, under the hood MAAS is using amttool

Can you try using amttool directly, just to check that it actually works. It might be that version bundled with MAAS doesn’t work for your case.

I found this in the man page of amttool :

Note: Starting with AMT 9.0 Intel has removed support for the old SOAP protocol  which  is
used  by  amttool.  Only WS Management (added in AMT 3.0) is supported by recent machines.
You can use wsmancli (see http://openwsman.sf.net, your distro should have packages ready)
instead.

Related : https://bugs.launchpad.net/maas/+bug/1331214

And indeed, using directly amttool doesn’t give any result. But it seems there is some support of wsman in the packages too. I’ll try to debug it and report back.

Right, for AMT >= 9.0 it should use wsman according to this logic. Maybe _get_wsman_command should pass --tls as well? Or maybe something should be tweaked in the openwsman_client.conf