HomeClusterLabs Projects

Fix: tools: Correct sec vs. msec discrepancy in stonith_admin.

Description

Fix: tools: Correct sec vs. msec discrepancy in stonith_admin.

There are three understandings of time here. stonith_admin wants
seconds on the command line and stores timeouts and tolerances in
seconds. The tool API wants to get those values in milliseconds. The
stonith_t commands also want seconds.

Right now, the API converts its parameters from milliseconds to seconds.
However, stonith_admin is not passing the API milliseconds. It's
directly passing what it gets from the command line, which is seconds.
When the timeout values finally make it to the stonith_t commands,
they've effectively been divided down to zero.

This patch corrects the problem by continuing to store timeouts in
seconds in stonith_admin, but multiplying them by 1000 to make them
milliseconds before passing to the API. An alternate fix would be to
have stonith_admin store milliseconds instead, removing one translation.

Details

Provenance
clumensAuthored on Jan 9 2020, 2:36 PM
Parents
rPcb0a8c542ba9: Merge pull request #1969 from wferi/master
Branches
Unknown
Tags
Unknown

Event Timeline