Bug 1462654

Summary: cloud-init IPv6 configuration is broken
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir <vshypygu>
Component: cloud-initAssignee: Ryan McCabe <rmccabe>
Status: CLOSED NOTABUG QA Contact: Vratislav Hutsky <vhutsky>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.3CC: danken, fdinitto, jbadiapa, jgreguske, lars, mmagr, mrunge, mtessun, vshypygu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-26 10:40:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1464043    
Bug Blocks:    

Description Vladimir 2017-06-19 07:59:44 UTC
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 13:15:44 UTC
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 15:17:32 UTC
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 09:16:28 UTC
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 19:13:19 UTC
(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 17:33:03 UTC
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 20:30:09 UTC
Vladimir, now that Bug 1464043 is on_qa, could you give it another go?

Comment 10 Vladimir 2017-09-26 10:33:59 UTC
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 10:40:49 UTC
Thanks Vladimir. It reaffirms that nothing is broken in cloud-init. Bug 1330217 is tracking the missing feature on ovirt-engine side.