Project

General

Profile

Bug #20642

network.hostname-override defaults to "localhost" if no fqdn set

Added by Ivan Necas over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Client/Agent
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

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?


Related issues

Related to Katello - Bug #16134: Registering system with shotname hostname results in duplicate host entriesClosed2016-08-16
Related to Katello - Bug #20816: Don't consider localhost as valid host name when parsing rhsm factsClosed2017-08-31

Associated revisions

Revision 7c0326d6 (diff)
Added by Ivan Necas over 2 years ago

Fixes #20642 - don't set hostname-override when localhost

History

#1 Updated by Ivan Necas over 2 years ago

  • Related to Bug #16134: Registering system with shotname hostname results in duplicate host entries added

#2 Updated by Eric Helms over 2 years ago

  • Subject changed from network.hostname-override defaults to "localhost" if no fqdn set to network.hostname-override defaults to "localhost" if no fqdn set
  • Category changed from Installer to Client/Agent
  • Legacy Backlogs Release (now unused) set to 250

#3 Updated by Ivan Necas over 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ivan Necas
  • Target version set to 1.18.0-RC1
  • Pull request https://github.com/Katello/puppet-certs/pull/164 added

#4 Updated by Ivan Necas over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Ivan Necas over 2 years ago

  • Related to Bug #20816: Don't consider localhost as valid host name when parsing rhsm facts added

#6 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/Katello/puppet-certs/pull/179 added

#7 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/Katello/katello-installer/pull/567 added

#8 Updated by Andrew Kofink about 2 years ago

  • Pull request deleted (https://github.com/Katello/puppet-certs/pull/179)

Also available in: Atom PDF