This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 836007

Summary: service glusterd status doesn't return non zero on stopped
Product: [Community] GlusterFS Reporter: purpleidea
Component: glusterdAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.3.0CC: amarts, gluster-bugs, nsathyan, purpleidea, thomas.oulevey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 13:40:35 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description purpleidea 2012-06-27 16:02:24 EDT
Description of problem:

service glusterd status is supposed to return a non zero value when the service is stopped. a number of facilities use this return code to decide if a service is running. This is a fairly easy fix and is fairly important too :)

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


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:

[root@brick3 ~]# service glusterd status
glusterd is stopped
[root@brick3 ~]# service glusterd status && echo true
glusterd is stopped
true
[root@brick3 ~]# 

Expected results:
[root@brick3 ~]# service glusterd status
glusterd is stopped
[root@brick3 ~]# service glusterd status && echo true
glusterd is stopped
[root@brick3 ~]# 

Additional info:
Example:
[root@ntp1 ~]# service ntpd status && echo true
ntpd is stopped
[root@ntp1 ~]#
Comment 1 Amar Tumballi 2012-07-11 02:07:54 EDT
> This is a fairly easy fix and is fairly important too :)

Thanks for filing the bug, we will look into it in some time, but if you have idea about how to fix, please send a patch.
Comment 2 Thomas Oulevey 2012-08-23 07:48:32 EDT
I submitted a patch:
http://review.gluster.org/#change,3847
Comment 3 Vijay Bellur 2012-08-28 05:58:31 EDT
CHANGE: http://review.gluster.org/3847 (init.d: Fix init.d on Redhat, so it does not always return 0.) merged in master by Vijay Bellur (vbellur@redhat.com)