Use hostname instead IP address for finish script
|Triaged:||No||Fixed in Releases:|
|Bugzilla link:||Found in Releases:|
In DHCP-less or external-DHCP environments, image-based provisioning cannot be seeded for virtualized environments.
We need to have opt-in option to use DNS name instead IP address for SSH checks, that will solve the issue. This must be opt-in to prevent mis-provisioning. Also users need to be aware that password or ssh key must be correct in order to connect, it's recommended to change the default password on the image after system is provisioned to something different for production systems.
Fixes #18765 - finish script use FQDN when IP is missing
This is resurrect of
The old patch did not pass review because I was unable to explain the
motivation. The reason for the fallback is that only cloud compute
resources usually provide IP addresses but virtualization do not. Our
users often associate finish templates with libvirt or VMWare but it
does not work at all. This only applies to externally managed networks
where we don't know the IP (no reservation made by Foreman).
Now there is a question of safety, with incorrect DNS setup, Foreman
could run finish script on incorrect server. Therefore I am sending this
patch for discussion - I think I could make this behavior an opt-it via