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
1=== modified file 'node/handlers_kvm.c'
2--- node/handlers_kvm.c 2011-03-08 20:09:06 +0000
3+++ node/handlers_kvm.c 2011-11-25 09:36:25 +0000
4@@ -138,9 +138,9 @@
5 virtio_dev = 1;
6 }
7 if (nc->config_use_virtio_disk && virtio_dev) {
8- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
9+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
10 } else {
11- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
12+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
13 }
14 rc = stat(remoteDev, &statbuf);
15 if (rc) {
16@@ -479,15 +479,15 @@
17 if((local_iscsi_dev = get_iscsi_target(nc->get_storage_cmd_path, nc->home, remoteDev)) == NULL)
18 return ERROR;
19 if (nc->config_use_virtio_disk && virtio_dev) {
20- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", local_iscsi_dev, localDevReal);
21+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", local_iscsi_dev, localDevReal);
22 } else {
23- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", local_iscsi_dev, localDevReal);
24+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", local_iscsi_dev, localDevReal);
25 }
26 } else {
27 if (nc->config_use_virtio_disk && virtio_dev) {
28- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
29+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s' bus='virtio'/></disk>", remoteDev, localDevReal);
30 } else {
31- snprintf (xml, 1024, "<disk type='block'><driver name='phy'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
32+ snprintf (xml, 1024, "<disk type='block'><driver name='qemu'/><source dev='%s'/><target dev='%s'/></disk>", remoteDev, localDevReal);
33 }
34 }
35 /* protect KVM calls, just in case */

Subscribers

People subscribed via source and target branches

to status/vote changes: