1. Proposed title of this feature request
Would like to able to set a hostname based on dns during auto discovery.
2. What is the nature and description of the request?
In the discovery rules CU wants to set the hostname as per defined it's DNS name in 'host template'. so that when a system is auto provisioned it is set to the dns hostname based on the static IP address given by a DHCP server.
3. Why does the customer need this? (List the business requirements here)
As per the CU they are having hundreds of systems at sites with predefined hostnames, if they need to reinstalled or installed as a new system it would require setting the exact hostname for them.
4. How would the customer like to achieve this? (List the functional requirements here)
In the discovery rules CU wants to set the hostname as per defined it's DNS name in 'host template'.
5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
when a system is auto provisioned it is set to the dns hostname based on the static IP address given by a DHCP server
6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
7. Does the customer have any specific time-line dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
8. List any affected packages or components.
9. Would the customer be able to assist in testing this functionality if implemented?
we are tracking similar request to simply send DHCP "hostname" along with other facts and also DNS PTR name associated with a (static) IP. Any of the two new facts can be then used for discovered hostname instead of the default "macXXXX". Will this work for the user? Can you confirm?
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18148 has been resolved.
This bug is scheduled for Satellite 6.3 as you can see in the flag: pm-rhel=sat-6.3.0. Since this is a new feature, it is not a candidate for backport into 6.2.
QA notes, scenario A: use DHCP advertised hostname as discovered node name.
- Setup DHCP server to have longer lease (6 hours for testing)
- Restart DHCP server
- Create a VM, install OS manualy, give it a hostname "mytest"
- Reboot the system via DHCP and make sure the lease contains hostname option
- Set "Hostname facts" to [nmprimary_dhcp4_option_host_name, discovery_bootif] (this is array of two options)
- Set "Discovery prefix" to "xxx_"
- Reboot the system into discovery while keeping the MAC address
- The DHCP server advertise hostname "mytest" (from the lease)
- The host should appear as "xxx_mytest"
- Whole test scenario must be done within 6 hours
QA notes, scenario B: use DHCP advertised hostname as provisioned system hostname.
- Configure DHCP and install/boot a named OS with "myhost" hostname as in scenario A
- Revert "Hostname facts" to default value
- Revert "Discovery prefix" to default value
- Reboot the system into discovery
- The host should appear as "macAABBCCDDEEFF" (normally)
- Create a discovery rule with some valid hostgroup that always matches
- Set hostname to: xxx_<%= @host.facts['nmprimary_dhcp4_option_host_name'] %>
- Provision the discovered host via Auto provision
- The provisioned system should be named: xxx_myhost
Note both scenarios will only work when DHCP hostnames are unique. This is quite special Satellite 6 setup, I don't expect many customers to have this kind of setup.
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.