Description of problem: I saw a ticket get opened today in the eng-ops queue: https://engineering.redhat.com/rt/Ticket/Display.html?id=189374 ------------------------------------------------------------------------- Beaker has automatically marked system intel-s3ea2-02.rhts.eng.bos.redhat.com <https://beaker.engineering.redhat.com/view/intel-s3ea2-02.rhts.eng.bos.redhat.com> as broken, due to: Power command failed: ValueError: Power script /etc/beaker/power-scripts/apc_snmp failed after 5 attempts with exit status 1: Failed: Unrecognised action 'interrupt' Please use '-h' for usage Please investigate this error and take appropriate action. Power type: apc_snmp Power address: pdu-l1a1.mgmt.lab.eng.bos.redhat.com Power id: 4 5 ------------------------------------------------------------------------- interrupt is only valid for ipmi I believe. It should not be enabled for other power types. Regards, Jeff
I saw a similar error for a system using ipmilan: ------------------------------------------------------------------------- Beaker has automatically marked system sun-x4600m2-01.rhts.eng.bos.redhat.com <https://beaker.engineering.redhat.com/view/sun-x4600m2-01.rhts.eng.bos.redhat.com [Open URL]> as broken, due to: Power command failed: ValueError: Power script /usr/lib/python2.6/site-packages/bkr/labcontroller/power-scripts/ipmilan failed after 5 attempts with exit status 1: interrupt not supported by ipmilan Please investigate this error and take appropriate action. Power type: ipmilan Power address: sun-x4600m2-01-ilom.rhts.eng.bos.redhat.com Power id: None -------------------------------------------------------------------------
We're deliberately trying to avoid Beaker of having any special knowledge of which commands are supported for different power scripts (system administrators are supposed to be able to add new power types with full functionality without needing to update the Beaker server software). At the moment, sysadmins can add new power types without even needing to touch the Beaker *database*. However, an unsupported command should *not* lead to systems being marked Broken - I have updated the issue title accordingly. Unfortunately, there's no standard mechanism for power scripts to distinguish between "command is not recognised" and "command was recognised, it just didn't work" when reporting a failure back to Beaker. Perhaps it would be possible to blacklist certain commands for certain power types. That way, the existing practices wouldn't need to change, but sysadmins would have a clear way to respond to the above kind of error: add the offending power command (the bit after the final trailing "/") to the blacklist for "interrupt".
Dan Callaghan pointed out I was mistaken above, and new power types *do* need to be registered in the database before they can be used. That means this can be implemented by either adding a simple flag to each power type to indicate whether or not it supports the "interrupt" command, or adding a more general whitelist feature to indicate the set of supported commands for each power type (with "interrupt" excluded from the whitelist by default).
Running the interrupt option still results in broken machines. Is there anyway to move this from pm-hss: Beaker‑backlog to the next release? Thanks, Jeff
Dear Jeff, we thought about a quick fix for this bug, which might all it takes and can be out with the next bug fix release (weeks, not months). Supporting a generic list of what commands of each power type can support is a fairly bigger task to implement and might not be necessary here.
Patch available on gerrit: https://gerrit.beaker-project.org/#/c/4394/
Steps to reproduce: 1. Find a system which uses some power type *other than* ipmitool (for example lpar, virsh, zvm, ...) 2. Send "interrupt" command from the power tab on the system page or: bkr system-power --action=interrupt $fqdn Actual results: The interrupt command fails because the power script does not support it, and then the system is marked Broken. Expected results: The interrupt command fails but the system should not be marked Broken, it should stay Automated.
Beaker 21.1 has been released.