[lxc-users] cgrulesengd issues

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 26 19:44:59 UTC 2015


Quoting Mohan G (mohan_gg at yahoo.com):
> Hi,My /etc/cgrules.conf  is 
> root:nfsd memory /sys/fs/cgroups/filer/root:/usr/sbin/exportfs cpuset,memory /sys/fs/cgroups/filer/root:/usr/sbin/rpc.mountd cpuset,memory /sys/fs/cgroups/filer/root:/usr/sbin/rpc.nfsd cpuset,memory /sys/fs/cgroups/filer/root:/usr/sbin/rpc.svcgssd cpuset,memory /sys/fs/cgroups/filer/
> my /etc/cgconfig.conf is like below.
> group filer {        memory {                memory.limit_in_bytes=4G;        }
>         cpuset {                cpuset.cpus=0-2;        }}
> after the system boots, i don;t see any group created, But then when i run "cgconfigparser", the group gets created,Post this i want the cgrules.conf to take effect, but it does not work after running cgrulesengd.And there are no start-up scripts too in my 3.13 kernel. My requirement is to create the group and move the process as above to the group on system boot.

lxc-users is the wrong list for this.   libcgroup is now
basically unsupported.  Depending on your distro/release (and
more specifically on your init) google for how to spawn a job
into a cgroup in upstart or systemd.

(The problem with libcgroup was that it would try to catch a
started service and change its cgroup after the fact, which was
racy if the service quickly spawned some childre, as libvirt
does.  The proper way is for init to create the cgroups and
spawn the new service in it from the start)

See for instance http://upstart.ubuntu.com/cookbook/#cgroup and
http://www.freedesktop.org/software/systemd/man/systemd.cgroup.html

-serge


More information about the lxc-users mailing list