Bug 134081 - Hostname sent to server by rhn_register during kickstart is incorrect
Summary: Hostname sent to server by rhn_register during kickstart is incorrect
Status: CLOSED DUPLICATE of bug 134078
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Registration   
(Show other bugs)
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Red Hat Satellite QA List
Depends On:
TreeView+ depends on / blocked
Reported: 2004-09-29 14:40 UTC by Nick Strugnell
Modified: 2007-10-24 02:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:06:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Nick Strugnell 2004-09-29 14:40:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)

Description of problem:
When you register a machine against RHN it sends a h/w profile which
includes the 'hostname'. This hostname is used by default as the
profile name, and can also be used in provisioning macros.

Unfortunately, if you use rhn_register during a kickstart it does not
really send the hostname as returned by gethostname(2), it just sends
the FQDN of the IP address associated with eth0. (see
findHostByRoute() in hardware.py)

This is frequently not the hostname that we want - particularly in macros.

Many customers are doing provisioning etc. over a service network and
the hostname associated with this service network address is _not_
what they want. They want {@ rhn.system.hostname @} to resolve to the
same as 'hostname' on the command line. 

The information is there - it will have been set by anaconda in

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure multihomed machine
2. Register to RHN in kickstart
3. Check hostname on RHN

Actual Results:  hostname on RHN is different to result of 'hostname'
on commandline, depending on NIC ordering.

Expected Results:  should be same.

Additional info:

I accept that using the FQDN of the first NIC on the system is a valid
fallback if hostname has not been set. However, the checking order
should be:

HOSTNAME in /etc/sysconfig/network
FQDN of eth0

This is a problem for British Airways

Comment 1 Mihai Ibanescu 2004-09-29 14:41:59 UTC

*** This bug has been marked as a duplicate of 134078 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:06:00 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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