Ownership of /dev/watchdog and soft dog dmoule

Hi,

running openSUSE Leap 15.4. To support Patroni for PostgreSQL, I need to setup a watchdog. For this I need to load the “softdog” kernel module at boot time and also make sure that /dev/watchdog has the “postgres” owner.

I managed to get the “softdog” module loaded at boot time with:
echo “softdog” >/etc/modules-load.d/softdog.conf

Then I did “chown postgres /dev/watchdog”, started Patroni and PostgreSQL and it worked beautifully. However, after a reboot the module was loaded but the device file’s owner was reset to “root”. No need to say that Patroni complained.

What did I do wrong? Or how is this done correctly?

Patroni watchdog doc:
https://patroni.readthedocs.io/en/latest/watchdog.html#setting-up-software-watchdog-on-linux

Thanks in advance,
Paul

echo 'ACTION!="remove", KERNEL=="watchdog*", OWNER="postgres"' > /etc/udev/rules.d/watchdog.rules

Hi arvidjaar,

this did the trick. Thank you so much for it. :grinning:

Do you know by any chance if it works the same on a SLES?

Cheers,
Paul

Yes, it does. And even on Fedora, RHEL, Debian and Ubuntu :slight_smile:

That’s great.

Thank you very much again. :grinning: