Merge lp:~invernizzi/eucalyptus/fix-676819 into lp:eucalyptus

Proposed by Luca Invernizzi
Status: Merged
Approved by: graziano obertelli
Approved revision: 1263
Merged at revision: 1263
Proposed branch: lp:~invernizzi/eucalyptus/fix-676819
Merge into: lp:eucalyptus
Diff against target: 35 lines (+6/-6)
1 file modified
node/handlers_kvm.c (+6/-6)
To merge this branch: bzr merge lp:~invernizzi/eucalyptus/fix-676819
Reviewer Review Type Date Requested Status
graziano obertelli Approve
Review via email: mp+83379@code.launchpad.net

Commit message

Fixes LP #676819 Attaching a volume fails on ubuntu 11.10 with kvm

Description of the change

Fixes bug #676819. When using the node-controller with kvm in ubuntu 11.10, it's not possible to attach a volume when the vm is pending/running. The details are in the bug report, but the main reason is that the handler for kvm is using the "phy" driver, that is xen specific.
I've also prepared a patch in the debian format: it's in the bug report.

To post a comment you must log in.
Revision history for this message
graziano obertelli (graziano.obertelli) wrote :

Luca,

I will be merging it onto 2.0 (euca-devel is in flux right now), so I will have to do a manual merge into it.

Revision history for this message
graziano obertelli (graziano.obertelli) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'node/handlers_kvm.c'
--- node/handlers_kvm.c 2011-03-08 20:09:06 +0000
+++ node/handlers_kvm.c 2011-11-25 09:36:25 +0000
@@ -138,9 +138,9 @@
138 virtio_dev = 1;138 virtio_dev = 1;
139 }139 }
140 if (nc->config_use_virtio_disk && virtio_dev) {140 if (nc->config_use_virtio_disk && virtio_dev) {
141 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);141 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
142 } else {142 } else {
143 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);143 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
144 }144 }
145 rc = stat(remoteDev, &statbuf);145 rc = stat(remoteDev, &statbuf);
146 if (rc) {146 if (rc) {
@@ -479,15 +479,15 @@
479 if((local_iscsi_dev = get_iscsi_target(nc->get_storage_cmd_path, nc->home, remoteDev)) == NULL)479 if((local_iscsi_dev = get_iscsi_target(nc->get_storage_cmd_path, nc->home, remoteDev)) == NULL)
480 return ERROR;480 return ERROR;
481 if (nc->config_use_virtio_disk && virtio_dev) {481 if (nc->config_use_virtio_disk && virtio_dev) {
482 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", local_iscsi_dev, localDevReal);482 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", local_iscsi_dev, localDevReal);
483 } else {483 } else {
484 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", local_iscsi_dev, localDevReal);484 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", local_iscsi_dev, localDevReal);
485 }485 }
486 } else {486 } else {
487 if (nc->config_use_virtio_disk && virtio_dev) {487 if (nc->config_use_virtio_disk && virtio_dev) {
488 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);488 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
489 } else {489 } else {
490 snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);490 snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
491 }491 }
492 }492 }
493 /* protect KVM calls, just in case */493 /* protect KVM calls, just in case */

Subscribers

People subscribed via source and target branches

to status/vote changes: