Bug 1424786

Summary: 'Start on boot' checkbox for Cloud-Init / Network settings for VM should be checked by default (currently, it is unchecked)
Product: [oVirt] ovirt-engine Reporter: Yaniv Kaul <ykaul>
Component: Frontend.WebAdminAssignee: eraviv
Status: CLOSED CURRENTRELEASE QA Contact: Vladimir <vshypygu>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: 754267513, bugs, danken, ipinto, lsvaty, michal.skrivanek, vshypygu
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
smacko: testing_plan_complete-
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:08:25 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:
Bug Depends On: 1330217    
Bug Blocks:    

Description Yaniv Kaul 2017-02-19 13:08:46 UTC
Description of problem:
There's very little point in creating a NIC and defining everything and not having it start on boot. Yet the default is not to have it started on boot. It should be checked by default.

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

How reproducible:
Always

Steps to Reproduce:
1. Edit VM, go to Initial Run
2. Check 'Use Cloud-Init/Sysprep
3. Expand 'Networks'
4. Click on 'Network' and scroll down a bit.

Actual results:
'Start on Boot' not checked by default.

Expected results:
'Start on Boot' checked by default.

Additional info:

Comment 1 Michal Skrivanek 2017-08-22 08:56:51 UTC
Dan, does it make sense? Sounds like a tiny little fix for a newcomer:)

Comment 2 Dan Kenigsberg 2017-08-22 09:02:50 UTC
Flipping the default sounds reasonable, but I'm afraid that I am not familiar with the purpose of the checkbox.

Israel, can you explain what is it good for, and whether you'd want it to be set by default?

Comment 3 Israel Pinto 2017-08-30 06:52:30 UTC
I guess it more PM decision the behavior of run once.
I think it should be set on default.  
If you going to fix this issue please see  this BZ 1439738 also.
Also UI issue in Run once.

Comment 4 Dan Kenigsberg 2017-08-30 07:04:38 UTC
The decision is PM's but I asked for *your* opinion. When unchecked, does it mean that the guest interface on down when the VM starts?

Comment 5 Israel Pinto 2017-08-30 08:13:55 UTC
I recheck it 
Case 1:
2  nics (both nic are up) 
1. Create VM with 2 nics (both nic are up) 
2. Run it with runonce 
   Set the second NIC with cloud init 
   - Enable Network 
   - Add Nic with boot option None, static and DHCP 
     configure nic2 as eth1
     Set start on boot 
3. Check status after VM is up
Results: 
Nic2 is up
 
Case 2:
2  nics (nic1 up, nic2 down) 
Same steps as case 1
Results: 
Nic2 is down

The start on boot has no effect on Nic status.
I don't see we sent it in the payload:
[root@puma42 payload]# cat  /mnt/openstack/latest/
meta_data.json  user_data       
[root@puma42 payload]# cat  /mnt/openstack/latest/*
{
  "network-interfaces" : "auto eth1\niface eth1 inet none\n",
  "availability_zone" : "nova",
  "hostname" : "noc_down",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "noc_down",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "2304c498-322d-4e25-bc68-e6c9aa1de93a"
}#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
password: '1'
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
ssh_pwauth: true
chpasswd:
  expire: false
user: root

Comment 6 Dan Kenigsberg 2017-08-30 08:24:02 UTC
Sorry, Israel, but I don't understand your answer. What is your opinion: should the default be flipped? should the checkbox be dropped completely?

It is not clear which of the two cases generated the payload that you presented (which has only a single eth1 nic)

Comment 7 Israel Pinto 2017-08-30 08:56:07 UTC
I recheck it with one nic.
Steps:
1. Create Vm with one NIC and set nic to down from the engine.
2. Set cloud init:
   -Add network
   -Add NIC
    Name: eth0 
    Enable start on boot for this nic
3. Start VM and check Nic status
Results:
On Guest Nic is down

See payload on host:
[root@puma43 payload]# cat  /mnt/openstack/latest/meta_data.json 
{
  "network-interfaces" : "auto eth0\niface eth0 inet dhcp\n",
  "availability_zone" : "nova",
  "hostname" : "nic_test",
  "launch_index" : "0",
  "meta" : {
    "role" : "server",
    "dsmode" : "local",
    "essential" : "false"
  },
  "name" : "nic_test",
  "network_config" : {
    "path" : "/etc/network/interfaces",
    "content_path" : "/content/0000"
  },
  "uuid" : "d45c5739-f150-4c60-93d3-71756c230c96"
}[root@puma43 payload]# cat  /mnt/openstack/latest/user_data 
#cloud-config
output:
  all: '>> /var/log/cloud-init-output.log'
password: '1'
disable_root: 0
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
ssh_pwauth: true
chpasswd:
  expire: false
user: root


I can't find the start on boot option in the network settings:
  "network-interfaces" : "auto eth0\niface eth0 inet dhcp\n"

Comment 8 Dan Kenigsberg 2017-09-19 11:37:19 UTC
https://gerrit.ovirt.org/#/c/81760/ makes Engine use the modern OpenStack metadata file to communicate with cloud-init.

In it, there is no way to specify anything but start-on-boot=True, so we plan to set the default (and the only valid value) to True.

Comment 9 Vladimir 2017-11-16 16:02:10 UTC
Hi, Dan, where did you find information about start-on-boot?

Right know we have this checkbox checked and non-active, e.g. you cant disable it which might be not suitable for some users.

Comment 10 Dan Kenigsberg 2017-11-16 16:17:48 UTC
This is a known deficiency, due to our moving away from legacy http://cloudinit.readthedocs.io/en/latest/topics/network-config-format-eni.html#network-config-eni to modern https://specs.openstack.org/openstack/nova-specs/specs/liberty/implemented/metadata-service-network-info.html

If you think that it is important for our customers to be able to define a CFG but not actually activate it on boot, please file an RFE on cloud-init, with RHEV as its LayeredProduct.

I, for one, do not think that this is important at all, as cloud-init is all about initialiazing a VM.

Comment 11 Vladimir 2017-11-20 08:02:40 UTC
Verified on Version 4.2.0-0.0.master.20171112130303.git8bc889c.el7.centos

Comment 12 Sandro Bonazzola 2017-12-20 11:08:25 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.