[Pkg-libvirt-maintainers] Bug#725261: Bug#725261: libvirt-bin: Cgroup configuration for LXC and Qemu on the same host

Manuel VIVES manuel.vives at diateam.net
Wed Oct 30 13:57:54 UTC 2013


Hi
>on Wednesday 30 October 2013-12:20:29 Guido Günther (Guido Günther 
<agx at sigxcpu.org>) wrote:
> On Wed, Oct 30, 2013 at 11:47:01AM +0100, Manuel VIVES wrote:
> > Hi
> > 
> > >on Monday 28 October 2013-13:09:24 Guido Günther (Guido Günther
> > 
> > <agx at sigxcpu.org>) wrote:
> > > Hi Manuel,,
> > > 
> > > On Mon, Oct 28, 2013 at 10:30:50AM +0100, Manuel VIVES wrote:
> > > > Hi Guido
> > > 
> > > [..snip..]
> > > 
> > > > I agree with you for moving it into libvirt-bin, so I did it and I
> > > > modified the libvirt-bin script in order to do this.
> > > > It is attached to the mail.
> > > > I also made a check for systemd, and if it's running, there is just a
> > > > message saying that you can not use this cgroup configuration with
> > > > systemd and the function exits.
> > > 
> > > Great! The systemd_running funciton seems to check for the wrong dir
> > > though ;) Moreover: shouldn't we better execute mount_cgroups when the
> > > daemon gets started (iff system_like_cgroups is set in
> > > /etc/default/libvirt-bin) and try to unmount it on daemon stop (we
> > > shouldn't fail then since there might be other cgroups running).
> > > 
> > > Having them as extra targets is nice but wouln't work by itself if we
> > > want to do it automatically on system startup.
> > 
> > Here is the new version, so the folder tested is changed ;)
> > There is also a function called "check_mount_cgroup_options" which checks
> > if the variable "mount_cgroups_at_startup" is yes, and if so, it will
> > mount cgroups when starting the daemon, but it will also umount cgroups
> > when stopping it. If the mount fails we exit, but we don't if it's the
> > umount that fails.
> 
> Great. There are some minor issues, you have:
> 
>    if systemd_running
>     then
> 	... mount cgroups
>    fi
> 
> This is backward. You need to mount the cgroups if systemd is not
> running. It'd also rename the option to mount_cgroups (remove the
> _on_startup) since the cgroups are also mounted when starting the
> deaemon at a later point or when restarting the daemon.
> Cheers and thanks for your work on that!
>  -- Guido
> 
Here is the script libvirt-bin modified.
Now we do 
    
if ! systemd_running
     then
 	... mount cgroups
fi

and the option is called mount-cgroups.

Regards, 
Manuel VIVES
> > Regards,
> > Manuel VIVES
> > 
> > > Cheers,
> > > 
> > >  -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-bin
Type: application/x-shellscript
Size: 5761 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20131030/3dc99ffc/attachment.bin>


More information about the Pkg-libvirt-maintainers mailing list