View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015833 | CentOS-7 | cloud-init | public | 2019-02-15 23:59 | 2020-11-11 18:22 |
Reporter | dekimsey | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Product Version | 7.6.1810 | ||||
Summary | 0015833: ipv6 router advertisements are disabled due to IPV6_AUTOCONF=no | ||||
Description | I tested this with an Amazon VPC with working IPv6 configuration (the amazon-ami's work fine) using cloud-init 18.2_1. If one assigns an IPv6 address to the machine via DHCP6. Cloudinit sets up a configuration that apparently disables router advertisements due to side-effect. As a result the box has no default gateway and is unable to send IPv6 traffic (Network unreachable errors). I found someone else mentioning this issue here and their work-around: https://access.redhat.com/solutions/347693#comment-520173 And it basically came down to having IPV6_AUTOCONF=no which sets the sysctl setting, net.ipv6.conf.eth0.accept_ra=0. Disabling router advertisements. Overriding IPV6_AUTOCONF in /etc/sysconfig/network-scripts to yes enables the seemingly correct functionality. This appears to be set by cloud-init in /usr/lib/python2.7/site-packages/cloudinit/net/sysconfig.py. | ||||
Steps To Reproduce | 1. Verify ipv6 ip: `ip a show dev eth0` 2. Verify no default route: `ip -6 r show dev eth0` 3. Verify ping fails: `ping6 -c1 ipv6.google.com` 4. Set IPV6_AUTOCONF=yes in /etc/sysconfig/network-scripts 5. Restart networking: `sudo systemctl restart network` 6. Verify default route: `ip -6 r show dev eth0 | grep default` 7. Verify ping succeeds: `ping6 -c1 ipv6.google.com` | ||||
Tags | cloud-init, IPv6, network | ||||
abrt_hash | |||||
URL | |||||
related to | 0014760 | new | cloud-init failed and crash the server after update to CentOS 7.5 |
Hi there, I have also came across this issue in Amazon AWS with the official CentOS 7 image, but in my case the file to edit is /etc/sysconfig/network and must manually change to IPV6_AUTOCONF=yes I have also tried to simply add a script to /etc/cloud/cloud.cfg.d/99-net-ipv6.cfg #cloud-config network: version: 1 config: - type: physical name: eth0 subnets: - type: dhcp - type: dhcp6 just by adding the script mand rebooting it doesn't work. I had to go manually and edit /etc/sysconfig/network setting ipv6_autoconf to yes and has been persisting... |
|
Meanwhile I just verified on cloud-init bug tracker the fix has been committed 1 hour ago... | |
@maverickws : myself have the issue that appeared in cloud-init from 7.7 it seems : Commit : https://git.centos.org/rpms/cloud-init/c/738010598bffd8b7f249b35fe0ed5020b442dfec?branch=c7 It patches upstream cloud-init like this : https://git.centos.org/rpms/cloud-init/blob/c7/f/SOURCES/0006-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch#_26 Have you pointer to upstream cloud-init bug tracker ? we can then have a look as I see conflicting ideas in that .patch files. I can confirm that having the CentOS 7 AMI image deployed needs this to work fine : sed -i 's/IPV6_AUTOCONF=no/IPV6_AUTOCONF=yes/' /usr/lib/python2.7/site-packages/cloudinit/net/sysconfig.py And it works so after a reboot too (as cloud-init then puts IPV6_AUTOCONF=yes in /etc/sysconfig/network) The only "interesting" thing is that through autoconf/radvd, the centos ami gets a wrong /128 subnet, but router is reachable and connectivity works too |
|
I can confirm that arrfabs fix works (t2 micro instance) |
|
Confirm that this fix still works (and is still needed) on some CentOS images as most recent as 7.8 | |
The complete cloud-init configuration I'm having to use to properly get IPV6 routing working in 7.8: ``` #cloud-config network: version: 1 config: - type: physical name: eth0 subnets: - type: dhcp4 - type: dhcp6 bootcmd: - "sed -i 's/^IPV6_AUTOCONF=.*$/IPV6_AUTOCONF=yes/g' /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network" - systemctl restart network ``` |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2019-02-15 23:59 | dekimsey | New Issue | |
2019-02-15 23:59 | dekimsey | Tag Attached: cloud-init | |
2019-02-15 23:59 | dekimsey | Tag Attached: IPv6 | |
2019-02-15 23:59 | dekimsey | Tag Attached: network | |
2019-11-20 19:27 | maverickws | Note Added: 0035717 | |
2019-11-20 19:44 | maverickws | Note Added: 0035718 | |
2020-01-07 07:25 | arrfab | Status | new => acknowledged |
2020-01-07 07:25 | arrfab | Relationship added | related to 0001476 |
2020-01-07 07:25 | arrfab | Relationship added | related to 0014760 |
2020-01-07 07:25 | arrfab | Relationship deleted | related to 0001476 |
2020-01-07 07:29 | arrfab | Note Added: 0035948 | |
2020-01-07 20:17 | tigalch | Note Added: 0035961 | |
2020-01-07 20:19 | tigalch | Note Edited: 0035961 | |
2020-06-24 04:49 | wicaeed | Note Added: 0037222 | |
2020-11-11 18:22 | dekimsey | Note Added: 0037868 |