[pve-devel] [PATCH ha-manager] watchdog-mux: Restore if guard for watchdog updates
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Jul 23 12:54:37 CEST 2025
In commit c26b474 the if condition was removed in favor of the if guard
on the higher level. However, this introduced functional change, the
watchdog now updates immediately after update_watchdog is set to 0,
potentially causing fencing after x+1 seconds instead of x seconds. This
behavior is incorrect because updating the watchdog after declaring no
more updates makes no logical sense.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
src/watchdog-mux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/watchdog-mux.c b/src/watchdog-mux.c
index 889cea2..272060d 100644
--- a/src/watchdog-mux.c
+++ b/src/watchdog-mux.c
@@ -280,8 +280,10 @@ int main(void) {
}
}
- if (ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0) == -1) {
- perror("watchdog update failed");
+ if (update_watchdog) {
+ if (ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0) == -1) {
+ perror("watchdog update failed");
+ }
}
continue;
--
2.47.2
More information about the pve-devel
mailing list