-
Notifications
You must be signed in to change notification settings - Fork 82
getfqdn overrides user provided hostname #15
Comments
/cc @akutz |
Good catch! |
Hi @ykakarap, I thought more about this, and I'm not sure this is a bug. The user does provide a hostname in the metadata, but that gets applied when the networking configuration is applied at the end of the |
I've run into an issue with this.. I have metadata that sets the hostname. The new vm from template boots up with the 'templatename' as the hostname initially and gets an address from dhcp with the template name. Then cloud-init runs and sets the hostname to the metadata specified name, but a few seconds later it sets it back because it gets the original template name back from dhcp reverse lookup.. Maybe my cloud-init isn't running before network initializes like it should? |
This issue is being closed because this datasource has been merged into cloud-init (canonical/cloud-init#953):
In order to participate in the growth of this datasource moving forward, please:
Once again, many thanks to the wonderful community that has grown around this datasource, and I look forward to seeing everyone in the new cloud-init forums! |
The data source here always overrides the metadata's
hostname
andlocal-hostname
fields using thesocket.getfqdn()
. Refer to the following lines:Because of the above-mentioned, the user cannot set the hostname using metadata. The value of
getfqdn
is always set as the hostname.This is creating a problem in projects like CAPV where CAPV expects to set the hostname but is unable to.
The text was updated successfully, but these errors were encountered: