[pve-devel] watchdog-mux.service stop, trigger restart

Alexandre DERUMIER aderumier at odiso.com
Tue Dec 15 12:29:46 CET 2015

seem that it's already implemented in watchdog-mux

static void 
    if (watchdog_fd != -1) {
        if (write(watchdog_fd, "V", 1) == -1) {
            perror("write magic watchdog close");
        if (close(watchdog_fd) == -1) {
            perror("write magic watchdog close");

    watchdog_fd = -1;

Don't known why it doesn't seem to work for me.

(If I launch a  loop with "echo V > /dev/watchdog" ,it's working fine, watchdog is stopped)

----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 15 Décembre 2015 12:07:16
Objet: [pve-devel] watchdog-mux.service stop, trigger restart


i'm seeing that stopping the watchdog-mux service cleaning, trigger the watchdog reset. 

I think this could happen on package update (windows size of 10s is really short) 

>From the watchdog doc, 


it's possible to implement "Magic Close feature" 

If a driver supports "Magic Close", the driver will not disable the 
watchdog unless a specific magic character 'V' has been sent to 
/dev/watchdog just before closing the file. If the userspace daemon 
closes the file without sending this special character, the driver 
will assume that the daemon (and userspace in general) died, and will 
stop pinging the watchdog without disabling it first. This will then 
cause a reboot if the watchdog is not re-opened in sufficient time." 

pve-devel mailing list 
pve-devel at pve.proxmox.com 

More information about the pve-devel mailing list