Hi Serge,

On Wed, Jan 22, 2014 at 09:46:55AM -0600, Serge Hallyn wrote:
> Quoting Robert Vogelgesang ([email protected]):
> > I'm currently developing a patch for 1.0.0.beta2 which should fix this,
> > but neither does it work ATM, nor am I sure that it is the simplest
> > possible patch. :-/
> > 
> > For the next two hours (or so), I'll try to fix the remaining problems.
> > If you think you can come up with a patch in shorter time, please
> > feel free to do so.
> 
> Let's save your time for today - I'll write a candidate patch for you
> to test when you get back tomorrow.

well, I couldn't resist to debug my patch further - now it works.

One bug of my patch came from the fact that I modelled my changes after
the use of handle_cgroup_settings().  A change similar to the following
patch was neccessary to fix my patch for the cpuset issue (in addition to
this, this patch fixes a typo; patch is against an unpatched cgroup.c).

This patch is purely based on code inspection and not tested.  Feel free
to apply anyway. :-)

        Robert

diff -u lxc-lxc-1.0.0.beta2/src/lxc/cgroup.c.orig 
lxc-lxc-1.0.0.beta2/src/lxc/cgroup.c
--- lxc-lxc-1.0.0.beta2/src/lxc/cgroup.c.orig   2014-01-16 01:07:33.000000000 
+0100
+++ lxc-lxc-1.0.0.beta2/src/lxc/cgroup.c        2014-01-22 17:50:48.169119388 
+0100
@@ -887,7 +887,7 @@
                                /* if we didn't create the cgroup, then we have 
to make sure that
                                 * further cgroups will be created properly
                                 */
-                               if (handle_cgroup_settings(mp, 
info_ptr->cgroup_path) < 0) {
+                               if 
(handle_cgroup_settings(info_ptr->designated_mount_point, 
info_ptr->cgroup_path) < 0) {
                                        ERROR("Could not set clone_children to 
1 for cpuset hierarchy in pre-existing cgroup.");
                                        goto cleanup_from_error;
                                }
@@ -2005,7 +2005,7 @@
                        if (r < 1 || buf[0] != '1') {
                                r = lxc_write_to_file(cc_path, "1", 1, false);
                                if (r < 0)
-                                       SYSERROR("failed to set 
memory.use_hiararchy to 1; continuing");
+                                       SYSERROR("failed to set 
memory.use_hierarchy to 1; continuing");
                        }
                        free(cc_path);
                }

_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to