libvirt started after cgred - cgroup not working correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Invalid
|
Low
|
Serge Hallyn |
Bug Description
I enabled cgroup for libvirt by:
Create a new virt group, by adding
group virt {
cpu {
}
}
into /etc/cgconfig.conf. And add "root:/
So, when I start libvirt-bin, libvirtd will create its own cgroup directory under /mnt/cgroup/
Everything works well, except after reboot the machine.
I found libvirt doesn't create its own cgroup under /mnt/cgroup/cpu, or /mnt/cgroup/
After some tests, the root cause is libvirtd is started earlier than cgred.
On lucid, libvirt-bin is started by upstart, while cgred is started by sys-V init script. How can I specify the dependency between the two? Apparently, libvirt-bin should be started after cgred.
Right now, I add the following hack in /etc/init/
pre-start script
mkdir -p /var/run/libvirt
# Clean up a pidfile that might be left around
rm -f /var/run/
while [ 1 ]
do
if [ -f /var/run/cgred.pid ]
then
else
fi
done
end script
Then libvirt works with cgroup again.
summary: |
- libvirt failed to start vm: internal error Unable to find cgroup for + libvirt started after cgred - cgroup not working correctly |
Changed in libvirt (Ubuntu): | |
importance: | Undecided → Low |
Changed in libvirt (Ubuntu): | |
status: | Confirmed → Triaged |
I also need this bug fixed. If cgred is on the system, then libvirt should start *after* it.