Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1218570

Summary: `gluster volume heal <vol-name> split-brain' tries to heal even with insufficient arguments
Product: [Community] GlusterFS Reporter: Shruti Sampat <ssampat>
Component: replicateAssignee: Anuradha <atalur>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: amukherj, atalur, bugs, gluster-bugs, smohan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1221128 1223746 (view as bug list) Environment:
Last Closed: 2015-06-20 09:48:08 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: 1186580, 1221128, 1223746    

Description Shruti Sampat 2015-05-05 09:34:15 UTC
Description of problem:
------------------------

See the following command for resolution of split-brains -

# gluster v heal <vol-name> split-brain
Usage: /usr/sbin/glfsheal <VOLNAME> [bigger-file <FILE> | source-brick <HOSTNAME:BRICKNAME> [<FILE>] | split-brain-info]
Volume heal failed.

Observe that the message displays "Volume heal failed." even though the command was run with insufficient arguments. This command should have ideally resulted in a parse error as the choice of brick or file for resolution of split-brain is not provided. Instead, it tries to heal and fails.

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

glusterfs-3.7.0alpha0-0.17.gited96153.el6.x86_64

How reproducible:
------------------

Always

Steps to Reproduce:
--------------------

1. Run the command below and observe the message displayed -

# gluster v heal <vol-name> split-brain

Actual results:
-----------------

glusterfs tries to heal the file even with insufficient arguments whereas ideally this should have resulted in a parse error.

Expected results:
------------------

Heal should not be attempted if arguments provided are incorrect or insufficient.

Additional info:

Comment 1 Anand Avati 2015-06-02 10:19:02 UTC
REVIEW: http://review.gluster.org/11043 (cli: Fix incorrect parse logic for volume heal commands) posted (#1) for review on release-3.7 by Anuradha Talur (atalur)

Comment 2 Anand Avati 2015-06-04 08:27:17 UTC
COMMIT: http://review.gluster.org/11043 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit 2f61269237170253e022fe6fc587ee7630e727e3
Author: Anuradha <atalur>
Date:   Wed May 13 15:29:57 2015 +0530

    cli: Fix incorrect parse logic for volume heal commands
    
    heal-op was being incorrectly set to
    GF_SHD_OP_SBRAIN_HEAL_FROM_BIGGER_FILE.
    
    Change-Id: I4d4461c7737feae30102e82f7788083017485669
    BUG: 1218570
    Reviewed-on: http://review.gluster.org/10771
    Signed-off-by: Anuradha <atalur>
    Reviewed-on: http://review.gluster.org/11043
    Reviewed-by: Ravishankar N <ravishankar>
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Niels de Vos 2015-06-20 09:48:08 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.2, please reopen this bug report.

glusterfs-3.7.2 has been announced on the Gluster Packaging mailinglist [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://www.gluster.org/pipermail/packaging/2015-June/000006.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user