[pve-devel] [PATCH ha-manager v3 5/6] watchdog-mux: break out of loop when updates are disabled
Maximiliano Sandoval
m.sandoval at proxmox.com
Fri Jul 4 15:39:01 CEST 2025
Without this check, if nfds is zero, the `continue` statement right
before of the `break` will prevent from breaking out of the loop and
existing the process.
If a node does not have corosync quorum, then neither the lrm or crm
will update watchdog-mux and this the epoll_wait will timeout, hence
nfds is zero in this case. The only case where one could break free from
the loop without this commit is if the watchdog updates are stopped, but
soon after we regain quorum.
In the next commit, the if guards for update_watchdog in the inner guard
will be removed, this is done to simplify the review process.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
src/watchdog-mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/watchdog-mux.c b/src/watchdog-mux.c
index 11571ec..4e2bdc6 100644
--- a/src/watchdog-mux.c
+++ b/src/watchdog-mux.c
@@ -253,7 +253,7 @@ int main(void) {
goto err;
}
- if (nfds == 0) { // timeout
+ if (nfds == 0 && update_watchdog) { // timeout
// check for timeouts
if (update_watchdog) {
--
2.39.5
More information about the pve-devel
mailing list