Bug 1394349 - Puppet creates Duplicate profile in "All hosts" with FQDN if client is configured and registered with short name.
Summary: Puppet creates Duplicate profile in "All hosts" with FQDN if client is confi...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Upgrades
Version: 6.2.0
Hardware: x86_64
OS: Linux
urgent vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On: 1356714 1380473 1405538
Blocks: 1399395 1383793 CEE_Sat6_Top_BZs, GSS_Sat6_Top_Bugs 1400970
TreeView+ depends on / blocked
Reported: 2016-11-11 19:13 UTC by Bryan Kearney
Modified: 2020-01-17 16:09 UTC (History)
34 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1380473
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 16134 High Closed Registering system with shotname hostname results in duplicate host entries 2019-12-27 13:31:28 UTC
Red Hat Knowledge Base (Solution) 2482641 None None None 2016-11-11 19:13:22 UTC

Comment 2 Bryan Kearney 2016-11-11 21:06:45 UTC
Upstream bug assigned to jsherril@redhat.com

Comment 3 Bryan Kearney 2016-11-11 21:06:57 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16134 has been resolved.

Comment 4 Sachin Ghai 2017-12-28 11:56:21 UTC
Verified with Sat6.3 snap30.

Performed below steps:
1.Change the client hostname to shortname instead of FQDN( # hostname and #hostname -f o/p should be different)

~]# hostname

[root@cloud-qe-09 ~]# hostname -f

2.Register the same to Satellite

]# subscription-manager register --org Default_Organization --activationkey 'ak_rhel7'
The system has been registered with ID: 338d7e45-b79e-4f35-9558-2af08c6f7f42 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3.Then, installed the puppet agent and make necessary changes to /etc/puppet/puppet.conf 

[root@cloud-qe-09 yum.repos.d]# vi /etc/puppet/puppet.conf 
[root@cloud-qe-09 yum.repos.d]# puppet agent -t
Info: Creating a new SSL key for cloud-qe-09.eng.bos.abc.com
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for cloud-qe-09.idmqe.lab.eng.bos.redhat.com
Info: Certificate Request fingerprint (SHA256): E2:36:E6:CF:A7:B5:0A:A2:CC:3B:78:20:8E:FE:C9:37:4C:80:D2:C2:5C:AC:9C:62:88:7B:4D:A1:F2:A8:B6:96
Info: Caching certificate for ca
Exiting; no certificate found and waitforcert is disabled

4.Create the puppet client certificate by executing "puppet agent -t" and signed it in Satellite.

# puppet cert sign --all
Notice: Signed certificate request for cloud-qe-09.eng.bos.abc.com
Notice: Removing file Puppet::SSL::CertificateRequest cloud-qe-09.eng.bos.abc.com at '/var/lib/puppet/ssl/ca/requests/cloud-qe-09.eng.bos.abc.com.pem'

5. Again, execute below command on the client:
# puppet agent -t
Info: Caching certificate for cloud-qe-09.eng.bos.abc.com
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider]/ensure: created


Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/validate_cmd.rb]/ensure: defined content as '{md5}78fd21cb3fc52efc3b53ba2b3301de18'
Info: Loading facts
Info: Caching catalog for cloud-qe-09.eng.bos.abc.com
Info: Applying configuration version '1514461504'
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 0.03 seconds

I don't see duplicate Hosts under 'All hosts' , host was registered as cloud-qe-09.eng.bos.abc.com.

Comment 6 pm-sat@redhat.com 2018-02-21 16:54:37 UTC
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

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