Bug 1014194 - [ovirt-engine-backend] cloud-init fake-cdrom is attached even during normal Run action
Summary: [ovirt-engine-backend] cloud-init fake-cdrom is attached even during normal R...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.3.0
Assignee: Omer Frenkel
QA Contact: Pavel Novotny
URL:
Whiteboard: virt
Depends On:
Blocks: 1019461 3.3snap3
TreeView+ depends on / blocked
 
Reported: 2013-10-01 13:58 UTC by Jiri Belka
Modified: 2014-01-21 22:28 UTC (History)
9 users (show)

Fixed In Version: is24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 21329 0 None None None Never
oVirt gerrit 21333 0 None None None Never

Description Jiri Belka 2013-10-01 13:58:28 UTC
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
file=/var/run/vdsm/payload/7e37afb8-058e-4543-8a47-4ee80995cb36.b6e1cd534ad800471d2431a8041f050d.img,if=none,media=cdrom,id=drive-ide0-1-1,readonly=on,format=raw,serial=

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

How reproducible:
100%

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 11:15:39 UTC
Related problem also happens during migration of such a VM (with attached cloud-init image).

Reproducer:
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
    self._startUnderlyingMigration()
  File "/usr/share/vdsm/vm.py", line 341, in _startUnderlyingMigration
    response['status']['message'])
RuntimeError: migration destination error: Error creating the requested VM
}}}

Comment 2 Pavel Novotny 2013-10-02 11:16:31 UTC
Created attachment 806391 [details]
vdsm.log (VM migration)

Comment 4 Martin Polednik 2013-10-03 09:34:53 UTC
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 15:04:19 UTC
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 09:25:11 UTC
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 11:28:07 UTC
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 22:24:08 UTC
Closing - RHEV 3.3 Released

Comment 9 Itamar Heim 2014-01-21 22:25:07 UTC
Closing - RHEV 3.3 Released

Comment 10 Itamar Heim 2014-01-21 22:28:41 UTC
Closing - RHEV 3.3 Released


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