[CRIU] [PATCH 1/4] cg: Add ability to dump custom cgroup properties

Tycho Andersen tycho.andersen at canonical.com
Fri May 6 08:17:28 PDT 2016


On Fri, May 06, 2016 at 06:01:05PM +0300, Pavel Emelyanov wrote:
> On 05/06/2016 05:42 PM, Tycho Andersen wrote:
> > On Fri, May 06, 2016 at 05:02:29PM +0300, Cyrill Gorcunov wrote:
> >> On Fri, May 06, 2016 at 04:51:48PM +0300, Pavel Emelyanov wrote:
> >>>>>>
> >>>>>> For vz7 we will need command line options (ie cgroup-props
> >>>>>> and cgroup-props-file) because it's convenient to test such
> >>>>>> things via cli patching libvzctl scripts.
> >>>>>>
> >>>>>> Btw, what is the better place for this "cgroup.yaml" file
> >>>>>> we gonna use as default one?
> >>>>>
> >>>>> I don't know. Maybe Tycho can suggest something? Does LX[CD] have
> >>>>> some list of default parameters for cgroups and, if it does, where
> >>>>> does it keep it?
> >>>>
> >>>> We alrady setting up /usr/libexec/criu/scripts/ so maybe keep
> >>>> it in /usr/libexec/criu?
> >>>
> >>> I'm not an expert in placing files over linux fs tree :) But the substring
> >>> "exec" in the path makes me think that this is a place for executables or
> >>> scripts.
> >>
> >> Then /etc/criu I think a good start. Anyway, gonna wait for Tycho opinion.
> > 
> > So for debian/ubuntu I would drop it in /usr/share/criu/cgroups.yaml.
> > I don't know enough about redhat/fedora packaging policy to say where
> > it would go there, but presumably it is similar.
> > 
> > I will say that I'm not super convinced this is really necessary. At
> > least from an ubuntu perspective, to update the file, we'll need to
> > release a new package which will have a new binary anyway.
> 
> Hm... Actually the plan was to simplify this and let people update cgroups.yaml
> by hands if they need it w/o the need to recompile criu binary.

Well, with the addition of the --cgroup-props-file and the overriding
mode people don't need to edit a global file or the source, they can
just pass an additional argument and get the defaults or not as they
wish. I definitely see the advantage of being able to add
controllers/props without recompiling, but I think this feature
already supports that without moving the properties to a file.

> How do you do it in LX[CD]? Do you have any defaults for containers' cgroups
> and, if yes, where do you keep them? Directly in the code?

We just have them all hardcoded in LXD, but we don't set any defaults.
We have a frontend for LXD that you can set limits, and it translates
them to cgroups, but I think it's okay to hardcode those because we're
doing some translation, rather than just collecting all of the values.

Tycho

> > Plus it
> > will complicate development :). I don't mind doing it if you guys
> > think it is needed, though.
> > 
> > I'll also update the list once we decide where it lives and land
> > Cyrill's set here.
> > 
> > Tycho
> > .
> > 
> 


More information about the CRIU mailing list