[Bugs] [Bug 1739320] The result (hostname) of getnameinfo for all bricks (ipv6 addresses) are the same, while they are not.

bugzilla at redhat.com bugzilla at redhat.com
Fri Aug 30 03:15:12 UTC 2019


--- Comment #11 from Amgad <amgad.saleh at nokia.com> ---

*** I verified that "ai_family" passed in "af_inet_client_get_remote_sockaddr"
to "gf_resolve_ip6" [rpc/rpc-transport/socket/src/name.c], is for IPv4 "2" and
not IPv6 (should be "10"):

af_inet_client_get_remote_sockaddr(rpc_transport_t *this,
                                   struct sockaddr *sockaddr,
                                   socklen_t *sockaddr_len)

    /* TODO: gf_resolve is a blocking call. kick in some
       non blocking dns techniques */
    ret = gf_resolve_ip6(remote_host, remote_port, sockaddr->sa_family,
                         &this->dnscache, &addr_info);
    gf_log(this->name, GF_LOG_ERROR, "CSTO-DEBUG: Family Address is %d",
sockaddr->sa_family);              ==> my added debug msg


*** in [libglusterfs/src/common-utils.c] where "gf_resolve_ip6" is defined
where the IPv6 is passed to "getaddrinfo" as host name, and it failed because
the ai_family is not right:

gf_resolve_ip6(const char *hostname, uint16_t port, int family, void
               struct addrinfo **addr_info)
        if ((ret = getaddrinfo(hostname, port_str, &hints, &cache->first)) !=
            0) {
            gf_msg("resolver", GF_LOG_ERROR, 0, LG_MSG_GETADDRINFO_FAILED,
                   "getaddrinfo failed (family:%d) (%s)", family,

            gf_msg("resolver", GF_LOG_ERROR, 0, LG_MSG_GETADDRINFO_FAILED,     
                          ==> my added debug msg
                   "CSTO-DEBUG: getaddrinfo failed (hostname:%s) (%s)",

/var/log/glusterfs/glustershd.log output:
[2019-08-30 01:03:51.871225] E [MSGID: 101075]
[common-utils.c:512:gf_resolve_ip6] 0-resolver: CSTO-DEBUG: getaddrinfo failed
(hostname:2001:db8:1234::8) (Address family for hostname not supported)

[2019-08-30 01:03:51.871239] E [name.c:256:af_inet_client_get_remote_sockaddr]
0-glusterfs: CSTO-DEBUG: Family Address is 2 ==>
[2019-08-30 01:03:51.871249] E [name.c:260:af_inet_client_get_remote_sockaddr]
0-glusterfs: DNS resolution failed on host 2001:db8:1234::8

That's why failed DNS resolution and caused glustershd not to come up.

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list