[FFe] ec2 add support for configuring secondary NICs and secondary ipv4 and ipv6 addresses

Bug #1866930 reported by Chad Smith
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
High
Chad Smith

Bug Description

Ec2's IMDS metadata reports network configuration for any secondary IPv4 and IPv6 addresses that have been created and attached to any NIC associated with an instance.

cloud-init currently only renders network config on the primary NIC (eth0).

Cloud-init should add network configuration for an additional attached NICs beyond the primary eth0 as well as add static IP configuration for any secondary IPv4 of IPv6 addresses present on each NIC.

This avoids forcing the manual network configuration onto the end-user or image creator after initial system boot for secondary NICs or IP addresses.

To obtain this data from Ec2 IMDS, cloud-init needs to crawl Ec2 metadata version 2018-09-24, if present, to obtain lists of secondary ip addresses from metadata keys "ipv6s" and "local-ipv4s".

Combined with the keys "subnet-ipv4-cidr-block" and
"subnet-ipv6-cidr-block", cloud-init can configure appropriate static IP CIDRs for any of the secondary IPs assigned to a NIC.

To retain original behavior of stable ubuntu releases, ensure this automatic secondary IP address configuration can also be disabled.

This code change will only impact Ec2 datasources launched on Focal and
can be optionally disabled in an image if undesired.

Chad Smith (chad.smith)
description: updated
description: updated
Chad Smith (chad.smith)
description: updated
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream pull request has been created that should address this bug
https://github.com/canonical/cloud-init/pull/114

Changed in cloud-init (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Chad Smith (chad.smith)
Chad Smith (chad.smith)
summary: - [FFe] ec2 add support for configuring secondary ipv4 and ipv6 addresses
+ [FFe] ec2 add support for configuring secondary NICs and secondary ipv4
+ and ipv6 addresses
description: updated
Chad Smith (chad.smith)
description: updated
Revision history for this message
Dan Watkins (oddbloke) wrote :
Changed in cloud-init (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

FFe approved.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 20.1-10-g71af48df-0ubuntu2

---------------
cloud-init (20.1-10-g71af48df-0ubuntu2) focal; urgency=medium

  * d/control: add python3-pytest to Build-Depends
    - This fixes upstream daily builds. python3-nose is not removed from
      Build-Depends because, currently, the Ubuntu package builds will still
      use it for testing.
  * cherry-pick 6600c642: ec2: render network on all NICs and add
    secondary IPs as (LP: #1866930)

 -- Chad Smith <email address hidden> Wed, 18 Mar 2020 14:01:37 -0600

Changed in cloud-init (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.