[pkg-lxc-devel] Bug#850212: lxc: lxc init script should depend on cgroupfs-mount

Benda Xu heroxbd at gentoo.org
Thu Jan 5 03:21:59 UTC 2017


Package: lxc
Version: 1:2.0.6-1~bpo8+1
Severity: important

Dear Maintainer,

lxc requires cgroupfs to be properly mounted.  This task is either done by
cgroupfs-mount init script or systemd.  The former does nothing if started
by systemd:

  # Test for systemd and bail (we have to test before sourcing init-functions, or systemd hijacks us)
  # We bail because systemd already mounts cgroups sanely, so we just silently pretend we were successful in mounting them here
  if [ -d /run/systemd/system ]; then
      exit 0
  fi

Therefore adding cgroupfs-mount to the service dependency of lxc fix startup
issue on non-systemd systems.

  ### BEGIN INIT INFO
  # Provides: lxc
  # Required-Start: $syslog $remote_fs cgroupfs-mount
  # Required-Stop: $syslog $remote_fs cgroupfs-mount

-- System Information:
Debian Release: 8.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages lxc depends on:
ii  init-system-helpers  1.29
ii  libapparmor1         2.9.0-3
ii  libc6                2.24-4
ii  libcap2              1:2.24-8
ii  liblxc1              1:2.0.6-1~bpo8+1
ii  libseccomp2          2.1.1-1
ii  libselinux1          2.3-2
ii  lsb-base             4.1+Debian13+nmu1
ii  python3-lxc          1:2.0.6-1~bpo8+1
pn  python3:any          <none>

Versions of packages lxc recommends:
ii  bridge-utils  1.5-9
ii  debootstrap   1.0.67
ii  dirmngr       2.1.16-3
ii  dnsmasq-base  2.72-3+deb8u1
ii  gnupg         2.1.16-3
ii  iptables      1.4.21-2+b1
pn  libpam-cgfs   <none>
pn  lxcfs         <none>
ii  openssl       1.0.1t-1+deb8u5
ii  rsync         3.1.1-3
pn  uidmap        <none>

Versions of packages lxc suggests:
pn  apparmor     <none>
ii  btrfs-tools  4.7.3-1~bpo8+1
ii  lvm2         2.02.111-2.2+deb8u1

-- Configuration Files:
/etc/apparmor.d/lxc/lxc-default [Errno 2] No such file or directory: u'/etc/apparmor.d/lxc/lxc-default'
/etc/apparmor.d/lxc/lxc-default-with-mounting [Errno 2] No such file or directory: u'/etc/apparmor.d/lxc/lxc-default-with-mounting'
/etc/init.d/lxc changed:
log_daemon_msg () {
    echo $@
}
test ! -r /lib/lsb/init-functions ||
        . /lib/lsb/init-functions
start() {
    # Setup host /dev for autodev containers.
    log_daemon_msg "Starting LXC autoboot containers: "
    /usr/lib/x86_64-linux-gnu/lxc/lxc-containers start
}
stop() {
    log_daemon_msg "Stopping LXC containers: "
    /usr/lib/x86_64-linux-gnu/lxc/lxc-containers stop
}
case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart|reload|force-reload)
        $0 stop
        $0 start
    ;;
    *)
        echo "Usage: $0 {start|stop|restart|reload|force-reload}"
        exit 2
    ;;
esac
exit $?

/etc/lxc/default.conf [Errno 2] No such file or directory: u'/etc/lxc/default.conf'

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc.initd.patch
Type: text/x-diff
Size: 397 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lxc-devel/attachments/20170105/1c97a2ef/attachment.patch>


More information about the Pkg-lxc-devel mailing list