Automating control of a PDU

Automating tests on physical hardware typically relies on a method to perform an automated hard reset. This functionality can also allow test labs to keep devices powered off between test runs.

lavapdu

(This package is likely to be renamed after the Jessie release as although it was developed to assist with lava-dispatcher, it is not specific to LAVA or any particular automation framework.)

https://git.linaro.org/lava/lavapdu.git

lavapdu-daemon 0.0.4 has changed behaviour and now needs the configuration file to specify the driver to use for your PDU. (Previous versions tried to guess this information from the interface but this proved to be unreliable.) Check the /var/log/lavapdu-runner.log logfile to ensure that the driver specified is working with your PDU and restart the lavapdu-runner daemon when changing the configuration file.

Note that /etc/lavapdu/lavapdu.conf is in JSON format, use http://www.jsonlint.com to verify the syntax.

sudo service lavapdu-runner restart

Setting the logging level to DEBUG will help you see what the runner is doing - set the level back to INFO once the PDU is working. Using the telnet interface, check the System information. Typically there will be a Model string in the About information - there may also be a model number on the base of the PDU itself.

If your PDU is not listed and a known driver works, add the information here.

Manufacturer

Model

PDU driver

APC

AP9606

apc9218

If your PDU does not work, you can file a bug but without physical access to the hardware, it will not be possible for upstream to provide a driver - only assistance in writing a driver yourself.