chaos / powerman

cluster power control
GNU General Public License v2.0
43 stars 19 forks source link

redfishpower: support message timeout config #186

Closed chu11 closed 6 months ago

chu11 commented 6 months ago

Problem: The message timeout is currently hard coded to 5 seconds, which may be too short or long on some systems.

Support a new --message-timeout option to support configuration of the message timeout.

garlick commented 6 months ago

If this ends up being device specific, would it make sense to have it be able to be set in the device file instead of a command line option?

chu11 commented 6 months ago

If this ends up being device specific, would it make sense to have it be able to be set in the device file instead of a command line option?

I thought about that. The timeout is mostly associated with a connection timeout or a DNS resolve timeout. So I figure it's mostly cluster/environment specific and not device specific.

garlick commented 6 months ago

Tests?

chu11 commented 6 months ago

Tests?

B/c the value is passed to libcurl can't test "for real" in simulated mode. Could add a test just to make sure the option is parsed and doesn't segfault?

garlick commented 6 months ago

Maybe in test mode, redfishpower could print its optional values to stderr and a test could check them?

chu11 commented 6 months ago

re-pushed, adding a tiny bit of coverage for the new command line option, and a few older options.