kontron / python-ipmi

A pure python IPMI library
GNU Lesser General Public License v2.1
187 stars 75 forks source link

Occasional hang when calling IPMI functions #169

Open solemnwarning opened 5 months ago

solemnwarning commented 5 months ago

Hello,

I'm not sure if this is a library bug or something I'm doing wrong, but in one of my projects the IPMI library sometimes hangs within calls to ipmi.get_chassis_status() and ipmi.session.establish() in the ipmiwake() function here.

The BMC in question is on a SuperMicro server and the machine is shut down and booted on demand, which may or may not be a contributing factor to the hang (I've not been able to figure out how to trigger it - it just happens sometimes on a machine which is running this code periodically).

Any ideas, or things I can do to try narrowing the scope of the bug down?

Thanks

canteuni commented 4 months ago

Hello,

I'm not the maintainer of this library, just an occasional contributor, but maybe I can help you.

There is a small possibility that the BMC is "overwhelmed" and can't process your get_chassis_status() command if it is currently processing a "power on" command. You can try to reproduce the issue by issuing get_chassis_status() while spamming "power on" or "power off" commands but I'm not sure (and perhaps the server won't be happy to be turned on and off multiples times like this).

Other ideas that come to my mind to narrow the scope of the bug :