Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 905205

Summary: User_data file on /media is renamed 'vmPayload' and returns empty
Product: Red Hat Enterprise Virtualization Manager Reporter: Ronelle Landy <rlandy>
Component: vdsmAssignee: Joe Vlcek <jvlcek>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, bazulay, hbrock, iheim, jkt, jvlcek, lpeer, michal.skrivanek, rlandy, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: rbovirt 0.0.17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-31 07:28:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vdsm.log none

Description Ronelle Landy 2013-01-28 20:51:10 UTC
Description of problem:

If a VM (instance) is created (trough Deltacloud/Conductor/Audrey) with user data, the user data is expected to be placed in /media, in a file called deltacloud-user-data.txt.

Using the RHEVM versions listed below, the only file in /media is:
vmPayload
and this file is empty.

[root@dhcp-37-107 media]# ls
vmPayload
[root@dhcp-37-107 media]# cat vmPayload 
[root@dhcp-37-107 media]# 

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

3.1.0-32.el6ev
and
latest qa build (26.1)

How reproducible:

Always


Steps to Reproduce:
1. Start a Deltacloud server pointing at RHEVM 3.1 server
2. Create an instance (VM) with user_data
curl -X POST -F "image_id=<image_id>" -F "name=myUserData" -F "hwp_id=SERVER" -F "realm_id=<realm_id>"  -F "user_data=<some data>" --user "un:pw" "http://<servername>:<port>/api/instances?format=xml"
3. Start the VM
4. ssh to the VM
5. >>  /sbin/modprobe floppy; lsmod | grep floppy
 >> /bin/mount /dev/fd0 /media;
6. See the file on /media - named 'vmPayload'
7. cat vmPayload
  
Actual results:

No user_data

Expected results:

User_data restored in deltacloud-user-data.txt

Additional info:

Attaching vdsm.log

Comment 1 Ronelle Landy 2013-01-28 20:54:17 UTC
Created attachment 689331 [details]
vdsm.log

Comment 2 Ronelle Landy 2013-01-28 20:56:12 UTC
As a side note: We tested this same functionality with a rhevm 3.1 install we had around December 20, 2012 and it worked fine - so we're looking for anything that might have been modified since around then.

Comment 3 Joe Vlcek 2013-01-28 21:56:36 UTC
Using the API direct to RHEVm the user data correctly show up for both cdrom and floppy payload.

Below is an example using payload type floppy. I've also tested
using payload type cdrom and it works too.

My guess is that there is something wrong in ovirt gem.

Using payload type floppy:
--------------------------
# Create VM w/vmpayload floppy:
curl \
  -X POST \
  -H "Accept: application/xml" \
  -H "Content-Type: application/xml" \
  -u  "UN:PW" \
  --cacert rhevm.cer \
  -d "<vm><name>joev_payloadl_floppy_03</name><cluster><name>Default</name></cluster><type>SERVER</type><template><name>rhel63server</name></template><payloads><payload type='floppy'><file name='my_data_floppy.txt'><content>JoePaYlOaDFloPPy</content></file></payload></payloads></vm>" \
  https://<RHEVm host name>/api/vms

export VM_ID="<The vm id returned from last curl cmd>"

# Wait a bit then start it:
curl \
  -X POST \
  -H "Accept: application/xml" \
  -u  "UN:PW" \
  --cacert rhevm.cer   \
  -H "Content-Type: application/xml" \
  -d "<action><vm><os><boot dev='hd'/></os></vm></action>"   \
  https://<RHEVm host name>/api/vms/${VM_ID}/start

# Get the IPAddr to log in:
curl \
  -k  \
  -X GET \
  -H "Accept: application/xml" \
  -u "UN:PW"   \
  https://<RHEVm host name>/api/vms/${VM_ID}

# Log in and get the user data:
% ssh root@<The IPAddr from last curl cmd>
root.37.230's password:
[root@dhcp-37-230 ~]# modprobe floppy
[root@dhcp-37-230 ~]# mount /dev/fd0 /media
[root@dhcp-37-230 ~]# cat /media/my_data_floppy.txt
JoePaYlOaDFloPPy

Comment 4 Joe Vlcek 2013-01-30 14:48:38 UTC
A fix for this issue has been pushed to https://github.com/abenari/rbovirt

commit 97f7262fca19a0bad5992666c5b7c9f86c0bda54

A new gem will be available in a day or two.

Comment 9 Ronelle Landy 2013-02-11 21:43:26 UTC
Fixed in rbovirt gem 0.0.17.

See https://issues.apache.org/jira/browse/DTACLOUD-437 for test/verification details.

Comment 10 Joe Vlcek 2013-11-14 15:42:53 UTC
Can this be marked as closed?

Comment 12 Michal Skrivanek 2014-01-31 07:28:46 UTC
no need to keep this around