Bug 1204641 - [geo-rep] stop-all-gluster-processes.sh fails to stop all gluster processes
Summary: [geo-rep] stop-all-gluster-processes.sh fails to stop all gluster processes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1184846 1225331
TreeView+ depends on / blocked
 
Reported: 2015-03-23 09:35 UTC by Kotresh HR
Modified: 2016-06-16 12:43 UTC (History)
10 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1204044
: 1225331 (view as bug list)
Environment:
Last Closed: 2016-06-16 12:43:55 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Kotresh HR 2015-03-23 09:35:57 UTC
+++ This bug was initially created as a clone of Bug #1204044 +++

Description of problem:

'service glusterd stop' stops only the management daemon and not all the gluster processes - which is how it was decided (as per bug 1152992 and the related doc bug 1184846). A separate script 'stop-all-gluster-processes.sh' was created to achieve the intent of stopping all gluster processes. That fails to work when there is more than one gsync process running.


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


How reproducible:  Always


Steps to Reproduce:

1. Have geo-rep session(s) created between master and slave (any configuration)
2. After successfully establishing and starting session(s), do a "ps aux | grep gluster | grep gsync | awk {'print $2'} " to make sure that there is more than one gsync process running (or any related process for that matter)
3. Execute the script "/usr/share/glusterfs/scripts/stop-all-gluster-processes.sh" and that should go through without any errors.
4. Run the 'ps' command again (mentioned in step 2) to verify that the gluster processes have stopped. 


Actual results:

The script fails when there is more than one process running. It errors out saying 'too many arguments'


Expected results:

The script should work irrespective of number of processes active at that time. 


Additional info:

Comment 1 Kotresh HR 2015-03-23 09:37:14 UTC
Description of problem:

'service glusterd stop' stops only the management daemon and not all the gluster processes. A separate script 'stop-all-gluster-processes.sh' was created to achieve the intent of stopping all gluster processes. That fails to work when there is more than one gsync process running.


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


How reproducible:  Always


Steps to Reproduce:

1. Have geo-rep session(s) created between master and slave (any configuration)
2. After successfully establishing and starting session(s), do a "ps aux | grep gluster | grep gsync | awk {'print $2'} " to make sure that there is more than one gsync process running (or any related process for that matter)
3. Execute the script "/usr/share/glusterfs/scripts/stop-all-gluster-processes.sh" and that should go through without any errors.
4. Run the 'ps' command again (mentioned in step 2) to verify that the gluster processes have stopped. 


Actual results:

The script fails when there is more than one process running. It errors out saying 'too many arguments'


Expected results:

The script should work irrespective of number of processes active at that time. 


Additional info:

Comment 2 Kotresh HR 2015-03-23 09:43:30 UTC
Patch Sent:

http://review.gluster.org/#/c/9970/

Comment 3 Anand Avati 2015-04-01 06:59:27 UTC
REVIEW: http://review.gluster.org/9970 (extras: Fix stop-all-gluster-processes.sh script) posted (#5) for review on master by Kotresh HR (khiremat@redhat.com)

Comment 4 Anand Avati 2015-04-06 17:44:45 UTC
COMMIT: http://review.gluster.org/9970 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit 85865daa1b7dd11badf9f5192e050e1998c76f8a
Author: Kotresh HR <khiremat@redhat.com>
Date:   Mon Mar 23 15:07:47 2015 +0530

    extras: Fix stop-all-gluster-processes.sh script
    
    "test -n" command takes single string as argument. The
    command was failing with "Too many arguments" when multiple
    pids are got.
    
    Change-Id: Icc409082f492c72522168d5e203684f00f52cf1b
    BUG: 1204641
    Signed-off-by: Kotresh HR <khiremat@redhat.com>
    Reviewed-on: http://review.gluster.org/9970
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Comment 5 Niels de Vos 2015-05-14 17:29:23 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 6 Niels de Vos 2015-05-14 17:35:54 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Niels de Vos 2015-05-14 17:38:16 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Niels de Vos 2015-05-14 17:46:37 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.7.0, please open a new bug report.

glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 9 Anand Avati 2015-05-27 07:05:26 UTC
REVIEW: http://review.gluster.org/10931 (scripts: Added script stop-all-gluster-processes.sh in rpm) posted (#1) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 10 Anand Avati 2015-05-27 07:08:53 UTC
REVIEW: http://review.gluster.org/10931 (scripts: Added script stop-all-gluster-processes.sh in rpm) posted (#2) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 11 Aravinda VK 2015-05-27 07:10:08 UTC
One more packaging related patch expected. Moving this to ASSIGNED.

Comment 12 Anand Avati 2015-05-29 07:20:17 UTC
REVIEW: http://review.gluster.org/10931 (scripts: Added script stop-all-gluster-processes.sh in rpm) posted (#4) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 13 Nagaprasad Sathyanarayana 2015-10-25 15:19:39 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 14 Niels de Vos 2016-06-16 12:43:55 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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