Bug 134081 - Hostname sent to server by rhn_register during kickstart is incorrect
Hostname sent to server by rhn_register during kickstart is incorrect
Status: CLOSED DUPLICATE of bug 134078
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Registration (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
Red Hat Satellite QA List
Depends On:
  Show dependency treegraph
Reported: 2004-09-29 10:40 EDT by Nick Strugnell
Modified: 2007-10-23 22:02 EDT (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Nick Strugnell 2004-09-29 10:40:19 EDT
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 10:41:59 EDT

*** This bug has been marked as a duplicate of 134078 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:06:00 EST
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.