Bug 988946 - 'systemd stop glusterd' doesn't stop all started gluster daemons
'systemd stop glusterd' doesn't stop all started gluster daemons
Status: CLOSED NOTABUG
Product: GlusterFS
Classification: Community
Component: core (Show other bugs)
3.4.0
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: GlusterFS Bugs list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-26 14:33 EDT by Richard
Modified: 2016-10-25 14:56 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-16 11:39:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard 2013-07-26 14:33:41 EDT
Description of problem: When stopping gluster with "systemctl stop glusterd" some daemons are still running.


Version-Release number of selected component (if applicable):
glusterfs-fuse-3.4.0-3.fc18.x86_64
glusterfs-3.4.0-3.fc18.x86_64
glusterfs-api-3.4.0-3.fc18.x86_64
glusterfs-server-3.4.0-3.fc18.x86_64

Steps to Reproduce:
1. install the above gluster release
2. setup a new volume
3. stop gluster with "systemctl stop glusterd"
4. check ps listing for gluster daemons.

Actual results: some daemons are still running:

root     13082     1  0 19:29 ?        00:00:00 /usr/sbin/glusterfsd -s 172.16.0.1 --volfile-id md0.172.16.0.1.mnt-md0-gluster -p /var/lib/glusterd/vols/md0/run/172.16.0.1-mnt-md0-gluster.pid -S /var/run/10e071bf2813a6d10cf066b8a9888bdf.socket --brick-name /mnt/md0/gluster -l /var/log/glusterfs/bricks/mnt-md0-gluster.log --xlator-option *-posix.gl sterd-uuid=1c2be7da-a38a-4d4c-aa71-35769c871699 --brick-port 49152 --xlator-option md0-server.listen-port=49152
root     13175     1  0 19:29 ?        00:00:00 /usr/sbin/glusterfs -s localhost --volfile-id gluster/nfs -p /var/lib/glusterd/nfs/run/nfs.pid -l /var/log/glusterfs/nfs.log -S /var/run/00b1ac0b288ac716fe0d47e81ae3f0b6.socket

Expected results: all daemons should have exited including the NFS ones.

Additional info: This worked ok in the 3.4 beta


Additional info:
Comment 1 Joe Julian 2013-08-08 08:28:04 EDT
-1

This change was by design. Having the ability to restart the management daemon without interrupting service is useful.
Comment 2 Richard 2013-08-08 08:40:45 EDT
yes, but I want to run "service glusterd stop" and "service glusterfsd stop" and have no gluster processes running at all. I will have to re-test and double check that it actually does this as things like the NFS component never seem to get killed either.
Comment 3 Richard 2013-08-23 10:53:34 EDT
Just to confirm that running a stop command on Gluster still leaves daemons running in the background. I can understand the requirement for the daemons to stay running during a restart, but to not have them stop at shutdown seems a bit odd.
Rich
Comment 4 Kaleb KEITHLEY 2014-10-16 11:39:40 EDT
AFAIK systemd/systemctl does not have a way to differentiate between stopping for a software upgrade and stopping due to shutdown.

If you want to stop the glusterfsd daemons before a shutdown, run `gluster volume stop $volname`. Although there's generally no harm in having the glusterfsd daemons remain running.

I'm closing this defect as CLOSED/NOTABUG. if you disagree, feel free to reopen it and change the version to mainline, as this continues to be the 'as designed' behavior.
Comment 5 Pasi Karkkainen 2016-09-20 07:18:11 EDT
So what is the correct way to stop *all* the glusterfs daemons on a given server, to take the server down for maintenance, in the correct way? 

I don't want to stop the gluster volumes, other servers will continue to serve them..

Thanks.
Comment 6 Steven Barre 2016-10-25 14:56:46 EDT
(In reply to Pasi Karkkainen from comment #5)
> So what is the correct way to stop *all* the glusterfs daemons on a given
> server, to take the server down for maintenance, in the correct way? 
> 
> I don't want to stop the gluster volumes, other servers will continue to
> serve them..
> 
> Thanks.

I just started digging into this issue myself and found https://bugzilla.redhat.com/show_bug.cgi?id=1022542 which points to enabling the service glusterfsd.service, which when stopped during a shutdown will properly stop all the other gluster processes.

This avoids a hard kill, causing a timeout to occur on other servers.

Note You need to log in before you can comment on or make changes to this bug.