On Fri, Sep 30, 2011 at 09:41:19PM +0530, Balbir Singh wrote:
> On Fri, Sep 30, 2011 at 9:09 PM, Vivek Goyal <vgo...@redhat.com> wrote:
> > On Fri, Sep 30, 2011 at 09:03:25PM +0530, Balbir Singh wrote:
> >> On Fri, Sep 30, 2011 at 8:52 PM, Vivek Goyal <vgo...@redhat.com> wrote:
> >> > On Fri, Sep 23, 2011 at 03:52:31PM +0200, Jan Safranek wrote:
> >> >> Hello,
> >> >>
> >> >> here is first bunch of patches that are needed for better cooperation 
> >> >> with
> >> >> systemd. As agreed, service cgconfig stop/restart should only remove 
> >> >> groups
> >> >> that cgconfig start has created and only if they are empty. This 
> >> >> patchset
> >> >> focuses on that - it allows cgclear to parse a config file and remove 
> >> >> only
> >> >> groups defined there and (optionally) only if they are empty.
> >> >>
> >> >
> >> > Thanks for doing this work Jan.
> >> >
> >> >> cgclear and cgconfigparser were updated to parse multiple files and even
> >> >> directories to simplify the init script and future unit file(s).
> >> >
> >> > What's the use case of being able to specify mulitple files?
> >> >
> >> >>
> >> >> The best way to review the set is probably start with the last patch 
> >> >> (=man
> >> >> pages) so you see the functionality the patchset tries to implement. 
> >> >> There are
> >> >> also few tests you can examine.
> >> >
> >> > I see that you introduced an option to cgclear to pass a file. So an init
> >> > script is supposed to take snapshot of /etc/cgconfig.conf when cgroup
> >> > service starts and then pass that snapshot file to cgclear when cgroup
> >> > service is being stopped?
> >> >
> >> > If a user is using cgconfigparser and cgclear directly then he/she is
> >> > supposed to do this at their own?
> >>
> >> I suspect the administrator may have files setup independent of
> >> systemd and can use the same file to clear the hierarchy. NOTE: admin
> >> could be a db admin/system admin or any other admin
> >
> > Actually, I was thinking of following case.
> >
> > - A user comes up with initial cgconfig.conf
> > - Loads it using cgconfigparser.
> > - Then he wants to make changes to it and reload.
> > - Now before making changes a user is supposed to first take snapshot of
> >  existing file or first do cgclear and then modify /etc/cgconfig.conf.
> 
> Why if the namespaces are well defined? For example if systemd setup
> or cgconfigparser setup from admin says do all the setup in
> /sys/fs/cgroup/db as dbadmin
> 
> Then dbadmin can create the necessary things in there with dbadmin as
> namespace and use the same namespace for cgclear, won't that work?

As long as their is no sharing of groups between systemd and cgconfig
using namespaces things are just fine. (Except the fact that how do
you tell cgclear to only work on one namespace and not overall hierarchy).

But now we are trying to solve the case of shared cgroup. Where one can
say remove only persistent groups created by cgconfig. In fact current
cgclear will move even tasks of systemd and remove those cgroups. That
does not make much sense as cgconfig never created those groups to begin
with.

So above problem has to be solved anyway. The option "-e" will help
solving the problem of shared cgroup. The use case I have in mind that
one might create a cgroup and assign resources to it and ask systemd
to launch a specific service in that cgroup.

Thanks
Vivek

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to