weixin_39830225 2020-11-21 21:02
浏览 1

ec2: render network on all NICs and add secondary IPs as static

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

  • 写回答

5条回答 默认 最新

  • weixin_39830225 2020-11-21 21:02
    关注

    Just tested on ec2 instance with multiple nics https://paste.ubuntu.com/p/DyvY7vjFyN/

    评论

报告相同问题?