[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.8.3-4-8-gca23484
Guido Günther
agx at sigxcpu.org
Thu Jan 13 17:45:34 UTC 2011
The following commit has been merged in the master branch:
commit 91a1b8d433189087445b2a74b7894c32feb9c7cf
Author: Guido Günther <agx at sigxcpu.org>
Date: Wed Dec 1 15:06:47 2010 +0100
New patch 0011-OpenVZ-take-veid-from-vmdef-name-when-defining-new-d.patch
OpenVZ: take veid from vmdef->name when defining new domains
Thanks: Eric Litak
Closes: #592817
diff --git a/debian/patches/0011-OpenVZ-take-veid-from-vmdef-name-when-defining-new-d.patch b/debian/patches/0011-OpenVZ-take-veid-from-vmdef-name-when-defining-new-d.patch
new file mode 100644
index 0000000..fb8d7c1
--- /dev/null
+++ b/debian/patches/0011-OpenVZ-take-veid-from-vmdef-name-when-defining-new-d.patch
@@ -0,0 +1,76 @@
+From: Eric Litak <elitak at gmail.com>
+Date: Wed, 1 Dec 2010 15:03:11 +0100
+Subject: [PATCH] OpenVZ: take veid from vmdef->name when defining new domains
+
+to fix domain creation.
+Origin: upstream, http://libvirt.org/git/?p=libvirt.git;a=commit;h=50a7c59bb30b95fd56cda34510f319f48f97f90e
+---
+ src/openvz/openvz_driver.c | 40 +---------------------------------------
+ 1 files changed, 1 insertions(+), 39 deletions(-)
+
+diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
+index d2f91c6..556df52 100644
+--- a/src/openvz/openvz_driver.c
++++ b/src/openvz/openvz_driver.c
+@@ -103,10 +103,6 @@ openvzDomainDefineCmd(const char *args[],
+ int maxarg, virDomainDefPtr vmdef)
+ {
+ int narg;
+- int veid;
+- int max_veid;
+- char str_id[10];
+- FILE *fp;
+
+ for (narg = 0; narg < maxarg; narg++)
+ args[narg] = NULL;
+@@ -135,36 +131,7 @@ openvzDomainDefineCmd(const char *args[],
+ ADD_ARG_LIT(VZCTL);
+ ADD_ARG_LIT("--quiet");
+ ADD_ARG_LIT("create");
+-
+- if ((fp = popen(VZLIST " -a -ovpsid -H 2>/dev/null", "r")) == NULL) {
+- openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
+- _("popen failed"));
+- return -1;
+- }
+- max_veid = 0;
+- while (!feof(fp)) {
+- if (fscanf(fp, "%d\n", &veid) != 1) {
+- if (feof(fp))
+- break;
+-
+- openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
+- _("Failed to parse vzlist output"));
+- goto cleanup;
+- }
+- if (veid > max_veid) {
+- max_veid = veid;
+- }
+- }
+- fclose(fp);
+-
+- if (max_veid == 0) {
+- max_veid = 100;
+- } else {
+- max_veid++;
+- }
+-
+- sprintf(str_id, "%d", max_veid);
+- ADD_ARG_LIT(str_id);
++ ADD_ARG_LIT(vmdef->name);
+
+ ADD_ARG_LIT("--name");
+ ADD_ARG_LIT(vmdef->name);
+@@ -188,11 +155,6 @@ no_memory:
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not put argument to %s"), VZCTL);
+ return -1;
+-
+-cleanup:
+- fclose(fp);
+- return -1;
+-
+ #undef ADD_ARG
+ #undef ADD_ARG_LIT
+ }
+--
diff --git a/debian/patches/series b/debian/patches/series
index 60b23f6..16a59d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
0008-Disable-CHECKSUM-rule.patch
0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch
0010-nwfilter-resolve-deadlock-between-VM-operations-and-.patch
+0011-OpenVZ-take-veid-from-vmdef-name-when-defining-new-d.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list