Bug 1464043 - Cloud-init network configuraton doesn't work
Cloud-init network configuraton doesn't work
Status: VERIFIED
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt (Show other bugs)
4.2.0
Unspecified Unspecified
high Severity high (vote)
: ovirt-4.2.0
: 4.2.0
Assigned To: eraviv
Vladimir
:
Depends On:
Blocks: 1462654
  Show dependency treegraph
 
Reported: 2017-06-22 06:31 EDT by Vladimir
Modified: 2017-11-22 05:05 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+


Attachments (Terms of Use)
cloud_init log (98.71 KB, text/plain)
2017-06-29 10:33 EDT, Vladimir
no flags Details
Cloud_init log for eth0 interface (98.64 KB, text/plain)
2017-07-06 03:29 EDT, Vladimir
no flags Details
7_4_cloud_init_0_7_9 (89.03 KB, text/plain)
2017-07-31 10:52 EDT, Vladimir
no flags Details
7_3_cloud-init_0_7_9-8 (98.82 KB, text/plain)
2017-07-31 10:53 EDT, Vladimir
no flags Details
7_3_cloud_init_output_0_7_2 (1.90 KB, text/plain)
2017-07-31 10:54 EDT, Vladimir
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 81463 master POST engine: 2017-09-05 09:05 EDT

  None (edit)
Description Vladimir 2017-06-22 06:31:40 EDT
Description of problem:

Configuration of network-related parameters doesn't work

Version-Release number of selected component (if applicable): 4.2.0-0.0.master.20170618184152.gitb0f84a1.el7.centos


How reproducible:


Steps to Reproduce:
1. Create VM with network configured via cloud-init
2. Check VM networking parameters
3.

Actual results: Networking parameters configured according to cloud-init


Expected results: Network parameters unchanged


Additional info: Same procedure with same VM on 4.1.3 works fine

Payload and VM log can be found here https://drive.google.com/drive/folders/0B6guVkGtE_8RMTBlTXZyaE5ZQ2M?usp=sharing
Comment 1 Dan Kenigsberg 2017-06-22 10:22:54 EDT
your meta_data.json show that you use ipv6. can you reproduce the problem with ipv4 alone?

{
  "network-interfaces" : "iface eth1 inet static\n  address 10.0.0.1\n  netmask 255.255.255.0\n  gateway 10.0.0.254\n  dns-nameservers 8.8.8.8\niface eth1 inet6 static\n  address 2620:0052:0000:2342:021a:4aff:fe16:8890\n  gateway 2620:52:0:2342::1\n",
  "availability_zone" : "nova",
  "hostname" : "cloud_init_latest_vm",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "cloud_init_latest_vm",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "40469774-b99e-4f11-9d3f-a596835cbef0"
}
Comment 2 Vladimir 2017-06-29 03:43:59 EDT
Checked with IPv4 only for cloud-init 0.7.2 and 0.7.8 - None of them work

cat /mnt/openstack/latest/meta_data.json 
{
  "network-interfaces" : "iface eth1 inet static\n  address 10.0.0.1\n  netmask 255.255.255.0\n  gateway 10.0.0.254\n  dns-nameservers 8.8.8.8\n  dns-search search.testing.com\niface eth1 inet6 none\n",
  "availability_zone" : "nova",
  "hostname" : "cloud-init",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "cloud-init",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "55a3dab7-3797-4a63-9e27-e82713d13cbb"
Comment 3 Tomas Jelinek 2017-06-29 04:15:35 EDT
- what is the guest operating system you are using?
- can you please provide also the cloud init logs from inside of the guest?
Comment 4 Vladimir 2017-06-29 10:33 EDT
Created attachment 1292900 [details]
cloud_init log
Comment 5 Vladimir 2017-07-03 04:13:35 EDT
Guest operating system is RHEL 7.3
Comment 6 Yaniv Kaul 2017-07-05 07:44:47 EDT
Anything on cloud-init logs? What does 'ip addr show' on the VM show?
Comment 7 Vladimir 2017-07-05 08:16:27 EDT
I attached cloud-init log to the bug, see attachments

Here is 'ip addr show' oputput

[root@cloud222_1 ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1a:4a:16:10:79 brd ff:ff:ff:ff:ff:ff
    inet 10.35.72.121/24 brd 10.35.72.255 scope global dynamic eth0
       valid_lft 43122sec preferred_lft 43122sec
    inet6 2620:52:0:2348:21a:4aff:fe16:1079/64 scope global mngtmpaddr dynamic 
       valid_lft 2591924sec preferred_lft 604724sec
    inet6 fe80::21a:4aff:fe16:1079/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1a:4a:16:10:7a brd ff:ff:ff:ff:ff:ff
Comment 8 Yaniv Kaul 2017-07-05 10:29:03 EDT
1. Does it work with 'eth0' ?
2. Can you configure 'eth1' with DHCP and try again?

I could not see the real difference in the logs, expect to suspect for some reason it only changes the config on an interface with an address (which makes sense if you use cloud-init over the 169.x network, not with a config-drive) - but I did not dive into its code to verify it, only via the logs.
Comment 9 Vladimir 2017-07-06 03:28:27 EDT
1. No, it doesn't work for eth0
2. It also doesn't works 

I'm adding new cloud_init log to attachments
Comment 10 Vladimir 2017-07-06 03:29 EDT
Created attachment 1294893 [details]
Cloud_init log for eth0 interface
Comment 11 Tomas Jelinek 2017-07-12 02:46:10 EDT
it works on 4.1 - targeting 4.2
Comment 13 Vladimir 2017-07-31 10:52 EDT
Created attachment 1307131 [details]
7_4_cloud_init_0_7_9
Comment 14 Vladimir 2017-07-31 10:53 EDT
Created attachment 1307132 [details]
7_3_cloud-init_0_7_9-8
Comment 15 Vladimir 2017-07-31 10:54 EDT
Created attachment 1307138 [details]
7_3_cloud_init_output_0_7_2
Comment 16 Vladimir 2017-07-31 11:03:32 EDT
Hi all, I've uploaded cloud-init logs for various RHEL & cloud_init version combinations. Neither of them worked on 4.2 networking configuration, moreover for RHEL 7.3 & cloud_init 0.7.2 cloud-init log was empty, so I attached cloud-init-output.log

P.S. User configuration worked for RHEL 7.4 & cloud_init 0.7.9-9 though
Comment 17 Michal Skrivanek 2017-08-07 10:09:08 EDT
seems everything is working besides network. Dan, you wanted to reassign?
Comment 18 Vladimir 2017-11-22 05:05:06 EST
Verified on 4.2.0-0.0.master.20171112130303.git8bc889c.el7.centos

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