HomeClusterLabs Projects

Refactor: libcrmcommon: Improve pcmk__get_sbd_watchdog_timeout() rc
5045875371d0Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor: libcrmcommon: Improve pcmk__get_sbd_watchdog_timeout() rc

pcmkaccept_remote_connection() and
pcmk
auto_stonith_watchdog_timeout() already ignore negative and zero
values.

The only other caller is pcmk__valid_stonith_watchdog_timeout(), in the
else block. At that point, st_timeout must be positive.

  • If it had been negative, then it was set to a positive value in the earlier "if (st_timeout < 0)" block, via assignment from pcmk__auto_stonith_watchdog_timeout()
  • If it had been zero, it would have hit the "if (st_timeout == 0)" block in this if-else chain and would not have entered the else block.

So if sbd_timeout had been negative there prior to this commit, then
"st_timeout < sbd_timeout" still would not have been true, and we
wouldn't have exited.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 20 2025, 10:39 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.