Bug 827403

Summary: CLI: gluster peer probe with single character returns usage
Product: [Community] GlusterFS Reporter: Rahul Hinduja <rhinduja>
Component: cliAssignee: Kaushal <kaushal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: gluster-bugs, sac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:19:02 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:

Description Rahul Hinduja 2012-06-01 11:24:28 UTC
Description of problem:

gluster peer probe <single character hostname> returns the usage. The host name can also be of a 1 character.

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

[root@QA-54 glusterfs]# gluster --version
glusterfs 3.3.0qa45 built on Jun  1 2012 00:10:06

How reproducible:


Steps to Reproduce:
1. use the cli "gluster peer probe" with single character hostname
  
Actual results:
[root@QA-54 glusterfs]# gluster --version
glusterfs 3.3.0qa45 built on Jun  1 2012 00:10:06


[root@QA-54 glusterfs]# gluster peer probe Q
Usage: peer probe <HOSTNAME>
[root@QA-54 glusterfs]# 

Expected results:


Additional info:

Comment 1 Amar Tumballi 2012-06-02 05:27:34 UTC
Kaushal,

--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1644,7 +1644,7 @@ valid_host_name (char *address, int length)
         char            *temp_str = NULL;
         char            *save_ptr = NULL;
 
-        if ((length > _POSIX_HOST_NAME_MAX) || (length == 1)) {
+        if ((length > _POSIX_HOST_NAME_MAX) || (length < 1)) {
                 ret = 0;
                 goto out;
         }

fixed the issue. Check if that is right fix and submit it.

Comment 2 Vijay Bellur 2012-07-03 19:37:22 UTC
CHANGE: http://review.gluster.com/3516 (libglusterfs: valid_host_name() fix) merged in release-3.3 by Vijay Bellur (vijay)

Comment 3 Sachidananda Urs 2012-07-06 04:28:18 UTC
Fixed in master.