Prevent double-starting client on RHEL7 43/12443/3
authorJonathon Weiss <jweiss@mit.edu>
Thu, 10 Nov 2016 22:06:18 +0000 (17:06 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 25 Mar 2017 19:56:37 +0000 (15:56 -0400)
commitc666bfee8848183ccbc566c9e0fa019088e56505
tree86712b4638e276c17f20ce38db747ffd40e80780
parentd2721be299c124d76b611ab2980c51be148fa1a7
Prevent double-starting client on RHEL7

On RHEL7 if the AFS client is stopped with 'service openafs-client
stop', but that fails for some reason (most commonly because some
process has a file or directory in AFS open) systemd will decide that
the openafs-client is in a failed state when it is actually running.
If one then runs 'service openafs-client start' systemd will start a
new AFS client.  At this point AFS access will continue to work until
the functional AFS client is (successfully) stopped, at which point a
reboot is required to recover.

Have systemd check the status of 'fs sysname' before starting the
AFS client, so we avoid getting into a state that requires a reboot.

Change-Id: I28a5cca746823d69183ea5ce65c10e1725009c5c
Reviewed-on: https://gerrit.openafs.org/12443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/packaging/RedHat/openafs-client.service