When you install the generated katello-ca-consumer rpm from a satellite server, it sets the network.hostname-override to result of the "hostname -f" command. If no fqdn or domain name is actually set on the system, then that command just returns "localhost". When the system is actually registered to satellite the host will be called localhost instead of the actual hostname (or short hostname if one is set). I actually have a set hostname on the system which could be used instead if not for the override fact being set: [root@centos7 ~]# jq . /var/lib/rhsm/facts/facts.json | grep hostname "network.hostname": "centos7.localdomain", "network.hostname-override": "localhost", Also, if you have 2 different systems that no fqdn set and you register them both to the same satellite, than only a single host is created in satellite called "localhost" and one registration just overwrites the other one. Would it be possible to default to "hostname" if "hostname -f" returns localhost? Should hosts created in satellite be overwriting one another if they only share the value of "localhost" for their fqdn?
The functionality to match the host against the hostname if it already exists is there on purpose, to make it possible to match provisioned host with the one registered with subscription manager. Changing the component to installer, since that's where the katello-ca-consumer rpm is generated.
Created redmine issue http://projects.theforeman.org/issues/20642 from this bug
Upstream bug assigned to inecas
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20642 has been resolved.
Putting to assigned, as there was also fix on server side to handle the situation better
Upstream bug assigned to jsherril
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20816 has been resolved.
Bug : Satellite 6.3.0 snap28 [root@bkr-hv01-guest27 ~]# hostname localhost [root@bkr-hv01-guest27 ~]# hostname -f localhost nslookup 10.19.XX.XX Server: Address: #53 Non-authoritative answer: aaa.in-addr.arpa name = bkr-hv01-guest27.com. subscription-manager register --org="Default_Organization" --activationkey="ak-rhel-7" The system has been registered with ID: 8dc7d3ac-4d2b-4656-9d49-60dabcad49d7 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@bkr-hv01-guest27 ~]# subscription-manager facts --list | grep hostname network.hostname: localhost network.hostname-override: bkr-hv01-guest27.com ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | CONTENT VIEW | LIFECYCLE ENVIRONMENT ---|--------------------------------------------------------|------------------|-------------------------|--------------|-------------------|--------------|---------------------- 6 | bkr-hv01-guest27.com | RedHat 7.4 | | 10.19.XXXXX | 00:16:3eXXXXXX | RHEL 7 CV | DEV
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > > > For information on the advisory, and where to find the updated files, follow the link below. > > > > If the solution does not work for you, open a new bug report. > > > > https://access.redhat.com/errata/RHSA-2018:0336