From 4c2cfd2ed029ada2ef11d2a7c31cdc19660182ec Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Fri, 7 Jul 2017 09:20:29 -0500 Subject: [PATCH] Use -nofork for bosserver in openafs-fileserver.service So that we can use Type=simple. This fixes an issue where systemd would stop tracking us after a rebozo event (like weekly restarts or bos restart -bosserver), since after re-exec() we also re-daemon(), and the parent process (which is the one systemd is tracking) exits cleanly. That's taken as a signal to shut things down with the ExecStop command of bos shutdown, which works as intended and leaves things stopped. This slightly increases the window between when systemd thinks we are started and ready to serve traffic and the time when we are actually ready to serve traffic (now systemd thinks we're ready at process start, versus when the parent exits), but that difference is just argument parsing, loading up the bnode types, creating dirs and switching to them. It doesn't include starting up Rx or the child processes for the configured bnodes. Change-Id: I8d8665e529ecd8f679b5f2c697991333f6d1a7a6 --- debian/changelog | 2 ++ debian/openafs-fileserver.service | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ba3d06e81..843b1e315 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ openafs (1.6.21-1) UNRELEASED; urgency=medium thread exhaustion during CPS recalculation. - Avoid a potential 100ms transmit delay in RX when the peer's receive window advances. + * Switch openafs-fileserver.service to Type=simple and pass -nofork to + bosserver. (Closes: #865962) -- Benjamin Kaduk Thu, 06 Jul 2017 09:19:27 -0500 diff --git a/debian/openafs-fileserver.service b/debian/openafs-fileserver.service index 43b2bf8cd..aba59a32c 100755 --- a/debian/openafs-fileserver.service +++ b/debian/openafs-fileserver.service @@ -4,9 +4,9 @@ Wants=network-online.target After=network.target network-online.target local-fs.target [Service] -Type=forking +Type=simple EnvironmentFile=-/etc/default/openafs-fileserver -ExecStart=/usr/sbin/bosserver $DAEMON_ARGS +ExecStart=/usr/sbin/bosserver -nofork $DAEMON_ARGS ExecStop=/usr/bin/bos shutdown localhost -wait -localauth [Install] -- 2.39.5