On Ec2, cloud-init will configure networking on all attached NICs, instead of just the primary NIC.
Also add support for rendering secondary static IPv4/IPv6 addresses on any NIC attached to the machine.
For network config, cloud-init now reads Ec2 IMDS metadata API version 2018-09-24. Ec2-lookalike platforms which do not support this version will not get secondary IP addresses configured.
Secondary IPs are listed in IMDS API keys local-ipv4s, ipv6s, subnet-ipv4-cidr-block and subnet-ipv6-cidr-block in order to set proper static IP and CIDR prefix.
Also in this branch:
- Shift DataSourceEc2.network_config to emit v2 instead of v1.
- Add an apply_network_config Ec2 datasource config option which
allows images to disable network config for secondary NICs and
secondary IP addresses by setting apply_network_config: false
LP: #1866930
该提问来源于开源项目:canonical/cloud-init