[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.8.3-3-2-ge9eb650
Guido Günther
agx at sigxcpu.org
Fri Oct 15 16:30:45 UTC 2010
The following commit has been merged in the master branch:
commit e9eb650ca03ceef31b14b3c093e3b260809e3aed
Author: Guido Günther <agx at sigxcpu.org>
Date: Fri Oct 15 18:11:52 2010 +0200
New patch 0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch
Don't fail lxc domain start when memory controller support is missing
Closes: #566180
diff --git a/debian/patches/0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch b/debian/patches/0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch
new file mode 100644
index 0000000..a02b15d
--- /dev/null
+++ b/debian/patches/0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch
@@ -0,0 +1,63 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 15 Oct 2010 18:10:47 +0200
+Subject: [PATCH] Don't fail lxc domain start when memory controller support is missing
+
+Debian stock kernel has CONFIG_CGROUP_MEM_RES_CTLR disabled due to the
+overhead [1]. Allow to start containers if the corresponding files in
+the cgroup filesystem are missing.
+
+[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534964
+
+Closes: #566180
+---
+ src/lxc/lxc_controller.c | 4 +++-
+ src/lxc/lxc_driver.c | 11 ++++++++---
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
+index 7dc51a5..6204763 100644
+--- a/src/lxc/lxc_controller.c
++++ b/src/lxc/lxc_controller.c
+@@ -107,7 +107,9 @@ static int lxcSetContainerResources(virDomainDefPtr def)
+ virReportSystemError(-rc,
+ _("Unable to set memory limit for domain %s"),
+ def->name);
+- goto cleanup;
++ /* Don't fail if we can't set memory due to lack of kernel support */
++ if (rc != -ENOENT)
++ goto cleanup;
+ }
+
+ rc = virCgroupDenyAllDevices(cgroup);
+diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
+index 6fe20b1..4439a98 100644
+--- a/src/lxc/lxc_driver.c
++++ b/src/lxc/lxc_driver.c
+@@ -483,7 +483,7 @@ static int lxcDomainGetInfo(virDomainPtr dom,
+ lxc_driver_t *driver = dom->conn->privateData;
+ virDomainObjPtr vm;
+ virCgroupPtr cgroup = NULL;
+- int ret = -1;
++ int ret = -1, rc;
+
+ lxcDriverLock(driver);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
+@@ -513,10 +513,15 @@ static int lxcDomainGetInfo(virDomainPtr dom,
+ "%s", _("Cannot read cputime for domain"));
+ goto cleanup;
+ }
+- if (virCgroupGetMemoryUsage(cgroup, &(info->memory)) < 0) {
++ if ((rc = virCgroupGetMemoryUsage(cgroup, &(info->memory))) < 0) {
+ lxcError(VIR_ERR_OPERATION_FAILED,
+ "%s", _("Cannot read memory usage for domain"));
+- goto cleanup;
++ if (rc == -ENOENT) {
++ /* Don't fail if we can't read memory usage due to a lack of
++ * kernel support */
++ info->memory = 0;
++ } else
++ goto cleanup;
+ }
+ }
+
+--
diff --git a/debian/patches/series b/debian/patches/series
index cf32c0f..69a573f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
0007-Fix-block-statistics-with-newer-versions-of-Xen.patch
0008-Disable-CHECKSUM-rule.patch
+0009-Don-t-fail-lxc-domain-start-when-memory-controller-s.patch
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list