Improve glusterfsd.service to start and stop successfully

Resolves: 1022542
This commit is contained in:
Niels de Vos 2013-10-27 12:21:17 +01:00
parent 81a6a069c4
commit 475b6a9a87
2 changed files with 12 additions and 5 deletions

View File

@ -765,6 +765,9 @@ if [ $1 -ge 1 ]; then
fi
%changelog
* Sun Oct 27 2013 Niels de Vos <ndevos@redhat.com> - 3.4.1-3
- Correctly start+stop glusterfsd.service (#1022542)
* Sat Oct 26 2013 Niels de Vos <ndevos@redhat.com>
- add base-port config option to /etc/glusterd/glusterd.vol (#1023653)

View File

@ -1,12 +1,16 @@
[Unit]
Description=GlusterFS an clustered file-system server
Description=GlusterFS brick processes (stopping only)
After=network.target glusterd.service
[Service]
Type=forking
PIDFile=/run/glusterfsd.pid
LimitNOFILE=65536
ExecStart=/usr/sbin/glusterfsd -p /run/glusterfsd.pid
Type=oneshot
# glusterd starts the glusterfsd processed on-demand
# /bin/true will mark this service as started, RemainAfterExit keeps it active
ExecStart=/bin/true
RemainAfterExit=yes
# if there are no glusterfsd processes, a stop/reload should not give an error
ExecStop=/bin/sh -c "/bin/killall --wait glusterfsd || /bin/true"
ExecReload=/bin/sh -c "/bin/killall -HUP glusterfsd || /bin/true"
[Install]
WantedBy=multi-user.target