Bug 1462654 - cloud-init IPv6 configuration is broken
cloud-init IPv6 configuration is broken
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-init (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Ryan McCabe
Vratislav Hutsky
: Triaged
Depends On: 1464043
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-19 03:59 EDT by Vladimir
Modified: 2017-09-26 06:40 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-26 06:40:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vladimir 2017-06-19 03:59:44 EDT
Description of problem:
cloud-init configures IPv6 related parameters incorrectly.

Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. Configure IPv6 address, subnet prefix, gateway with cloud-init ( I was using oVirt VM for this)
2. Start instance


Actual results: IPv6 related parameters are configured like IPv4 in the ifcfg scripts. E.g. IPADDR instead of IPv6ADDR


Expected results: IPv6 parameters are configured in a correct way


Additional info:
cloud-init: cloud-init-0.7.2-3.el7.noarch
Screenshots, meta_data.json and logs are available here: https://drive.google.com/drive/folders/0B6guVkGtE_8RNGk3NlNhX0VSR2M?usp=sharing
Comment 2 Dan Kenigsberg 2017-06-19 09:15:44 EDT
Payload generated by oVirt

{
  "network-interfaces" : "iface eth1 inet static\n  address 10.0.0.1\n  netmask 255.255.255.0\n  gateway 10.0.0.254\niface eth1 inet6 static\n  address 2620:0052:0000:2342:021a:4aff:fe16:8890\n  netmask 64\n  gateway 2620:52:0:2342::1\n",
  "availability_zone" : "nova",
  "hostname" : "cloud1",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "cloud1",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "7c436bcf-726b-417e-891f-bc08a9d832b0"
}

note that we are using ENI for network interfaces.
Comment 4 Vladimir 2017-06-19 11:17:32 EDT
Also, it doesn't matter if we specify both IPv4 and IPv6 configurations or not

{
  "network-interfaces" : "auto eth1\niface eth1 inet none\niface eth1 inet6 static\n  address 2620:0052:0000:2342:021a:4aff:fe16:8890\n  netmask 64\n  gateway 2620:52:0:2342::1\n",
  "availability_zone" : "nova",
  "hostname" : "cloud1",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "cloud1",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "a6e6349d-2de2-4fb8-aa37-0137e940a742"
}

results in 

root@cloud1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 
# Created by cloud-init v. 0.7.2 on Mon, 19 Jun 2017 11:48:54 +0000
NETMASK=64
BOOTPROTO=static
DEVICE=eth1
IPADDR=2620:0052:0000:2342:021a:4aff:fe16:8890
GATEWAY=2620:52:0:2342::1
ONBOOT=yes
Comment 6 Vladimir 2017-07-06 05:16:28 EDT
I cannot check with latest cloud_init version since whole network configuration is broken in the 4.2 RHEV at the moment
Comment 7 Dan Kenigsberg 2017-07-12 15:13:19 EDT
(In reply to Vladimir from comment #6)
> I cannot check with latest cloud_init version since whole network
> configuration is broken in the 4.2 RHEV at the moment

This is an unhelpful statement. Could you please explain what is broken? Please sync with myakove and mburman (network qe), who have not reported total breakage.
Comment 8 Dan Kenigsberg 2017-07-18 13:33:03 EDT
Less dramatic answer: bug 1464043 reports that in 4.2, cloud-init fails to configure networking altogether. Host and VM network config is all fine.
Comment 9 Dan Kenigsberg 2017-09-19 16:30:09 EDT
Vladimir, now that Bug 1464043 is on_qa, could you give it another go?
Comment 10 Vladimir 2017-09-26 06:33:59 EDT
Hi, Dan
I've checked with  cloud-init-0.7.9-9.el7.x86_64 on 4.2.0-0.0.master.20170920172148.git8366a0b.el7.centos
COnfigured both IPv4 and IPv6 to static. IPv6 wasn't configured

Here is metadata.json
{
  "network-interfaces" : "auto eth1\niface eth1 inet static\n  address 10.0.0.1\n  netmask 255.255.255.0\n  gateway 10.0.0.254\n",
  "availability_zone" : "nova",
  "hostname" : "rhel74_guest",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "rhel74_guest",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "a144cee0-982c-477f-b54d-66330928b741"
}
Comment 11 Dan Kenigsberg 2017-09-26 06:40:49 EDT
Thanks Vladimir. It reaffirms that nothing is broken in cloud-init. Bug 1330217 is tracking the missing feature on ovirt-engine side.

Note You need to log in before you can comment on or make changes to this bug.