Skip to content

Refactor: libstonithd: Clean up stonith__watchdog_fencing_enabled_for_node_api() - #4155

Open
nrwahl2 wants to merge 9 commits into
ClusterLabs:mainfrom
nrwahl2:nrwahl2-fencing_refactor
Open

Refactor: libstonithd: Clean up stonith__watchdog_fencing_enabled_for_node_api()#4155
nrwahl2 wants to merge 9 commits into
ClusterLabs:mainfrom
nrwahl2:nrwahl2-fencing_refactor

Conversation

@nrwahl2

@nrwahl2 nrwahl2 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

But I don't bother changing the incredibly long function name in this PR.

nrwahl2 added 9 commits July 24, 2026 18:32
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
It's guaranteed to return non-NULL.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
For readability. Also compare directly against NULL.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
"No watchdog device" doesn't seem worthy of a notice-level log message.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
...from stonith__watchdog_fencing_enabled_for_node_api() to
stonith__watchdog_fencing_enabled_for_node().

Also, the only other caller that passes a non-NULL stonith argument
guarantees that it's already connected. So move the connect() call to
the wrapper too.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
@nrwahl2
nrwahl2 requested review from clumens and gao-yan July 26, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant