Hi Manuel,
On Fri, Oct 18, 2013 at 02:15:39PM +0200, Manuel VIVES wrote:
> Guido Günther (Guido Günther <a...@sigxcpu.org>) wrote:
> > On Mon, Oct 07, 2013 at 02:12:37PM +0200, Manuel VIVES wrote:
> > [..snip..]
> > 
> > > > > I don't use systemd, so I'm probably not the best person for making
> > > > > this part of the script.
> > > > 
> > > > But you're advocating for it.
> > > 
> > > I'm not advocating for systemd, but for a good cgroup filesytem while
> > > using libvirt.
> > > Yes, the indications that D.Berrange gave me when I asked on #virt are
> > > indicating that we need the same "hierarchy" as the one used by systemd
> > > but I really don't use it (and I don't want to use it ;) )
> > 
> > I didn't mean to say that you're advocating for systemd but for an init
> > script. You have to make sure it's a noop when running under systemd.
> I don't have any idea on how to make it noop when running under systemd.
> Basically I would think to execute the mount and unmount process only if 
> there 
> isn't systemd on the machine, but I don't know any reliable way to find if 
> systemd is running on the machine
> > > > > And for the init script, I don't know, there is no process to start
> > > > > so..
> > > > 
> > > > ...you still have to follow the init scripts start/stop logic if it
> > > > should be an init script.
> > > 
> > > I could probably make a script which mounts on start and unmounts on
> > > stop, I'm going to look at this.
> > 
> > Yes, please do. You also need to add the right dependencies in the
> > headers.
> > Cheers,
> >  -- Guido
> I modified script to add this.
> It is attached to this mail

Great! Looking at udev.postinst it checks for /run/systemd/system/ to
see it systemd is running as init system.

Looking at the script I wonder if we should move this into
/etc/init.d/libvirt-bin itself and enable it via a flag in
/etc/default/libvirt-bin (e.g. mount_cgroups). This would keep
everything nicely in one place.

Alternatively we could use /etc/{init.d,default}/libvirt-cgroups if you
want to keep it as a different script. (I'm slightly leaning to moving
everything to libvirt-bin). What do you think?

Cheers,
 -- Guido

> 
> Regards,
>       Manuel VIVES
> > > Manuel VIVES
> > > 
> > > > Cheers,
> > > > 
> > > >  -- Guido
> > > >  
> > > > > Regards,
> > > > > 
> > > > > Manuel VIVES
> > > > > 
> > > > > 
> > > > > 
> > > > > -- System Information:
> > > > > Debian Release: 7.1
> > > > > 
> > > > >   APT prefers stable
> > > > >   APT policy: (500, 'stable'), (1, 'experimental'), (1, 'unstable'),
> > > > >   (1, 'testing'), (1, 'oldstable')
> > > > > 
> > > > > Architecture: amd64 (x86_64)
> > > > > Foreign Architectures: i386
> > > > > 
> > > > > Kernel: Linux 3.10-0.bpo.2-amd64 (SMP w/16 CPU cores)
> > > > > Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
> > > > > Shell: /bin/sh linked to /bin/dash
> > > > > 
> > > > > Versions of packages libvirt-bin depends on:
> > > > > ii  adduser              3.113+nmu3
> > > > > ii  gettext-base         0.18.1.1-9
> > > > > ii  init-system-helpers  1.4-hns1
> > > > > ii  libaudit0            1:1.7.18-1.1
> > > > > ii  libavahi-client3     0.6.31-2
> > > > > ii  libavahi-common3     0.6.31-2
> > > > > ii  libblkid1            2.20.1-5.3
> > > > > ii  libc6                2.13-38
> > > > > ii  libcap-ng0           0.6.6-2
> > > > > ii  libdbus-1-3          1.6.8-1
> > > > > ii  libdevmapper1.02.1   2:1.02.74-7
> > > > > ii  libgcrypt11          1.5.0-5
> > > > > ii  libgnutls26          2.12.20-7
> > > > > ii  libnetcf1            1:0.2.3-3~bpo70+1
> > > > > ii  libnl-3-200          3.2.7-4
> > > > > ii  libnl-route-3-200    3.2.7-4
> > > > > ii  libnuma1             2.0.8~rc4-1
> > > > > ii  libparted0debian1    2.3-12
> > > > > ii  libpcap0.8           1.3.0-1
> > > > > ii  libpciaccess0        0.13.1-2
> > > > > ii  libreadline6         6.2+dfsg-0.1
> > > > > ii  libsasl2-2           2.1.25.dfsg1-6+deb7u1
> > > > > ii  libudev0             175-7.2
> > > > > ii  libvirt0             1.1.2-3hns1
> > > > > ii  libxenstore3.0       4.1.4-3+deb7u1
> > > > > ii  libxml2              2.8.0+dfsg1-7+nmu1
> > > > > ii  libyajl2             2.0.4-2
> > > > > ii  logrotate            3.8.1-4
> > > > > 
> > > > > Versions of packages libvirt-bin recommends:
> > > > > ii  bridge-utils    1.5-6
> > > > > ii  dmidecode       2.11-9
> > > > > ii  dnsmasq-base    2.62-3+deb7u1
> > > > > ii  ebtables        2.0.10.4-1
> > > > > ii  gawk            1:4.0.1+dfsg-2.1
> > > > > ii  iproute         20120521-3+b3
> > > > > ii  iptables        1.4.14-3.1
> > > > > ii  libxml2-utils   2.8.0+dfsg1-7+nmu1
> > > > > ii  netcat-openbsd  1.105-7
> > > > > ii  parted          2.3-12
> > > > > ii  pm-utils        1.4.1-9
> > > > > ii  qemu            1.1.2+dfsg-6a
> > > > > ii  qemu-kvm        1.1.2+dfsg-6
> > > > > 
> > > > > Versions of packages libvirt-bin suggests:
> > > > > pn  auditd       <none>
> > > > > ii  policykit-1  0.105-3
> > > > > ii  radvd        1:1.8.5-1
> > > > > pn  systemtap    <none>
> > > > > 
> > > > > -- Configuration Files:
> > > > > /etc/libvirt/libvirtd.conf changed [not included]
> > > > > /etc/libvirt/lxc.conf changed [not included]
> > > > > /etc/libvirt/qemu.conf [Errno 13] Permission non accordée:
> > > > > u'/etc/libvirt/qemu.conf' /etc/libvirt/qemu/networks/default.xml
> > > > > [Errno 13] Permission non accordée:
> > > > > u'/etc/libvirt/qemu/networks/default.xml' /etc/logrotate.d/libvirtd
> > > > > changed [not included]
> > > > > /etc/logrotate.d/libvirtd.lxc changed [not included]
> > > > > /etc/logrotate.d/libvirtd.qemu changed [not included]
> > > > > 
> > > > > -- no debconf information
> > > > > 
> > > > > #!/bin/sh
> > > > > 
> > > > > mount -t tmpfs cgroup_root /sys/fs/cgroup
> > > > > 
> > > > > MOUNTS="cpuset cpu cpuacct memory devices freezer net_cls blkio
> > > > > perf_event" for M in $MOUNTS; do
> > > > > 
> > > > >     mkdir /sys/fs/cgroup/$M
> > > > >     mount -t cgroup -o rw,nosuid,nodev,noexec,relatime,$M
> > > > >     "cgroup_${M}" "/sys/fs/cgroup/${M}"
> > > > > 
> > > > > done
> > > > > 
> > > > > 
> > > > > _______________________________________________
> > > > > Pkg-libvirt-maintainers mailing list
> > > > > pkg-libvirt-maintain...@lists.alioth.debian.org
> > > > > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-libvirt-m
> > > > > aint ainers


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to