← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~chad.smith/cloud-init:set-hostname-before-network into cloud-init:master

 

The proposal to merge ~chad.smith/cloud-init:set-hostname-before-network into cloud-init:master has been updated.

Description changed to:

set_hostname: When present in metadata, set it before network bringup.

When instance metadata/user-data provides hostname information, run
cc_set_hostname in the init-local stage before network comes up.

This prevents an initial DHCP request which would leak the stock
cloud-image seed hostname before the user-data/metadata provided hostname
was processed. A leaked cloud-image hostname adversely affects Dynamic
DNS which would continue reallocate 'ubuntu' hostname in DNS to every
instance brought up by cloud-init. These instances would only update DNS
to the cloud-init configured hostname upon DHCP lease renewal.

This branch extends the get_hostname methods in datasource, cloud and util to limit results to metadata_only to avoid extra cost of querying
the distro for hostname information if metadata does not provide that information.

LP: #1746455

For more details, see:
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/339720
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:set-hostname-before-network into cloud-init:master.


References