Bug 1120092

Summary: Could-init | enable network 'Start on Boot' without IP/NETMASK/GATEWAY (BOOTPROTO=none)
Product: [Retired] oVirt Reporter: Meni Yakove <myakove>
Component: ovirt-engine-coreAssignee: Greg Padgett <gpadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: medium    
Version: 3.5CC: amureini, bugs, ecohen, gklein, iheim, lvernia, masayag, mburman, michal.skrivanek, myakove, rbalakri, s.kieske, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: ovirt-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:30:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Meni Yakove 2014-07-16 09:22:17 UTC
Description of problem:
In order to configure network using could-init the user must enter IP/NETMASK/GATEWAY.
There is no way to add network with 'start on boot' = yes and 'bootproto' = none.

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch

Actual results:
User must enter IP/NETMASK/GATEWAY to add network using could-init

Expected results:
User can add network without IP/NETMASK/GATEWAY and with 'start on boot'

Comment 1 Michal Skrivanek 2014-07-18 09:48:29 UTC
is this an RFE?
you should be able to achieve what you need by using a custom script

Comment 2 Meni Yakove 2014-07-20 06:16:10 UTC
But configure interface with bootproto=none and without IP is legit and we should support it without any user script.

Comment 3 Moti Asayag 2014-07-22 13:09:40 UTC
I tested the following configuration which should be supported via the rest-api:

[ [ "org.ovirt.engine.core.common.businessentities.VmInitNetwork", {
  "startOnBoot" : false,
  "name" : "eth0",
  "bootProtocol" : "STATIC_IP",
  "ip" : "10.35.7.222",
  "netmask" : "255.255.254.0",
  "gateway" : "10.35.7.254",
  "id" : null
} ], [ "org.ovirt.engine.core.common.businessentities.VmInitNetwork", {
  "startOnBoot" : true,
  "name" : "eth1",
  "bootProtocol" : "NONE",
  "id" : null
} ] ]

Specifically for the second nic 'eth1' which has a boot protocol 'NONE'.

The content of the vm payload is:
iface eth0 inet static
  address 10.35.7.222
  netmask 255.255.254.0
  gateway 10.35.7.254
iface eth1 inet none
auto eth0 eth1

And the result of it on the guest is:
[admin@localhost network-scripts]$ cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Created by cloud-init v. 0.7.2 on Tue, 22 Jul 2014 12:59:23 +0000
DEVICE=eth1
ONBOOT=no

which is complied with the request of this bug.

Since this could be achieved via the rest-api, I don't see why it couldn't be supported by the UI as well.

Comment 4 Lior Vernia 2014-07-24 12:53:34 UTC
Assigning to Greg, as this seems like a reasonably easy fix for someone who knows the code; probably what's needed is to have a choice of boot protocol in the GUI similar to that in the API (either using a list box or a radio button) instead of a DHCP checkbox, and flush that data to the backend action parameters.

Comment 5 Michael Burman 2014-09-09 07:42:11 UTC
Verified on - 3.5.0-0.10.master.el6ev

Comment 6 Sandro Bonazzola 2014-10-17 12:30:31 UTC
oVirt 3.5 has been released and should include the fix for this issue.