Bug 1462200

Summary: glusterd status showing failed when it's stopped in RHEL7
Product: [Community] GlusterFS Reporter: Gaurav Yadav <gyadav>
Component: glusterdAssignee: Gaurav Yadav <gyadav>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: amukherj, bkunal, bsrirama, bugs, cblum, pasik, ppai, rhs-bugs, steven, storage-qa-internal, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.12.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1384762 Environment:
Last Closed: 2017-09-05 17:34:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1384762    

Comment 1 Worker Ant 2017-06-18 17:55:34 UTC
REVIEW: https://review.gluster.org/17559 (glusterd.service (systemd), shows "Active failed" when gd in stop state) posted (#1) for review on master by Gaurav Yadav (gyadav)

Comment 2 Worker Ant 2017-06-19 09:33:06 UTC
REVIEW: https://review.gluster.org/17559 (glusterd.service (systemd), shows "Active failed" when gd in stop state) posted (#2) for review on master by Gaurav Yadav (gyadav)

Comment 3 Worker Ant 2017-06-19 10:14:20 UTC
REVIEW: https://review.gluster.org/17559 (glusterd.service (systemd): Detect graceful service shutdown) posted (#3) for review on master by Gaurav Yadav (gyadav)

Comment 4 Worker Ant 2017-06-19 10:20:28 UTC
REVIEW: https://review.gluster.org/17559 (glusterd.service (systemd), shows "Active failed" when gd in stop state) posted (#4) for review on master by Gaurav Yadav (gyadav)

Comment 6 Atin Mukherjee 2017-06-19 12:41:36 UTC
Description of problem:
=======================
glusterd status showing "Active: failed" when it's stopped in RHEL7

~]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2016-10-14 10:07:13 IST; 1s ago
  Process: 19087 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 19088 (code=exited, status=15)
   CGroup: /system.slice/glusterd.service
           └─5830 /sbin/rpc.statd



Version-Release number of selected component (if applicable):
=============================================================
glusterfs-3.11

How reproducible:
=================
Always


Steps to Reproduce:
====================
1. Have glusterfs 3.11 installed on RHEL7 node
2. Start the glusterd  if it's not running // systemctl start  glusterd
3. Stop the glusterd // systemctl stop glusterd
4. Check the status // systemctl status glusterd ---> will show "Active: Failed"

Actual results:
===============
glusterd status showing failed when it's stopped in  RHEL7 


Expected results:
=================
Status should show Inactive / Not running when it's stopped

Comment 7 Worker Ant 2017-06-19 16:06:05 UTC
COMMIT: https://review.gluster.org/17559 committed in master by Atin Mukherjee (amukherj) 
------
commit 52d0886cfbcdfd69fa0cac0a6d51cd8811d8c6d7
Author: Gaurav Yadav <gyadav>
Date:   Sun Jun 18 23:10:57 2017 +0530

    glusterd.service (systemd), shows "Active failed" when gd in stop state
    
    While doing cleanupandexit glusterd was handling the signal SIGTERM which
    is clean exit but systemd treats it as failure being a non-zero value.
    
    With this fix dependency "SuccessExitStatus " has been added
    in glusterd.service which takes care of service stop properly.
    
    Signed-off-by: Gaurav Yadav <gyadav>
    
    Change-Id: Ie5216722632a245f787fd69bfbbf8d0f0068bccb
    BUG: 1462200
    Reviewed-on: https://review.gluster.org/17559
    Tested-by: Gaurav Yadav <gyadav>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Prashanth Pai <ppai>

Comment 8 Shyamsundar 2017-09-05 17:34:18 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.12.0, please open a new bug report.

glusterfs-3.12.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/