Project

General

Profile

Bug #16134

Registering system with shotname hostname results in duplicate host entries

Added by Justin Sherrill almost 3 years ago. Updated 11 months ago.

Status:
Closed
Priority:
High
Category:
Upgrades
Target version:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1362592
Description of problem:

After upgrading to satellite 6.2, all content hosts may be duplicated one with the shortname and one with the long name:

foo
foo.example.com

The reason for this is that the hosts have their hostnames configured such that the hostname command reports the shortname, while the 'hostname -f' command reports the fqdn. The problem does not occur if 'hostname' reports the fqdn.

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

How reproducible:
Always

Steps to Reproduce:
1. Install 6.1
2. Register a host with sub-man and puppet, such that the host reports its shortname via the 'hostname' command
3. Upgrade to 6.2

Actual results:
Duplicated hosts

Expected results:
Only one host

Additional info:

'subscription-manager facts' seems to not report the fqdn at all if the host is configured this way.


Related issues

Related to Katello - Bug #20642: network.hostname-override defaults to "localhost" if no fqdn setClosed2017-08-18

Associated revisions

Revision 6a0ac3d9 (diff)
Added by Justin Sherrill over 2 years ago

Refs #16134 - deploy hostname override fact

Revision 3887e213 (diff)
Added by Justin Sherrill over 2 years ago

Refs #16134 - add sub-man plugin for fqdn fact

Revision 3887e213 (diff)
Added by Justin Sherrill over 2 years ago

Refs #16134 - add sub-man plugin for fqdn fact

Revision b9b9d6c0
Added by Justin Sherrill over 2 years ago

Merge pull request #37 from jlsherrill/16134

Refs #16134 - add sub-man plugin for fqdn fact

Revision 746149fc
Added by Justin Sherrill over 2 years ago

Merge pull request #100 from jlsherrill/16134

Refs #16134 - deploy hostname override fact

Revision b9b9d6c0
Added by Justin Sherrill over 2 years ago

Merge pull request #37 from jlsherrill/16134

Refs #16134 - add sub-man plugin for fqdn fact

Revision 5ca88a16 (diff)
Added by Justin Sherrill over 2 years ago

Refs #16134 - add new subpackage for sub-man plugin

Revision 3a6b0d48
Added by Justin Sherrill over 2 years ago

Merge pull request #292 from jlsherrill/16134

Refs #16134 - add new subpackage for sub-man plugin

Revision dc9787bd (diff)
Added by Justin Sherrill over 2 years ago

Fixes #16134 - Support fqdn and override fact for host name

History

#1 Updated by Justin Sherrill almost 3 years ago

  • Assignee set to Justin Sherrill
  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to medium

#2 Updated by Ohad Levy over 2 years ago

is this a dup of #16270 ?

#3 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6328 added

#4 Updated by Justin Sherrill over 2 years ago

  • Subject changed from After upgrade, all of my hosts are duplicated one with shortname, one with fqdn to Registering system with shotname hostname results in duplicate host entries
  • Pull request https://github.com/Katello/puppet-certs/pull/100 added

#5 Updated by Justin Sherrill over 2 years ago

Ohad, This is not a dupe. This issue handles future registration whereas #16270 is meant to handle unifying hosts that were duplicated during the upgrade process. Renaming the title to make it more clear

#6 Updated by Justin Sherrill over 2 years ago

Temporary workaround for new registrations:

run the following on a client prior to registration:


if [ -d /etc/rhsm/facts/ ]; then
  echo "{\"network.hostname\":\"`hostname -f`\"}" > /etc/rhsm/facts/katello.facts
fi

#7 Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/Katello/katello-agent/pull/37 added

#8 Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/Katello/katello-packaging/pull/292 added

#9 Updated by Justin Sherrill over 2 years ago

  • Target version set to 126

#10 Updated by Justin Sherrill over 2 years ago

  • Bugzilla link deleted (1362592)

#11 Updated by Justin Sherrill over 2 years ago

  • Bugzilla link set to 1380473

#12 Updated by Justin Sherrill over 2 years ago

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

#13 Updated by Ivan Necas almost 2 years ago

  • Related to Bug #20642: network.hostname-override defaults to "localhost" if no fqdn set added

Also available in: Atom PDF