IPv6-enabled EC2 subnets always have dhcp enabled

Bug #1976526 reported by Major Hayden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
High
Unassigned
cloud-init (Fedora)
Confirmed
Undecided

Bug Description

A Fedora user opened an issue[0] about an issue with cloud-init on EC2. When they launch an instance on a IPv6-enabled subnet, cloud-init sets the `ipv6.method` to `dhcp` in NetworkManager.

However, AWS uses router advertisements to let instances know about the nearest router. Using the `ipv6.method: dhcp` setting prevents router advertisements from working. The instance ends up with an IPv6 address assigned, but it cannot route traffic.

A workaround is to run NetworkManager commands to fix the issue:

```
nmcli con edit CONNECTION_UUID
nmcli> set ipv6.method auto
nmcli> save
nmcli> activate
```

The instance immediately routes IPv6 traffic after making that change. The dhcp setting appears to be applied automatically for EC2 subnets with IPv6 addresses assigned[1].

I would expect `ipv6.method` to be `auto` in these situations.

Thank you!

[0] https://pagure.io/cloud-sig/issue/382
[1] https://github.com/canonical/cloud-init/blob/53a995e2f852d043d51ad25c1b9afbbe1edafd57/cloudinit/sources/DataSourceEc2.py#L861-L863

Revision history for this message
In , mhayden (mhayden-redhat-bugs) wrote :

A Fedora user opened an issue[0] about an issue with cloud-init on EC2. When they launch an instance on a IPv6-enabled subnet, cloud-init sets the `ipv6.method` to `dhcp` in NetworkManager.

However, AWS uses router advertisements to let instances know about the nearest router. Using the `ipv6.method: dhcp` setting prevents router advertisements from working. The instance ends up with an IPv6 address assigned, but it cannot route traffic.

A workaround is to run NetworkManager commands to fix the issue:

```
nmcli con edit CONNECTION_UUID
nmcli> set ipv6.method auto
nmcli> save
nmcli> activate
```

The instance immediately routes IPv6 traffic after making that change. The dhcp setting appears to be applied automatically for EC2 subnets with IPv6 addresses assigned[1].

I would expect `ipv6.method` to be `auto` in these situations.

Thank you!

[0] https://pagure.io/cloud-sig/issue/382
[1] https://github.com/canonical/cloud-init/blob/53a995e2f852d043d51ad25c1b9afbbe1edafd57/cloudinit/sources/DataSourceEc2.py#L861-L863

Changed in cloud-init (Fedora):
importance: Unknown → Undecided
status: Unknown → Confirmed
James Falcon (falcojr)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.