nspawn: turn on watchdog logic for nspawn too
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Dec 2017 10:58:25 +0000 (11:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Dec 2017 11:34:46 +0000 (12:34 +0100)
It's a long-running daemon, and it's easy to enable, hence do it.

src/nspawn/nspawn.c
units/systemd-nspawn@.service.in

index 4b82345..f217def 100644 (file)
@@ -3642,6 +3642,8 @@ static int run(int master,
         if (r < 0)
                 return log_error_errno(r, "Failed to get default event source: %m");
 
+        (void) sd_event_set_watchdog(event, true);
+
         if (bus) {
                 r = sd_bus_attach_event(bus, event, 0);
                 if (r < 0)
index 3d35907..c3194d4 100644 (file)
@@ -21,6 +21,7 @@ KillMode=mixed
 Type=notify
 RestartForceExitStatus=133
 SuccessExitStatus=133
+WatchdogSec=3min
 Slice=machine.slice
 Delegate=yes
 TasksMax=16384