Bug 592613 - clufindhostname -i returns random value
Summary: clufindhostname -i returns random value
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager   
(Show other bugs)
Version: 5.4
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
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:
Story Points: ---
Clone Of:
: 661881 (view as bug list)
Last Closed: 2011-07-21 10:46:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1000 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:
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) {

The check should be:

if (inet_pton(family, optarg, ptr) <= 0) {

Cheers D

Comment 2 RHEL Product and 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 Product and 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
[root@rhel5-1 ~]# echo $?
[root@rhel5-1 ~]# clufindhostname -i
[root@rhel5-1 ~]# echo $?
[root@rhel5-1 ~]# clufindhostname -i client
[root@rhel5-1 ~]# echo $?
[root@rhel5-1 ~]# clufindhostname -i ARGLEBARGLE
[root@rhel5-1 ~]# echo $?

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.


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