Bug 1014194 - [ovirt-engine-backend] cloud-init fake-cdrom is attached even during normal Run action
[ovirt-engine-backend] cloud-init fake-cdrom is attached even during normal R...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.3.0
Assigned To: Omer Frenkel
Pavel Novotny
Depends On:
Blocks: 1019461 3.3snap3
  Show dependency treegraph
Reported: 2013-10-01 09:58 EDT by Jiri Belka
Modified: 2014-01-21 17:28 EST (History)
9 users (show)

See Also:
Fixed In Version: is24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
engine.log, vdsm.log (28.85 KB, application/x-gzip)
2013-10-01 09:58 EDT, Jiri Belka
no flags Details
vdsm.log (VM migration) (33.40 KB, text/plain)
2013-10-02 07:16 EDT, Pavel Novotny
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 21329 None None None Never
oVirt gerrit 21333 None None None Never

  None (edit)
Description Jiri Belka 2013-10-01 09:58:28 EDT
Created attachment 805987 [details]
engine.log, vdsm.log

Description of problem:
cloud-init fake-cdrom is attached even during normal Run action.

New Vm -> Run...

# ps aux | grep '[q]emu.*never-cloud-init' | sed 's/ /\n/g' | grep /var/run/vdsm/payload

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

How reproducible:

Steps to Reproduce:
1. have rhevm33/is17
2. create a rhel 6 x86_64 vm with a disk (1gb)
3. run vm

Actual results:
cloud-init iso is attached

Expected results:
cloud-init iso should be attached only when explicitly requested by run once

Additional info:
Comment 1 Pavel Novotny 2013-10-02 07:15:39 EDT
Related problem also happens during migration of such a VM (with attached cloud-init image).

1. follow steps in comment#0
2. migrate the VM

Actual results:
Error message in Webadmin: "VM linux-vm01 is down. Exit message: [Errno 2] No such file or directory: '/tmp/tmpog0BvS/openstack/latest/meta_data.json'."

Traceback in VDSM log (attached): 

RuntimeError: migration destination error:
Thread-239668::ERROR::2013-10-02 13:08:18,096::vm::318::vm.Vm::(run) vmId=`2dee662a-ba8f-4a26-834f-1ccdce1158a9`::Failed to migrate
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 305, in run
  File "/usr/share/vdsm/vm.py", line 341, in _startUnderlyingMigration
RuntimeError: migration destination error: Error creating the requested VM
Comment 2 Pavel Novotny 2013-10-02 07:16:31 EDT
Created attachment 806391 [details]
vdsm.log (VM migration)
Comment 4 Martin Polednik 2013-10-03 05:34:53 EDT
from vdsm's point of view it seems that the cloud-init is explicitly requested by engine (vmCreate received additional payload openstack/latest/meta_data.json) - need someone from engine side to look into why is this being sent in the create command without user's explicit request
Comment 5 Omer Frenkel 2013-10-03 11:04:19 EDT
cloud init is used on first run of vm with linux-type os.
this is done to be parallel to vms with windows os, which on first run attach the sysprep floppy.

on second run this should not happen. currently it looks useless, as cloud-init info can be set only on run-once, but WIP to save this info with the vm/template just as sysprep.

unless im wrong (the cd is attached also on next runs), or you don't agree, we can close this bug as not a bug.
Comment 6 Michal Skrivanek 2013-10-04 05:25:11 EDT
well, it's still wrong though, we should not send the image on regular Run even on the first run as there is no configuration (and we indeed send a sort of empty config for cloud-init)

indeed on second run it's not being sent

would be nice to fix since this is a new feature and such a CD might be quite surprising
Comment 7 Pavel Novotny 2013-11-21 06:28:07 EST
Verified in rhevm-3.3.0-0.35.beta1.el6ev.noarch (is24).

Verification steps:
1. Create new RHEL 6 VM `vm-rhel6` with a bootable disk.
2. Run the VM.
3. Check the qemu process on the host for attached cloud-init cdrom image file.

Results: no cloud-init cdrom image is attached (`ps aux | grep '[q]emu.*vm-rhel6' | sed 's/ /\n/g' | grep /var/run/vdsm/payload` returns nothing).
Comment 8 Itamar Heim 2014-01-21 17:24:08 EST
Closing - RHEV 3.3 Released
Comment 9 Itamar Heim 2014-01-21 17:25:07 EST
Closing - RHEV 3.3 Released
Comment 10 Itamar Heim 2014-01-21 17:28:41 EST
Closing - RHEV 3.3 Released

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