← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~chad.smith/cloud-init:aws-local-dhcp into cloud-init:master

 

The proposal to merge ~chad.smith/cloud-init:aws-local-dhcp into cloud-init:master has been updated.

Commit Message changed to:

ec2: Allow Ec2 to run in init-local using dhclient in a sandbox.

This branch is a prerequisite for IPv6 support in AWS and allows Ec2 datasource to query the metadata source about whether or not it needs to connfigure IPv6 on interfaces. The DataSourceEc2Local will explicitly not run on FreeBSD because dhclient in that environment doesn't support the -sf flag to allow us to run dhclient without side-effects.

To query AWS' metadata address @ 169.254.169.254, the instance must have an AWS-dhcp-allocated address configured. Configuring IPv4 link-local addresses result in timeouts from the metadata service. So we now have a DataSourceEc2Local subclass which will perform a sandboxed dhclient discovery in order to obtain an authorized IP address which is used to set up eth0 and curl metadata about full instance network configuration.

A subsequent branch will inspect IPv6 capabilities from the metadata harvested and properly write network configuration from the instance for all IPv4 and IPv6 enabled interfaces.

Side note: The only way AWS supports querying ipv6 info from the vm
is via queries of the metadata service. This logic adds an extra dhclient attempt in init-local phase for AWS so there is an additional time cost of around a 10th of a second for boots because of the sandboxed dhclient discovery runs. This timecost would be greater if AWS' dhcp service is slow to respond.

For more details, see:
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/328241
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:aws-local-dhcp into cloud-init:master.