Bug 1091935 - Inappropriate error message generated when non-resolvable hostname is given for peer in 'gluster volume create' command for distribute-replicate volume creation
Summary: Inappropriate error message generated when non-resolvable hostname is given f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: pre-release
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gaurav Kumar Garg
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On: 1007209 1212576
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-28 10:55 UTC by Gaurav Kumar Garg
Modified: 2016-06-05 23:37 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of: 1007209
Environment:
Last Closed: 2015-05-14 17:25:42 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Gaurav Kumar Garg 2014-04-28 10:55:33 UTC
+++ This bug was initially created as a clone of Bug #1007209 +++

Description of problem:
When a non-resolvable hostname is provided for a peer in the 'gluster volume create' command, the error message generated, given below, is not useful to find cause of failure. The error message is useful when the hostname given is resolvable.

Failed to perform brick order check. Do you want to continue creating the volume?  (y/n)

-----------------------------------------------
[root@rhs-client4 ~]# gluster peer status
Number of Peers: 3

Hostname: rhs-client10.lab.eng.blr.redhat.com
Uuid: 1e47bfd5-d7fd-4bbf-8f45-3583062804fc
State: Peer in Cluster (Connected)

Hostname: rhs-client15.lab.eng.blr.redhat.com
Uuid: 82e7d62c-6b25-4ed2-865b-5464e1b11735
State: Peer in Cluster (Connected)

Hostname: rhs-client37.lab.eng.blr.redhat.com
Uuid: a897dafd-3a26-4533-bd56-c4be512fd803
State: Peer in Cluster (Connected)

# gluster volume create RHSvol replica 2 rhs-client4.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client10.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client15.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client3745.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol
Failed to perform brick order check. Do you want to continue creating the volume?  (y/n) n
Volume create failed

# gluster volume create RHSvol replica 2 rhs-client4.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client10.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client15.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol rhs-client45.lab.eng.blr.redhat.com:/srv/rhs/brick3/RHSvol
volume create: RHSvol: failed: Host rhs-client45.lab.eng.blr.redhat.com is not in 'Peer in Cluster' state

-----------------------------------------------

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

How reproducible:
glusterfs-server-3.4.0.33rhs-1.el6rhs.x86_64

Steps to Reproduce:
1.Create RHS trusted peer cluster comprising of a few RHS nodes
2.Run 'gluster volume create' command with one of the RHS node names wrongly spelt, and non-resolvable
3.Observe error message
4.Run 'gluster volume create' command with one of the RHS node names wrongly spelt, but resolvable
5.Observe error message

Actual results:
When gluster volume creation command, for creating a distribute-replicate volume, contains an error in the names of one of the RHS peers, and if that happens to be a non-resolvable hostname, the error message that is generated is not useful.

Expected results:
When gluster volume creation command, for creating a distribute-replicate volume, contains an error in the names of one of the RHS peers, and if that happens to be a non-resolvable hostname, the error message that is generated should be useful to find the cause of the issue.

Additional info:

--- Additional comment from Vivek Agarwal on 2014-02-20 03:36:55 EST ---

adding 3.0 flag and removing 2.1.z

Comment 1 Anand Avati 2014-04-29 06:14:22 UTC
REVIEW: http://review.gluster.org/7589 (cli: inappropriate error message when non resolvable host name given) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)

Comment 2 Anand Avati 2014-04-29 08:33:15 UTC
REVIEW: http://review.gluster.org/7589 (cli: inappropriate error message when non resolvable host name given) posted (#2) for review on master by Gaurav Kumar Garg (ggarg)

Comment 3 Anand Avati 2014-04-29 10:16:54 UTC
REVIEW: http://review.gluster.org/7589 (cli: inappropriate error message when non resolvable host name given) posted (#3) for review on master by Gaurav Kumar Garg (ggarg)

Comment 4 Anand Avati 2014-05-13 12:40:11 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick-order check for replicate/distribute-replicate volume form cli to glusterd side.) posted (#4) for review on master by Gaurav Kumar Garg (ggarg)

Comment 5 Anand Avati 2014-05-14 13:03:12 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick-order check for replicate/distribute-replicate volume form cli to glusterd side.) posted (#5) for review on master by Gaurav Kumar Garg (ggarg)

Comment 6 Anand Avati 2014-05-15 13:38:37 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick-order check for replicate/distribute-replicate volume form cli to glusterd side.) posted (#6) for review on master by Gaurav Kumar Garg (ggarg)

Comment 7 Anand Avati 2014-05-20 12:17:07 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#7) for review on master by Gaurav Kumar Garg (ggarg)

Comment 8 Anand Avati 2014-06-02 07:38:18 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#8) for review on master by Gaurav Kumar Garg (ggarg)

Comment 9 Anand Avati 2014-06-02 09:29:33 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#9) for review on master by Gaurav Kumar Garg (ggarg)

Comment 10 Anand Avati 2014-08-25 12:11:51 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#10) for review on master by Gaurav Kumar Garg (ggarg)

Comment 11 Anand Avati 2014-08-26 12:04:35 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#11) for review on master by Gaurav Kumar Garg (ggarg)

Comment 12 Anand Avati 2014-08-27 11:32:52 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#12) for review on master by Gaurav Kumar Garg (ggarg)

Comment 13 Anand Avati 2014-08-27 12:21:15 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#13) for review on master by Gaurav Kumar Garg (ggarg)

Comment 14 Anand Avati 2014-09-17 13:43:52 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#14) for review on master by Gaurav Kumar Garg (ggarg)

Comment 15 Anand Avati 2014-09-22 07:02:10 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#15) for review on master by Gaurav Kumar Garg (ggarg)

Comment 16 Anand Avati 2014-09-22 07:37:20 UTC
REVIEW: http://review.gluster.org/7589 (glusterd: Move brick order check from cli to glusterd.) posted (#16) for review on master by Gaurav Kumar Garg (ggarg)

Comment 17 Anand Avati 2014-09-24 12:29:48 UTC
COMMIT: http://review.gluster.org/7589 committed in master by Kaushal M (kaushal) 
------
commit b097225202629448e3b10dc4160125c376971682
Author: ggarg <ggarg>
Date:   Tue Apr 29 09:58:16 2014 +0530

    glusterd: Move brick order check from cli to glusterd.
    
    Previously the brick order check for replicate volumes on volume
    create and add-brick was done by the cli. This check would fail
    when a hostname wasn't resolvable and would question the user
    if it was ok to continue. If the user continued, glusterd would
    fail the command again as the hostname wouldn't be resolvable.
    This was unnecessary.
    
    This change, moves the check from cli into glusterd. The check
    is now performed during staging of volume create after the
    bricks have been resolved. This prevents the above condition
    from occurring.
    
    As a result of this change, the user will no longer be
    questioned and given an option to continue the operation
    when a bad brick order is given or the brick order check
    fails. In such a case, the user can use 'force' to bypass
    the check and allow the command to succeed.
    
    Change-Id: I009861efaf3fb7f553a9b00116a992f031f652cb
    BUG: 1091935
    Signed-off-by: ggarg <ggarg>
    Reviewed-on: http://review.gluster.org/7589
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaushal M <kaushal>

Comment 18 Anand Avati 2014-09-29 08:41:42 UTC
REVIEW: http://review.gluster.org/8881 (glusterd: Perform brick order check in originator node.) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)

Comment 19 Anand Avati 2014-09-29 10:20:32 UTC
REVIEW: http://review.gluster.org/8881 (glusterd: Perform brick order check in originator node.) posted (#2) for review on master by Gaurav Kumar Garg (ggarg)

Comment 20 Anand Avati 2014-09-30 04:46:25 UTC
COMMIT: http://review.gluster.org/8881 committed in master by Kaushal M (kaushal) 
------
commit 535c4259119ca3beef2fee1526930e8be42bdd5d
Author: GauravKumarGarg <ggarg>
Date:   Mon Sep 29 14:03:49 2014 +0530

    glusterd: Perform brick order check in originator node.
    
    Currently in case of multi node cluster brick-order check for
    replicate volume done on every node. Its waste of time to perform
    brick order check on every node.
    
    This change will perform brick order check only at originator node.
    
    Change-Id: I8687fd28e587de8a280a9003b015ccd5729c9740
    BUG: 1091935
    Signed-off-by: ggarg <ggarg>
    Reviewed-on: http://review.gluster.org/8881
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Kaushal M <kaushal>
    Tested-by: Kaushal M <kaushal>

Comment 21 Anand Avati 2014-12-31 10:43:25 UTC
REVIEW: http://review.gluster.org/9373 (glusterd: Fix strtok_r parsing.) posted (#1) for review on master by Raghavendra Talur (rtalur)

Comment 22 Anand Avati 2014-12-31 11:40:57 UTC
REVIEW: http://review.gluster.org/9373 (glusterd: Fix strtok_r parsing.) posted (#2) for review on master by Raghavendra Talur (rtalur)

Comment 23 Raghavendra Talur 2014-12-31 11:45:43 UTC
There exists one more bug.

If a volume create prompts warning for bricks on same disk and the create is stopped then the brick is left with xattrs.
Changing bug state to assigned because of that.

Comment 24 Anand Avati 2014-12-31 11:48:10 UTC
REVIEW: http://review.gluster.org/9373 (glusterd: Fix strtok_r parsing.) posted (#3) for review on master by Raghavendra Talur (rtalur)

Comment 25 Anand Avati 2015-01-20 09:13:49 UTC
REVIEW: http://review.gluster.org/9373 (glusterd: Fix strtok_r parsing.) posted (#4) for review on master by Raghavendra Talur (rtalur)

Comment 26 Anand Avati 2015-01-21 09:15:16 UTC
REVIEW: http://review.gluster.org/9373 (glusterd: Fix strtok_r parsing.) posted (#5) for review on master by Raghavendra Talur (rtalur)

Comment 27 Anand Avati 2015-01-22 06:32:31 UTC
COMMIT: http://review.gluster.org/9373 committed in master by Krishnan Parthasarathi (kparthas) 
------
commit f74ff011fce5959884a4f47f0c87ae8795d64a24
Author: Raghavendra Talur <rtalur>
Date:   Wed Dec 31 14:26:37 2014 +0530

    glusterd: Fix strtok_r parsing.
    
    Found a bug where a replica 2 volume creation prompts
    saying the bricks are in the same hosts even when they
    are in different hosts.
    
    Change-Id: Ie55addae55c55e32ad2b5339530ab71f0e3711ab
    BUG: 1091935
    Signed-off-by: Raghavendra Talur <rtalur>
    Reviewed-on: http://review.gluster.org/9373
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Ravishankar N <ravishankar>
    Reviewed-by: Gaurav Kumar Garg <ggarg>
    Reviewed-by: Krishnan Parthasarathi <kparthas>
    Tested-by: Krishnan Parthasarathi <kparthas>

Comment 28 Niels de Vos 2015-05-14 17:25:42 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 29 Niels de Vos 2015-05-14 17:35:26 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 30 Niels de Vos 2015-05-14 17:37:48 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 31 Niels de Vos 2015-05-14 17:42: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.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


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