Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1255461 - [RFE] Add AMT support as a power type
Summary: [RFE] Add AMT support as a power type
Keywords:
Status: NEW
Alias: None
Product: Beaker
Classification: Community
Component: lab controller
Version: 20
Hardware: Unspecified
OS: Unspecified
medium
unspecified vote
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On: 1296201 1513514
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-20 15:51 UTC by Andrei Stepanov
Modified: 2019-04-01 16:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1545843 None CLOSED Enhancement: etherwake and apc_snp_then_etherwake power types should support ssh to intermediary server to issue the eth... 2019-04-01 10:52:04 UTC

Internal Links: 1545843

Description Andrei Stepanov 2015-08-20 15:51:06 UTC
Many motherboards have integrated AMT.

Moreover, all Thinkpads have AMT.

With ATM it is possible to control power remotely.

No matter what is the current laptop's state: on, off, ... it is possible to take control over it using AMT.

Even OS kernel get panic you still can take control over it.

Links:

General info: http://linux.die.net/man/7/amt-howto [Open URL]

Implementations:
https://github.com/schnoddelbotz/amtc [Open URL] -- this one even has RPM packages.

http://iranzo.github.io/blog/2015/05/01/intel-amt-on-linux-for-remote-control-slash-fencing/ [Open URL]

This feature give us an ability to attach to Beaker any thinkpad as an fully automated instance.

There is cmdline utility, that will allow extend Beaker's power control management very easy.

Thanks.

Comment 2 Dan Callaghan 2015-08-21 04:52:48 UTC
We have some AMT-capable hardware in our lab here so this should be doable.

I see there is a client "amttool" available in Fedora and EPEL (part of the "amtterm" package), that would be the best starting point.

Comment 3 Andrei Stepanov 2015-08-21 08:52:26 UTC
Please keep in mind, that there are two version of AMT:
$ amtc

  -5          for AMT 5.0 hosts
  -d          for AMT 9.0+ hosts - use WS-Man/DASH


For me it works only with AMT 9.0:

AMT 9.0

$ amtc -d -R astepano
POWERRESET astepano        OS:noscan  AMT:08 HTTP:200 OK 


OLD AMT:

$ amtc  -R astepano
POWERRESET astepano        OS:noscan  AMT:16 HTTP:404 No error


Maybe it is cool to have two power control scripts for each AMT versions.




Please do timeout 10 sec.... just for case....
  -t(imeout)  in seconds, for amt and tcp scans [5]





amtc has very useful debugging output :

amtc -vvv -R astepano

$ amtc -vvv -R astepano
* About to connect() to astepano port 16992 (#0)
*   Trying 10.34.130.181...
* Connected to astepano (10.34.130.181) port 16992 (#0)
* Server auth using Digest with user 'admin'
> POST /RemoteControlService HTTP/1.1
User-Agent: amtc (libcurl)
Host: astepano:16992
Accept: */*
SOAPAction: "http://schemas.intel.com/platform/client/RemoteControl/2004/01#RemoteControl"
Content-Type: text/xml; charset=utf-8
Content-Length: 0

< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="Digest:0D1E0000000000000000000000000000", nonce="eyiuChAlAAC+/MewTZC0nz7jmJ+KyH1V",stale="false",qop="auth"
< Content-Type: text/html
< Server: Intel(R) Active Management Technology 9.0.31
< Content-Length: 689
< Connection: close
< 
* Closing connection 0
* Issue another request to this URL: 'http://astepano:16992/RemoteControlService'
* About to connect() to astepano port 16992 (#1)
*   Trying 10.34.130.181...
* Connected to astepano (10.34.130.181) port 16992 (#1)
* Server auth using Digest with user 'admin'
> POST /RemoteControlService HTTP/1.1
Authorization: Digest username="admin", realm="Digest:0D1E0000000000000000000000000000", nonce="eyiuChAlAAC+/MewTZC0nz7jmJ+KyH1V", uri="/RemoteControlService", cnonce="ICAgICAgICAgICAgICAgICAgICAgICAgICA3MDM3NTc=", nc=00000001, qop=auth, response="022eb6836936f95506ca8dd42c185ec0"
User-Agent: amtc (libcurl)
Host: astepano:16992
Accept: */*
SOAPAction: "http://schemas.intel.com/platform/client/RemoteControl/2004/01#RemoteControl"
Content-Type: text/xml; charset=utf-8
Content-Length: 546

* upload completely sent off: 546 out of 546 bytes
< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Server: Intel(R) Active Management Technology 9.0.31
< Transfer-Encoding: chunked
< Connection: close
< 
* Closing connection 1
-POWERRESET       astepano AMT:0016 HTTP:404 No error






$ rpm -qi amtc
Name        : amtc
Version     : 0.8.5~alpha3
Release     : 1.el7.centos
Architecture: x86_64
Install Date: Thu 20 Aug 2015 05:18:12 PM CEST
Group       : Applications/System
Size        : 56624
License     : CC BY 3.0
Signature   : (none)
Source RPM  : amtc-0.8.5~alpha3-1.el7.centos.src.rpm
Build Date  : Tue 05 May 2015 12:17:15 AM CEST
Build Host  : localhost
Relocations : (not relocatable)
URL         : https://github.com/schnoddelbotz/amtc
Summary     : Threaded remote power management commandline tool for intel vPro/AMT&DASH hosts
Description :
amtc is a simple command line tool, implemented in C, that can quickly
control PCs that have out-of-band remote power management capabilities
in the form of intel vPro/AMT or AMD DASH. amtc's key focus is not
to support all SOAP operations AMT/DASH is aware of -- instead
it concentrates only on vital OOB operations (on/off/reset/...).
amtc can be combined with amtc-web to have a fluffy web GUI
for power management tasks and power state logging/graphing.
Combining amtc (or amtc-web) with cron makes scheduled power management.

Comment 4 Andrei Stepanov 2016-10-24 10:05:35 UTC
Any progress?
Intel AMT is quite popular now.

Comment 5 Jiri Hladky 2018-02-23 08:46:10 UTC
We are trying to add Thinkpad W541 Lenovo laptop to the Beaker. The only option right now is to power off the laptop by switching off the power with PDU and to power the laptop ON we have to use WAKE ON LAN. WAKE ON LAN is most difficult part as WOL does not support the routing. It means we have to place the laptop in the main lab in another building and not to our minilab. 

Having AMT support in Beaker would solve all these issues. Therefore I vote for adding this feature.

Thanks a lot!
Jirka

Comment 6 Jiri Hladky 2018-02-26 23:25:16 UTC
I have developed amtc Beaker agent. It's located here:

http://git.app.eng.bos.redhat.com/git/kernel_perf_cpumem.git/tree/amtc

Comment 7 Jiri Hladky 2018-04-04 09:20:54 UTC
Hi Roman,

could we add amtc Beaker agent to the Beaker upstream project? 

Thanks a lot!
Jirka

Comment 8 Roman Joost 2018-04-05 02:53:59 UTC
Dear Jiri,

I'm happy to include it, yet there are a few questions I haven't found answers yet:

* I think currently our power scripts are not automatically tested, so not sure how we can make sure that these additions don't regress
* we currently have no capacity of actively working on this to include the patch due to higher prioritised work
* not sure how we deal with power script dependencies. It seems we ship power scripts the Beaker package does not exclusively depends upon (e.g. virsh).

I guess step 1 would be to see how the labs team get it working. If that's without problems I'm happy to include it. Furthermore, I'll have a chat with Dan for input to my questions and the inclusion of the script.

TL;DR: Happy to include it with the precaution that we're currently flat out with work and it'll take a bit of time.

Comment 9 Jiri Hladky 2018-04-05 08:59:02 UTC
Hi Roman,

we are using this addition on 4 laptops on this Beaker server:

https://beaker.cluster-qe.lab.eng.brq.redhat.com

ad 1 - testing/regression concerns:
So far there it works just fine - if there will be an issue I will fix it and I will try to get the fix to the upstream as well. 

ad 2 - no capacity of actively working on this
It's done, I'm just asking to merge it to the upstream project under labcontroller/power-scripts/ directory

ad 3 - power script dependencies
Looking at 
https://github.com/beaker-project/beaker/tree/aec7458f5e93403f21e8f10550d5569324943a58/LabController/src/bkr/labcontroller/power-scripts
the majority of the scripts have dependencies. IMHO, it would be sufficient to add the dependencies to the documentation. In this case, the user just needs to install "amtc" from 
http://git.app.eng.bos.redhat.com/git/kernel_perf_cpumem.git/tree/amtc
There are pre-built binaries at
https://github.com/schnoddelbotz/amtc/releases

Thanks a lot!
Jirka

Comment 10 Tomas Klohna 🔧 2019-04-01 10:54:55 UTC
Hello Jiri, I'd like to ask what is your current status on using the AMTC after ~1 year and if the feature would still be considered so highly.


Note You need to log in before you can comment on or make changes to this bug.