Bug 988946 - 'systemd stop glusterd' doesn't stop all started gluster daemons
Summary: 'systemd stop glusterd' doesn't stop all started gluster daemons
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.4.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: GlusterFS Bugs list
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-26 18:33 UTC by Richard
Modified: 2018-12-09 17:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-16 15:39:40 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Richard 2013-07-26 18:33:41 UTC
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 12:28:04 UTC
-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 12:40:45 UTC
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 14:53:34 UTC
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 15:39:40 UTC
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 11:18:11 UTC
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 18:56:46 UTC
(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.