New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud-init does not mount ephemeral0 on /mnt in nova #2198
Comments
Launchpad user Scott Moser(smoser) wrote on 2011-08-16T19:22:28.284423+00:00 Launchpad attachments: Dependencies.txt |
Launchpad user Isaku Yamahata(yamahata) wrote on 2011-08-17T10:46:14.448830+00:00 So far nova lied. It is fixed by nova revision of 1400 in the repository. 252 0 10485760 vda ubuntu@ubuntu:~$ python -c 'import boto.utils; print boto.utils.get_instance_metadata()["block-device-mapping"]' |
Launchpad user Thierry Carrez(ttx) wrote on 2011-08-19T09:26:05.445735+00:00 @scott, could you confirm the fix ? |
Launchpad user Scott Moser(smoser) wrote on 2011-08-22T13:42:08.824184+00:00 Just from reading comment 2, the issue is clearly not fixed correctly. /proc/partitions shows vda, vdb, and vdc, but the block-device-mapping shows ephemeral0 mapped to vdd. |
Launchpad user Isaku Yamahata(yamahata) wrote on 2011-08-23T03:46:12+00:00 On Mon, Aug 22, 2011 at 01:42:08PM -0000, Scott Moser wrote:
Yes, you're right. The command line to launch kvm guest. /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name instance-000000e4 -uuid 8882f5d5-d448-29e3-e124-6739e6fd22d6 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-000000e4.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc -boot c -kernel /var/lib/nova/instances/instance-000000e4/kernel -append root=/dev/vda console=ttyS0 -drive file=/var/lib/nova/instances/instance-000000e4/disk,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/var/lib/nova/instances/instance-000000e4/disk.eph0,if=none,id=drive-virtio-disk3, format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk3, id=virtio-disk3 -drive file=/dev/mapper/nova--volumes-volume--00000040,if=none,id=drive-virtio-disk2,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,id=virtio-disk2 -netdev tap,fd=18,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=02:16:3e:1e:ff:c0,bus=pci.0,addr=0x3 -chardev file, id=charserial0,path=/var/lib/nova/instances/instance-000000e4/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 -device isa-serial,chardev=charserial1,id=serial1 -usb -vnc 0.0.0.0:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 the create xml for the guest
/>
.0.0'/> |
Launchpad user Scott Moser(smoser) wrote on 2011-08-23T12:32:16.557260+00:00 I understand that actually mapping a device name from hypervisor to guest is actually impossible, but hopefully we can come up with a better guess. Its unfortunate that libvirt doesn't even seem to be using the "dev=" as a suggestion of device ordering along the virtio bus. Instead, I'm guessing it is using order present in xml. I was hoping at very least that suggesting 'vda', 'vdb', 'vdc' would render in kvm command line to addr=0x4, addr=0x5, addr=0x6 respectively. Since libvirt seems to be relying on order in the xml, is it possible to specify the "correct" order and also sane "dev=" attributes? Ie, what would happen if you had xml like: | And then specified block device mapping like: Again, I understand, you can't force the guest to name devices in any way, but hopefully we can at least map "vda" to "first device on virtio bus", and "vdb" to "second disk on virtio bus". |
Launchpad user Scott Moser(smoser) wrote on 2011-09-13T18:23:49.498787+00:00 With Isaku's branch this is fixed with no cloud-init changes, so I've marked those tasks as invalid. |
Launchpad user Thierry Carrez(ttx) wrote on 2011-09-15T12:07:59.684148+00:00 let's do a backport for diablo |
This bug was originally filed in Launchpad as LP: #827590
Launchpad details
Launchpad user Scott Moser(smoser) wrote on 2011-08-16T19:22:28.284423+00:00
related bug:
bug 828357: request to add a label to the filesystem for ephemeral devices
bug 827598: ephemeral device does not have a filesystem
$ python -c 'import boto.utils; print boto.utils.get_instance_metadata()["block-device-mapping"]'
{'ami': 'sda1', 'root': '/dev/sda1', 'ephemeral0': 'sda2', 'swap': 'sda3'}
$ cat /proc/partitions
$ cat /proc/partitions
major minor #blocks name
253 0 10485760 vda
253 16 83886080 vdb
So there is an issue here, at very least the MD should say "/dev/sda" and "/dev/sdb" would be a better guess. Additionally, there is no third disk (as reported in 'swap') present at all.
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cloud-init 0.6.1-0ubuntu14
ProcVersionSignature: User Name 3.0.0-8.11-virtual 3.0.1
Uname: Linux 3.0.0-8-virtual i686
Architecture: i386
Date: Tue Aug 16 19:17:00 2011
Ec2AMI: ami-00000011
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: <nova.db.sqlalchemy.models.InstanceTypes object at 0x4f32090>
Ec2Kernel: aki-00000010
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
The text was updated successfully, but these errors were encountered: