render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
43fe83
From 9b8bdf3b99fed3cea29886a6c309a67e6e53924e Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <9b8bdf3b99fed3cea29886a6c309a67e6e53924e.1377873641.git.jdenemar@redhat.com>
43fe83
From: Osier Yang <jyang@redhat.com>
43fe83
Date: Thu, 22 Aug 2013 16:56:24 -0400
43fe83
Subject: [PATCH] qemu_conf: Fix broken logic for adding passthrough iscsi lun
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1000159
43fe83
43fe83
Following XML would fail :
43fe83
43fe83
    <disk type='network' device='lun'>
43fe83
      <driver name='qemu' type='raw'/>
43fe83
      <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi/1'>
43fe83
        <host name='example.com' port='3260'/>
43fe83
      </source>
43fe83
      <target dev='sda' bus='scsi'/>
43fe83
    </disk>
43fe83
43fe83
With the message:
43fe83
43fe83
error: Failed to start domain iscsilun
43fe83
error: Unable to get device ID 'iqn.2013-07.com.example:iscsi/1': No such fi
43fe83
43fe83
Cause was commit id '1f49b05a' which added 'virDomainDiskSourceIsBlockType'
43fe83
43fe83
(cherry picked from commit 109d026a16bcb9f315dbeb665916bad718480957)
43fe83
---
43fe83
 src/qemu/qemu_conf.c | 2 +-
43fe83
 1 file changed, 1 insertion(+), 1 deletion(-)
43fe83
43fe83
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
43fe83
index 18e926c..86ed9ed 100644
43fe83
--- a/src/qemu/qemu_conf.c
43fe83
+++ b/src/qemu/qemu_conf.c
43fe83
@@ -1065,7 +1065,7 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
43fe83
         disk = dev->data.disk;
43fe83
 
43fe83
         if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
43fe83
-            virDomainDiskSourceIsBlockType(disk))
43fe83
+            !virDomainDiskSourceIsBlockType(disk))
43fe83
             return 0;
43fe83
 
43fe83
         path = disk->src;
43fe83
-- 
43fe83
1.8.3.2
43fe83