euca-bundle-image fails to use symbolic links

Bug #522292 reported by Mathias Gug
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
euca2ools
Fix Released
Undecided
Unassigned
cloud-utils (Ubuntu)
Fix Released
High
Scott Moser
Lucid
Fix Released
High
Scott Moser
euca2ools (Ubuntu)
Fix Released
High
Dustin Kirkland 
Lucid
Fix Released
High
Dustin Kirkland 

Bug Description

While trying to run a lucid image on Lucid UEC the instance isn't able to be started.

According to the libvirt log file:

ubuntu@mabolo:~$ sudo cat /var/log/libvirt/qemu/i-4EC209E0.log
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 512 -smp 2 -name i-4EC209E0 -uuid a4315a8f-5c7c-ca4c-f158-4139e1663fd9 -nographic -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/i-4EC209E0.monitor,server,nowait -monitor chardev:monitor -boot c -kernel /var/lib/eucalyptus/instances//admin/i-4EC209E0/kernel -append root=/dev/sda1 console=ttyS0 -drive file=/var/lib/eucalyptus/instances//admin/i-4EC209E0/disk,if=scsi,index=0,boot=on -net nic,macaddr=d0:0d:4e:c2:09:e0,vlan=0,model=e1000,name=e1000.0 -net tap,fd=65,vlan=0,name=tap.0 -chardev file,id=serial0,path=/var/lib/eucalyptus/instances//admin/i-4EC209E0/console.log -serial chardev:serial0 -parallel none -usb
qemu: could not load kernel '/var/lib/eucalyptus/instances//admin/i-4EC209E0/kernel': Success

The following messages can be found in the kernel dmesg:

[324292.651948] type=1505 audit(1266263729.611:11): operation="profile_load" pid=28516 name="libvirt-a4315a8f-5c7c-ca4c-f158-4139e1663fd9"
[324292.661181] device vnet0 entered promiscuous mode
[324292.663037] br0: port 2(vnet0) entering learning state
[324292.664674] type=1503 audit(1266263729.620:12): operation="open" pid=28524 parent=1 profile="libvirt-a4315a8f-5c7c-ca4c-f158-4139e1663fd9" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/proc/28524/status"
[324292.664695] type=1503 audit(1266263729.620:13): operation="capable" pid=28524 parent=1 profile="libvirt-a4315a8f-5c7c-ca4c-f158-4139e1663fd9" name="setpcap"
[324292.961606] br0: port 2(vnet0) entering disabled state
[324293.039824] device vnet0 left promiscuous mode
[324293.039828] br0: port 2(vnet0) entering disabled state
[324322.741666] type=1505 audit(1266263759.752:14): operation="profile_remove" pid=28601 name="libvirt-a4315a8f-5c7c-ca4c-f158-4139e1663fd9" namespace="default"

eucalyptus: 1.6.2~bzr1189-0ubuntu1
libvirt: 0.7.5-5ubuntu7
qemu-kvm: 0.12.2-0ubuntu6

Revision history for this message
Scott Moser (smoser) wrote :

I suspect something is wrong before qemu-kvm is involved.

I just verified that I can do the following on 'mabolo':

=== go.sh ===
tmpd=$PWD/t
mkdir ${tmpd}
qemu-img create -f qcow2 "${tmpd}/disk" 1G

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/bin/kvm -M pc-0.12 -enable-kvm -m 512 -smp 2 -name i-4EC209E0 -uuid a4315a8f-5c7c-ca4c-f158-4139e1663fd9 -nographic -chardev socket,id=monitor,path=${tmpd}/i-4EC209E0.monitor,server,nowait -monitor chardev:monitor -boot c -kernel ${1} -append "root=/dev/sda1 console=ttyS0" -drive file=${tmpd}/disk,if=scsi,index=0,boot=on -net nic,macaddr=d0:0d:4e:c2:09:e0,vlan=0,model=e1000,name=e1000.0 -net tap,fd=65,vlan=0,name=tap.0 -parallel none -usb -serial stdio

=== end go.sh ===

The differences in the command above are really only in where the monitor and are directed. With the above, kvm will successfully load the kernel and panic with "cant find root" (because there is no root in the newly created disk image).

I tested above with kernel lucid-server-uec-amd64-vmlinuz-virtual.20100216

Revision history for this message
Thierry Carrez (ttx) wrote :

Testing with todays UEC + todays image :
20100218 starts booting alright, is "running" from a UEC perspective. I run into bug 523832, but that seems way later than this bug. Can you still reproduce it ?

Thierry Carrez (ttx)
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Scott Moser (smoser) wrote :

Verified this is a result of using 'uec-publish-image' and how it calls euca-bundle-image.

affects: ubuntu → cloud-utils (Ubuntu)
Changed in cloud-utils (Ubuntu):
assignee: nobody → Scott Moser (smoser)
importance: Undecided → High
milestone: none → lucid-alpha-3
status: Incomplete → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

Euca2ools euca-bundle-image fails to work with a --image file , where 'file' is a symbolic link.

I'm attaching a simple script that shows the problem.
It creates a 1M file, then bundles it and a symlink to it. The symlinked file will be tiny, the real file a representative size.

Changed in cloud-utils (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Scott Moser (smoser) wrote :

this suitably worked around in lp:~ubuntu-on-ec2/ubuntu-on-ec2/cloud-utils .
Tomorrow I will spend some time trying to fix the underlying issue in euca2ools.

Changed in cloud-utils (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-utils - 0.5-0ubuntu1

---------------
cloud-utils (0.5-0ubuntu1) lucid; urgency=low

  [ Scott Moser ]
  * uec-publish-image: use hard link instead of soft, work around
    euca2ools bug (LP: #522292)
  * uec-publish-image: remove temp dir if --working-dir is given
  * uec-publish-image: add --kernel-file, --ramdisk-file flags
 -- Dustin Kirkland <email address hidden> Thu, 18 Feb 2010 22:58:33 -0600

Changed in cloud-utils (Ubuntu Lucid):
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
summary: - Lucid UEC image 20100215 unable to start on UEC
+ euca-bundle-image fails to use symbolic links
Changed in euca2ools (Ubuntu Lucid):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Scott Moser (smoser) wrote :

I'm moving this to Medium, and marking for beta1. I find it fairly significant that if a symlink is given to euca-bundle-volume, it will silently do the wrong thing.

There is a very trivial fix in the linked branch lp:~smoser/eucalyptus/euca2ools-1.0.dev

Changed in euca2ools (Ubuntu Lucid):
importance: Low → Medium
milestone: none → ubuntu-10.04-beta-1
status: Confirmed → In Progress
Revision history for this message
Scott Moser (smoser) wrote :

For the lazy, the fix I mentioned above is:
http://bazaar.launchpad.net/%7Esmoser/eucalyptus/euca2ools-1.0.dev/revision/257#euca2ools/euca2ools/__init__.py

- tar_cmd = ["tar", "c", "-S"]
+ tar_cmd = ["tar", "ch", "-S", ]

Changed in euca2ools (Ubuntu Lucid):
assignee: nobody → Dustin Kirkland (kirkland)
importance: Medium → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package euca2ools - 1.2-0ubuntu3

---------------
euca2ools (1.2-0ubuntu3) lucid; urgency=low

  [ Scott Moser ]
  * euca2ools/euca2ools/__init__.py: ensure that euca-bundle-image supports
    symlinks, LP: #522292
 -- Dustin Kirkland <email address hidden> Tue, 23 Feb 2010 13:51:42 -0600

Changed in euca2ools (Ubuntu Lucid):
status: In Progress → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :
Changed in euca2ools:
status: New → Fix Committed
Changed in euca2ools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.