/etc/init/libvirt-cgconfig-wait.conf is in cgroup-bin 0.37.1-1ubuntu10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | description "Make sure cgroups are set up before libvirt starts"
author "Serge Hallyn <serge.hallyn@canonical.com>"
start on starting libvirt-bin
# when cgconfig has started, that means its pre-start script must have
# stopped, meaning /usr/sbin/create_default_cgroups is finished
# reclassifying tasks. Libvirt is safe to start once we know it won't
# get reclassified.
stop on started cgconfig
task
script
test -x /usr/sbin/cgconfigparser || { exit 0; }
# If cgconfig started before we were triggered, then we can stop
# so that libvirt-bin can start
if status cgconfig 2>/dev/null | grep -q "start/running"; then
exit 0
fi
# As soon as cgconfig starts, our 'stop on' will trigger.
# If cgconfig takes more than 120 seconds to start, then go
# ahead and start libvirt-bin. What matters most is to have
# libvirt's cgroup not change. After 120s we can be pretty
# sure it just won't.
TIMEOUT="120s"
sleep "$TIMEOUT"
exit 0
end script
|