Bug 592613 - clufindhostname -i returns random value
clufindhostname -i returns random value
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Lon Hohberger
Cluster QE
:
Depends On:
Blocks: 661881
  Show dependency treegraph
 
Reported: 2010-05-15 14:15 EDT by Dyna
Modified: 2011-07-21 06:46 EDT (History)
3 users (show)

See Also:
Fixed In Version: rgmanager-2.0.52-16.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 661881 (view as bug list)
Environment:
Last Closed: 2011-07-21 06:46:58 EDT
Type: ---
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 Dyna 2010-05-15 14:15:48 EDT
Description of problem:
clufindhostname -i myhost.example.com returns random value.

Version-Release number of selected component (if applicable):
Tested with 2.0.56-6 (latest) 

How reproducible:
Every time.. 


Steps to Reproduce:
1. clufindhostname -i myhost.example.com 
2. most likely it will return a funny value and make nfsclient check in the cluster go south.

Problem is that:
inet_pton:
0 is returned if src does not contain  a  character  string  representing  a  valid  network address. A positive value is returned if the network address was successfully converted.

From  clufindhostname source code:

if (inet_pton(family, optarg, ptr) < 0) {
        perror("inet_pton");
        exit(2);
}

The check should be:

if (inet_pton(family, optarg, ptr) <= 0) {
        perror("inet_pton");
        exit(2);
}

Cheers D
Comment 2 RHEL Product and Program Management 2011-01-11 14:49:56 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 3 RHEL Product and Program Management 2011-01-11 18:27:06 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 4 Lon Hohberger 2011-04-08 10:39:44 EDT
I have been unable to reproduce the problem where it produces an incorrect value, however, positive testing works:

[root@rhel5-1 ~]# clufindhostname -i 1.1.1.1
[root@rhel5-1 ~]# echo $?
2
[root@rhel5-1 ~]# clufindhostname -i 192.168.122.22
client
[root@rhel5-1 ~]# echo $?
0
[root@rhel5-1 ~]# clufindhostname -i client
[root@rhel5-1 ~]# echo $?
2
[root@rhel5-1 ~]# clufindhostname -i ARGLEBARGLE
[root@rhel5-1 ~]# echo $?
2
Comment 7 errata-xmlrpc 2011-07-21 06:46:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1000.html

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