[Centos] IPV6_AUTOCONF=no when using dhcp6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Harald Jensås |
Bug Description
When instructing cloud-init to use `type: dhcp6` for the subnet of a physical network interface, the end-result is that `/etc/sysconfig
https:/
This configures `network.use_ipv6 = True`, which is fine.
https:/
This configures `IPV6_AUTOCONF=no` to be written whenever `network.use_ipv6` is `True`.
However, in the use-case where dhcp6 is used, `IPV6_AUTOCONF` should be set to `yes`.
Proposed fix:
Distinguish between IPv6 being configured statically or using DHCP when writing the sysconfig file.
Cloud-provider: AWS EC2.
Guest OS: CentOS Linux release 7.5.1804 (Core)
EC2 user-data provided with cloud-init config:
```
#cloud-config
package_upgrade: true
write_files:
- path: /etc/cloud/
owner: root:root
permissions: 0600
content: |
network:
version: 1
config:
- type: physical
name: eth0
subnets:
- type: dhcp
- type: dhcp6
power_state:
mode: reboot
delay: now
message: Rebooting post-config
timeout: 30
condition: True
```
Related branches
- Ryan Harper: Needs Fixing
-
Diff: 357 lines (+206/-6)5 files modifiedcloudinit/net/eni.py (+10/-0)
cloudinit/net/netplan.py (+4/-1)
cloudinit/net/network_state.py (+8/-4)
cloudinit/net/sysconfig.py (+9/-1)
tests/unittests/test_net.py (+175/-0)
description: | updated |
Changed in cloud-init: | |
assignee: | nobody → Harald Jensås (harald-jensas) |
status: | Triaged → In Progress |
Also dealing with this bug. Working around it by manually editing /etc/sysconfig/ network with bootcmd or manually setting the default route.