Bug 1428499 - add setting to change host name setting between fqdn and shortname
Summary: add setting to change host name setting between fqdn and shortname
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-02 17:00 UTC by Justin Sherrill
Modified: 2019-06-13 21:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 08:38:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
new setting (36.16 KB, image/png)
2017-03-03 13:23 UTC, jcallaha
no flags Details
verification screenshot (22.92 KB, image/png)
2017-03-03 13:23 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17102 0 Normal Closed add setting to change host name setting between fqdn and shortname 2020-09-03 23:32:37 UTC
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

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


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