diff --git a/glusterfs.spec b/glusterfs.spec index 9478f4b..9c710e2 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -765,6 +765,9 @@ if [ $1 -ge 1 ]; then fi %changelog +* Sun Oct 27 2013 Niels de Vos +- Correctly start+stop glusterfsd.service (#1022542) + * Sat Oct 26 2013 Niels de Vos - add base-port config option to /etc/glusterd/glusterd.vol (#1023653) diff --git a/glusterfsd.service b/glusterfsd.service index 4454ad8..e25405d 100644 --- a/glusterfsd.service +++ b/glusterfsd.service @@ -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