[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.10.2-4-3-g99d7ed7

Guido Günther agx at sigxcpu.org
Mon Oct 22 17:21:08 UTC 2012


The following commit has been merged in the experimental branch:
commit 99d7ed736a93352aedd83ad31c38db7c980e399f
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Oct 17 07:39:28 2012 +0200

    New patch storage-lvm-Don-t-overwrite-lvcreate-errors.patch
    
    Thanks: Cole Robinson

diff --git a/debian/patches/series b/debian/patches/series
index 522edfb..9e42104 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ debian/Debianize-systemd-service-files.patch
 Allow-xen-toolstack-to-find-it-s-binaries.patch
 Properly-parse-unsigned-long-long.patch
 storage-lvm-lvcreate-fails-with-allocation-0-don-t-d.patch
+storage-lvm-Don-t-overwrite-lvcreate-errors.patch
diff --git a/debian/patches/storage-lvm-Don-t-overwrite-lvcreate-errors.patch b/debian/patches/storage-lvm-Don-t-overwrite-lvcreate-errors.patch
new file mode 100644
index 0000000..4e901f2
--- /dev/null
+++ b/debian/patches/storage-lvm-Don-t-overwrite-lvcreate-errors.patch
@@ -0,0 +1,41 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Tue, 16 Oct 2012 20:25:41 -0400
+Subject: storage: lvm: Don't overwrite lvcreate errors
+
+Before:
+$ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0
+error: Failed to create vol sparsetest
+error: internal error Child process (/usr/sbin/lvchange -aln vgvirt/sparsetest) unexpected exit status 5:   One or more specified logical volume(s) not found.
+
+After:
+$ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0
+error: Failed to create vol sparsetest
+error: internal error Child process (/usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt) unexpected exit status 5:   Unable to create new logical volume with no extents
+---
+ src/storage/storage_backend_logical.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
+index 2b37f07..de43c3a 100644
+--- a/src/storage/storage_backend_logical.c
++++ b/src/storage/storage_backend_logical.c
+@@ -699,6 +699,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
+ {
+     int fdret, fd = -1;
+     virCommandPtr cmd = NULL;
++    virErrorPtr err;
+ 
+     if (vol->target.encryption != NULL) {
+         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+@@ -776,9 +777,11 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
+     return 0;
+ 
+  cleanup:
++    err = virSaveLastError();
+     VIR_FORCE_CLOSE(fd);
+     virStorageBackendLogicalDeleteVol(conn, pool, vol, 0);
+     virCommandFree(cmd);
++    virSetError(err);
+     return -1;
+ }
+ 

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list