Bug 592613 - clufindhostname -i returns random value
Summary: clufindhostname -i returns random value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 661881
TreeView+ depends on / blocked
 
Reported: 2010-05-15 18:15 UTC by Dyna
Modified: 2011-07-21 10:46 UTC (History)
3 users (show)

Fixed In Version: rgmanager-2.0.52-16.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 661881 (view as bug list)
Environment:
Last Closed: 2011-07-21 10:46:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1000 0 normal SHIPPED_LIVE Low: rgmanager security, bug fix, and enhancement update 2011-07-21 10:43:18 UTC

Description Dyna 2010-05-15 18:15:48 UTC
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 Program Management 2011-01-11 19:49:56 UTC
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 Program Management 2011-01-11 23:27:06 UTC
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 14:39:44 UTC
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 10:46:58 UTC
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.