all lists on 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

* Re: [pve-devel] [PATCH ha-manager] watchdog-mux: Restore if guard for watchdog updates
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-07-23 10:58 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

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

I forgot to mention that this change was

Reported-by: Friedrich Weber <f.weber@proxmox.com>

-- 
Maximiliano


_______________________________________________
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

* [pve-devel] applied: [PATCH ha-manager] watchdog-mux: Restore if guard for watchdog updates
  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 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2025-07-29 19:38 UTC (permalink / raw)
  To: pve-devel, Maximiliano Sandoval

On Wed, 23 Jul 2025 12:54:37 +0200, Maximiliano Sandoval wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] watchdog-mux: Restore if guard for watchdog updates
      commit: 1700789e47b516d560e03aade6d6a49a425a8789


_______________________________________________
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal