Remove cgroup natty or less block

Given that Natty and other releases that don't use cgroups have been out
of support in Ubuntu for years now, it's high time we removed the
special case code block that sets up the cgroup mount.

Change-Id: I5403a4b1b64a95236b4dfcb66c35c594a3460cca
This commit is contained in:
Steve Kowalik 2018-09-10 16:17:54 -06:00
parent 53db72c6c6
commit 770690eda1

View File

@ -303,17 +303,6 @@ function configure_nova {
# to simulate multiple systems. # to simulate multiple systems.
if [[ "$LIBVIRT_TYPE" == "lxc" ]]; then if [[ "$LIBVIRT_TYPE" == "lxc" ]]; then
if is_ubuntu; then if is_ubuntu; then
if [[ ! "$DISTRO" > natty ]]; then
local cgline="none /cgroup cgroup cpuacct,memory,devices,cpu,freezer,blkio 0 0"
sudo mkdir -p /cgroup
if ! grep -q cgroup /etc/fstab; then
echo "$cgline" | sudo tee -a /etc/fstab
fi
if ! mount -n | grep -q cgroup; then
sudo mount /cgroup
fi
fi
# enable nbd for lxc unless you're using an lvm backend # enable nbd for lxc unless you're using an lvm backend
# otherwise you can't boot instances # otherwise you can't boot instances
if [[ "$NOVA_BACKEND" != "LVM" ]]; then if [[ "$NOVA_BACKEND" != "LVM" ]]; then