+++ 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.
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