Bug 902216 - glusterd fails to identify peer while creating a new volume
glusterd fails to identify peer while creating a new volume
Status: CLOSED WONTFIX
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
2.0
Unspecified Unspecified
medium Severity unspecified
: ---
: ---
Assigned To: krishnan parthasarathi
SATHEESARAN
glusterd
:
Depends On: 890502
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 02:34 EST by Vidya Sakar
Modified: 2015-11-03 18:05 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 890502
Environment:
Last Closed: 2015-03-23 03:36:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vidya Sakar 2013-01-21 02:34:36 EST
+++ This bug was initially created as a clone of Bug #890502 +++

Description of problem:
If the peer happens to be probed on an ip address (instead of hostname), volume creation fails. To identify a friend, glusterd does a strcmp(hostname, peername). Since peername happens to be an ip address here (since we probed an ip-address instead of hostname), glusterd cannot identify hostname as friend (though it is one).

Backtrace:

Breakpoint 5, glusterd_friend_find_by_hostname (hoststr=0x7f03d8000eb0 "rhs-hpc-srv2", peerinfo=0x927128)
    at ../../../../../xlators/mgmt/glusterd/src/glusterd-utils.c:4589
4589                            if (!strncasecmp (entry->hostname, host,
(gdb) p entry->hostname
$8 = 0x6fa300 "192.168.1.14"
(gdb) l
4584                                       1024, NULL, 0, 0);
4585                    if (ret)
4586                            goto out;
4587
4588                    list_for_each_entry (entry, &priv->peers, uuid_list) {
4589                            if (!strncasecmp (entry->hostname, host,
4590                                1024) || !strncasecmp (entry->hostname,hname,
4591                                1024)) {
4592                                    gf_log (this->name, GF_LOG_DEBUG,
4593                                            "Friend %s found.. state: %d",
(gdb) p entry->hostname
$9 = 0x6fa300 "192.168.1.14"
(gdb) p hname
$10 = "rhs-hpc-srv2.lab.eng.blr.redhat.com", '\000' <repeats 988 times>

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

How reproducible:
always

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


Expected results:


Additional info: Ideally glusterd should be doing comparisions on ip-addresses instead of hostname. A rough algorithm would be,
1. getaddrinfo (hostname).
2. compare the list of addresses hostname resolves into with list of friends. The comparision should be done on ip-addresses, not on hostname.
Comment 3 Vivek Agarwal 2015-03-23 03:36:40 EDT
The product version of Red Hat Storage on which this issue was reported has reached End Of Life (EOL) [1], hence this bug report is being closed. If the issue is still observed on a current version of Red Hat Storage, please file a new bug report on the current version.







[1] https://rhn.redhat.com/errata/RHSA-2014-0821.html
Comment 4 Vivek Agarwal 2015-03-23 03:39:06 EDT
The product version of Red Hat Storage on which this issue was reported has reached End Of Life (EOL) [1], hence this bug report is being closed. If the issue is still observed on a current version of Red Hat Storage, please file a new bug report on the current version.







[1] https://rhn.redhat.com/errata/RHSA-2014-0821.html

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