public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH ha-manager] watchdog-mux: Restore if guard for watchdog updates
@ 2025-07-23 10:54 Maximiliano Sandoval
  2025-07-23 10:58 ` Maximiliano Sandoval
  2025-07-29 19:38 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-07-23 10:54 UTC (permalink / raw)
  To: pve-devel

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-29 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-23 10:54 [pve-devel] [PATCH ha-manager] watchdog-mux: Restore if guard for watchdog updates Maximiliano Sandoval
2025-07-23 10:58 ` Maximiliano Sandoval
2025-07-29 19:38 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal