diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-03-11 13:54:07 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-03-11 13:54:07 +0000 |
commit | e94877d15a3b8de8370dafc942060dd653006bd3 (patch) | |
tree | 3f7cf89360de66c825d93f4eaaf2288ea5357d64 /docker | |
parent | dfbcefa0b49fee4b69016bd32638c4d98022dd8b (diff) | |
parent | 41a333f8743432ba85147ca3070d690a69ec4781 (diff) |
Merge "Allow the containerized compute node to spawn larger VMs"
Diffstat (limited to 'docker')
-rw-r--r-- | docker/firstboot/start_docker_agents.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/firstboot/start_docker_agents.sh b/docker/firstboot/start_docker_agents.sh index 963c7eee..bb458a68 100644 --- a/docker/firstboot/start_docker_agents.sh +++ b/docker/firstboot/start_docker_agents.sh @@ -73,3 +73,22 @@ chmod 0640 /etc/systemd/system/heat-docker-agents.service # Disable NetworkManager and let the ifup/down scripts work properly. /usr/bin/systemctl disable NetworkManager /usr/bin/systemctl stop NetworkManager + +# Atomic's root partition & logical volume defaults to 3G. In order to launch +# larger VMs, we need to enlarge the root logical volume and scale down the +# docker_pool logical volume. We are allocating 80% of the disk space for +# vm data and the remaining 20% for docker images. +ATOMIC_ROOT='/dev/mapper/atomicos-root' +ROOT_DEVICE=`pvs -o vg_name,pv_name --no-headings | grep atomicos | awk '{ print $2}'` + +growpart $( echo "${ROOT_DEVICE}" | sed -r 's/([^0-9]*)([0-9]+)/\1 \2/' ) +pvresize "${ROOT_DEVICE}" +lvresize -l +80%FREE "${ATOMIC_ROOT}" +xfs_growfs "${ATOMIC_ROOT}" + +cat <<EOF > /etc/sysconfig/docker-storage-setup +GROWPART=true +AUTO_EXTEND_POOL=yes +POOL_AUTOEXTEND_PERCENT=30 +POOL_AUTOEXTEND_THRESHOLD=70 +EOF |