Bug 1732443
Summary: | seeing error message in glustershd.log on volume start(or may be as part of shd graph regeneration) inet_pton failed with return code 0 [Invalid argument] | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Nag Pavan Chilakam <nchilaka> | |
Component: | eventsapi | Assignee: | Aravinda VK <avishwan> | |
Status: | CLOSED ERRATA | QA Contact: | Vivek Das <vdas> | |
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rhgs-3.5 | CC: | amukherj, avishwan, rhs-bugs, sheggodu, storage-qa-internal, vdas | |
Target Milestone: | --- | Keywords: | Regression | |
Target Release: | RHGS 3.5.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-6.0-14 | Doc Type: | Bug Fix | |
Doc Text: |
Previously, the network family was not set correctly during events socket initialization. This resulted in an invalid argument error and meant that events were not sent to consumers. Network family is now set correctly and events work as expected.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1752330 (view as bug list) | Environment: | ||
Last Closed: | 2019-10-30 12:22:31 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1696809, 1752330 |
Description
Nag Pavan Chilakam
2019-07-23 12:15:57 UTC
From _gf_event () : /* Socket Configurations */ server.sin_family = AF_INET; server.sin_port = htons(EVENT_PORT); ret = inet_pton(server.sin_family, host, &server.sin_addr); if (ret <= 0) { gf_msg(this->name, GF_LOG_ERROR, EINVAL, LG_MSG_INVALID_ARG, "inet_pton failed with return code %d", ret); goto out; } RETURN VALUE inet_pton() returns 1 on success (network address was successfully converted). 0 is returned if src does not contain a character string representing a valid network address in the specified address family. If af does not contain a valid address family, -1 is returned and errno is set to EAFNOSUPPORT. [2019-07-23 12:09:53.168761] E [MSGID: 101172] [events.c:89:_gf_event] 0-distrep-replicate-2: inet_pton failed with return code 0 [Invalid argument] So based on the above log it looks like in certain cases host is NULL and that's why we're bailing out. This seems like a wrong functionality? Aravinda - could you take a look at this? (In reply to Atin Mukherjee from comment #5) > From _gf_event () : > > /* Socket Configurations */ > > server.sin_family = AF_INET; > > server.sin_port = htons(EVENT_PORT); > > ret = inet_pton(server.sin_family, host, &server.sin_addr); > > if (ret <= 0) { > > gf_msg(this->name, GF_LOG_ERROR, EINVAL, LG_MSG_INVALID_ARG, > > "inet_pton failed with return code %d", ret); > > goto out; > > } > > > RETURN VALUE > inet_pton() returns 1 on success (network address was successfully > converted). 0 is returned if src does not contain a character string > representing a valid network address in the specified address family. > If af does not contain a valid address family, -1 is returned and > errno is set to EAFNOSUPPORT. > > [2019-07-23 12:09:53.168761] E [MSGID: 101172] [events.c:89:_gf_event] > 0-distrep-replicate-2: inet_pton failed with return code 0 [Invalid argument] > > So based on the above log it looks like in certain cases host is NULL and > that's why we're bailing out. This seems like a wrong functionality? > > Aravinda - could you take a look at this? I will look into this issue today. `-s localhost` passed in the argument is converted to `::1`. But `server.sin_family = AF_INET;` is used instead of `AF_INET6`. Due to this `inet_pton` is failing. Example `ps ax | grep shd` 13449 ? Ssl 0:00 /usr/sbin/glusterfs -s localhost --volfile-id shd/gv1 -p /var/run/gluster/shd/gv1/gv1-shd.pid -l /var/log/glusterfs/glustershd.log -S /var/run/gluster/5d6ae69815eaaafd.socket --xlator-option *replicate*.node-uuid=855ed18b-5c6f-4889-b523-5b7864d2a842 --process-name glustershd --client-pid=-6 I will explore and update the proper fix to handle this issue. (In reply to Aravinda VK from comment #7) > `-s localhost` passed in the argument is converted to `::1`. But > `server.sin_family = AF_INET;` is used instead of `AF_INET6`. Due to this > `inet_pton` is failing. > > Example `ps ax | grep shd` > > 13449 ? Ssl 0:00 /usr/sbin/glusterfs -s localhost --volfile-id > shd/gv1 -p /var/run/gluster/shd/gv1/gv1-shd.pid -l > /var/log/glusterfs/glustershd.log -S > /var/run/gluster/5d6ae69815eaaafd.socket --xlator-option > *replicate*.node-uuid=855ed18b-5c6f-4889-b523-5b7864d2a842 --process-name > glustershd --client-pid=-6 > > I will explore and update the proper fix to handle this issue. Aravinda - IIUC, the impact would be that we'd miss to generate event in such cases given gf_event API is bailing out, correct? And if so then this should be a blocker? upstream patch : https://review.gluster.org/23423 I am not seeing this error messages any more after upgrading to the fixed in version. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:3249 |