Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1428499

Summary: add setting to change host name setting between fqdn and shortname
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Hosts - ContentAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bkearney, jcallaha
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-06 08:38:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
new setting
none
verification screenshot none

Description Justin Sherrill 2017-03-02 17:00:45 UTC
Some users want their hosts to be created without a domain name.  This would involve using the 'network.hostname' property instead of hte 'network.fqdn' or 'network.hostname-override' fact

Comment 1 Justin Sherrill 2017-03-02 17:00:49 UTC
Created from redmine issue http://projects.theforeman.org/issues/17102

Comment 2 Justin Sherrill 2017-03-02 17:00:52 UTC
Upstream bug assigned to jsherril

Comment 3 Justin Sherrill 2017-03-02 17:05:56 UTC
This adds a new setting 'register_hostname_fact' under Administer > Settings > Content that allows the user to specify which subscription manager fact to use for generating the name of the host (in the form of 'network.hostname')

Comment 5 jcallaha 2017-03-03 13:22:36 UTC
Verified in Satellite 6.2.8 Snap 4

You can now set the "Subscription manager name registration fact" in Administer -> Settings -> Katello. To register a host with the fqdn, use the fact "network.fqdn". To register a host with a short name, use the fact "network.hostname". (see attached)

Steps:
1. Set the registration fact to network.fqdn
2. Changed the hostname on the first system to a short name
   [root@cloud-qe-21 ~]# hostname
   cloud-qe-21.idmqe.lab.eng.bos.redhat.com
   [root@cloud-qe-21 ~]# hostname cloud-qe-21
   [root@cloud-qe-21 ~]# hostname
   cloud-qe-21
   [root@cloud-qe-21 ~]# hostname -f
   cloud-qe-21.idmqe.lab.eng.bos.redhat.com
3. Registered the system to Satellite.
4. Set the registration fact to network.hostname
5. Changed the hostname on the second system to a short name
   [root@yttrium ~]# hostname
   yttrium.idmqe.lab.eng.bos.redhat.com
   [root@yttrium ~]# hostnamectl set-hostname yttrium
   [root@yttrium ~]# hostname
   yttrium
   [root@yttrium ~]# hostname -f
   yttrium.idmqe.lab.eng.bos.redhat.com
6. Registered the system

Results:
The first system was correctly registered with its fqdn, and the second system was correctly registered with its short hostname. I put them in a host collection to be more easily seen. (see attached)

Comment 6 jcallaha 2017-03-03 13:23:35 UTC
Created attachment 1259539 [details]
new setting

Comment 7 jcallaha 2017-03-03 13:23:53 UTC
Created attachment 1259540 [details]
verification screenshot

Comment 9 errata-xmlrpc 2017-03-06 08:38:05 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/RHBA-2017:0447