Mailinglist Archive: opensuse-commit (1649 mails)
| < Previous | Next > |
commit libvirt
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Fri, 24 Oct 2008 15:18:23 +0200
- Message-id: <20081024131823.4FCD667816B@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package libvirt
checked in at Fri Oct 24 15:18:23 CEST 2008.
--------
--- libvirt/libvirt.changes 2008-10-20 23:04:51.000000000 +0200
+++ /mounts/work_src_done/STABLE/libvirt/libvirt.changes 2008-10-24
00:39:26.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Oct 23 16:33:37 MDT 2008 - jfehlig@xxxxxxxxxx
+
+- Add upstream patches to fix ordering problem with setting up
+ cgroup containment on LXC domains.
+ bnc#437816
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
cgmajor.patch
lxcpty.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libvirt.spec ++++++
--- /var/tmp/diff_new_pack.jh6238/_old 2008-10-24 15:18:09.000000000 +0200
+++ /var/tmp/diff_new_pack.jh6238/_new 2008-10-24 15:18:09.000000000 +0200
@@ -49,7 +49,7 @@
Group: Development/Libraries/C and C++
AutoReqProv: yes
Version: 0.4.6
-Release: 3
+Release: 4
Summary: A C toolkit to interract with the virtualization capabilities
of Linux
Requires: readline
Requires: ncurses
@@ -77,6 +77,8 @@
Patch8: cgshares.patch
Patch9: lxcsched.patch
Patch10: lxcvirsh.patch
+Patch11: cgmajor.patch
+Patch12: lxcpty.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -178,6 +180,8 @@
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
+%patch12 -p1
rm po/no.*
%build
@@ -310,6 +314,10 @@
%{py_sitedir}/libvirtmod*
%changelog
+* Thu Oct 23 2008 jfehlig@xxxxxxxxxx
+- Add upstream patches to fix ordering problem with setting up
+ cgroup containment on LXC domains.
+ bnc#437816
* Mon Oct 20 2008 jfehlig@xxxxxxxxxx
- Remove IA64 from list of architectures supporting Xen.
* Fri Oct 10 2008 jfehlig@xxxxxxxxxx
++++++ cgmajor.patch ++++++
Index: libvirt-0.4.6/src/cgroup.c
===================================================================
--- libvirt-0.4.6.orig/src/cgroup.c
+++ libvirt-0.4.6/src/cgroup.c
@@ -761,6 +761,36 @@ out:
return rc;
}
+/**
+ * virCgroupAllowDeviceMajor:
+ *
+ * @group: The cgroup to allow an entire device major type for
+ * @type: The device type (i.e., 'c' or 'b')
+ * @major: The major number of the device type
+ *
+ * Returns: 0 on success
+ */
+int virCgroupAllowDeviceMajor(virCgroupPtr group,
+ char type,
+ int major)
+{
+ int rc;
+ char *devstr = NULL;
+
+ if (asprintf(&devstr, "%c %i:* rwm", type, major) == -1) {
+ rc = -ENOMEM;
+ goto out;
+ }
+
+ rc = virCgroupSetValueStr(group,
+ "devices.allow",
+ devstr);
+ out:
+ VIR_FREE(devstr);
+
+ return rc;
+}
+
int virCgroupSetCpuShares(virCgroupPtr group, unsigned long shares)
{
return virCgroupSetValueU64(group, "cpu.shares", (uint64_t)shares);
Index: libvirt-0.4.6/src/cgroup.h
===================================================================
--- libvirt-0.4.6.orig/src/cgroup.h
+++ libvirt-0.4.6/src/cgroup.h
@@ -35,6 +35,9 @@ int virCgroupAllowDevice(virCgroupPtr gr
char type,
int major,
int minor);
+int virCgroupAllowDeviceMajor(virCgroupPtr group,
+ char type,
+ int major);
int virCgroupSetCpuShares(virCgroupPtr group, unsigned long shares);
int virCgroupGetCpuShares(virCgroupPtr group, unsigned long *shares);
++++++ lxcpty.patch ++++++
Index: libvirt-0.4.6/src/lxc_container.h
===================================================================
--- libvirt-0.4.6.orig/src/lxc_container.h
+++ libvirt-0.4.6/src/lxc_container.h
@@ -40,6 +40,8 @@ enum {
#define LXC_DEV_MAJ_TTY 5
#define LXC_DEV_MIN_CONSOLE 1
+#define LXC_DEV_MAJ_PTY 136
+
int lxcContainerSendContinue(int control);
int lxcContainerStart(virDomainDefPtr def,
Index: libvirt-0.4.6/src/lxc_controller.c
===================================================================
--- libvirt-0.4.6.orig/src/lxc_controller.c
+++ libvirt-0.4.6/src/lxc_controller.c
@@ -106,6 +106,10 @@ static int lxcSetContainerResources(virD
goto out;
}
+ rc = virCgroupAllowDeviceMajor(cgroup, 'c', LXC_DEV_MAJ_PTY);
+ if (rc != 0)
+ goto out;
+
rc = virCgroupAddTask(cgroup, getpid());
out:
if (rc != 0) {
@@ -452,6 +456,9 @@ lxcControllerRun(virDomainDefPtr def,
goto cleanup;
}
+ if (lxcSetContainerResources(def) < 0)
+ goto cleanup;
+
if ((container = lxcContainerStart(def,
nveths,
veths,
@@ -464,9 +471,6 @@ lxcControllerRun(virDomainDefPtr def,
if (lxcControllerMoveInterfaces(nveths, veths, container) < 0)
goto cleanup;
- if (lxcSetContainerResources(def) < 0)
- goto cleanup;
-
if (lxcContainerSendContinue(control[0]) < 0)
goto cleanup;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |