patroni.watchdog.linux module¶
-
class
patroni.watchdog.linux.
LinuxWatchdogDevice
(device: str)¶ Bases:
patroni.watchdog.base.WatchdogBase
-
DEFAULT_DEVICE
= '/dev/watchdog'¶
-
property
can_be_disabled
¶ Returns True when watchdog will be disabled by calling close(). Some watchdog devices will keep running no matter what once activated. May raise WatchdogError if called without calling open() first.
-
classmethod
from_config
(config: Dict[str, Any]) → patroni.watchdog.linux.LinuxWatchdogDevice¶
-
get_support
() → patroni.watchdog.linux.WatchdogInfo¶
-
property
is_healthy
¶ Returns False when calling open() is known to fail.
-
property
is_running
¶ Returns True when watchdog is activated and capable of performing it’s task.
-
-
class
patroni.watchdog.linux.
TestingWatchdogDevice
(device: str)¶ Bases:
patroni.watchdog.linux.LinuxWatchdogDevice
Converts timeout ioctls to regular writes that can be intercepted from a named pipe.
-
get_support
() → patroni.watchdog.linux.WatchdogInfo¶
-
set_timeout
(timeout: int) → None¶ Set the watchdog timer timeout.
- Parameters
timeout – watchdog timeout in seconds
-
timeout
= 60¶
-