DMTF / Redfish-Usecase-Checkers

This is a collection of python3 tools to exercise and validate common use cases for Redfish
Other
1 stars 6 forks source link

power_control.py fails to get Power State Check #40

Closed cb371j closed 4 years ago

cb371j commented 4 years ago

Testing on different server hardware, etc. power_control.py is successful at System Count, Reset Type Check, Reset Performed but fails at getting correct Power State Check; hardware set one: "ErrorMessages": [ "Power State Check: Self was not in the Off state after using GracefulShutdown as the reset type", "Power State Check: Self was not in the Off state after using ForceOff as the reset type"

hardware set two: "ErrorMessages": [ "Power State Check: System.Embedded.1 was not in the On state after using On as the reset type", "Power State Check: System.Embedded.1 was not in the On state after using ForceRestart as the reset type", "Power State Check: System.Embedded.1 was not in the On state after using PushPowerButton as the reset type"

billdodd commented 4 years ago

It may be that those services are not behaving as they should. For example, after sending GracefulShutdown to "hardware set one", the power state should be Off, but it wasn't according to the tool.

Can you try some of these reset commands on the target services using some other tool like curl, Postman, Redfish-Tacklebox, etc. and then check the power state to see if it is in the expected state?

mraineri commented 4 years ago

Based on the context of the ResetType parameter, there are expectations that the "PowerState" property will be updated accordingly after the reset operation.

For example, the description of GracefulShutdown says, "Shut down gracefully and power off." This would mean PowerState does not reflect the "power off" after the reset operation.

cb371j commented 4 years ago

power_control troubleshooting.docx

I ran rf_power_reset.py for each power_type and then ran ipmitool to confirm status. Most were immediate but a couple took about 30 seconds. The tests and results are in the attachment. There are 2 sets one for each hardware type. Both are successful with rf_power_reset.py and fail the state_check with power_control.py.

mraineri commented 4 years ago

Thanks for the info; I'll take a look at your debug data and see if I can figure out what's going on. The group thinks that there might need to be some delay required based on the reset type. For example "GracefulShutdown" might complete from the action perspective, but it might take some time for the system itself to actually shut down.