only mount cgroups if you haven't already

This commit is contained in:
Jesse Andrews 2011-10-07 10:34:32 -04:00
parent 0edde7d44f
commit e4304238c2

View file

@ -409,8 +409,10 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then
if ! grep -q cgroup /etc/fstab; then if ! grep -q cgroup /etc/fstab; then
echo none /cgroup cgroup cpuacct,memory,devices,cpu,freezer,blkio 0 0 | sudo tee -a /etc/fstab echo none /cgroup cgroup cpuacct,memory,devices,cpu,freezer,blkio 0 0 | sudo tee -a /etc/fstab
fi fi
if ! mount -n | grep -q cgroup; then
sudo mount /cgroup sudo mount /cgroup
fi fi
fi
# User needs to be member of libvirtd group for nova-compute to use libvirt. # User needs to be member of libvirtd group for nova-compute to use libvirt.
sudo usermod -a -G libvirtd `whoami` sudo usermod -a -G libvirtd `whoami`