diff --git a/setup-compute.sh b/setup-compute.sh index a8bae0944a0b6b45c44ae8fb448206fe8718ec13..5a117b61717be67c5ca7c1c71b3bcc74096dd002 100755 --- a/setup-compute.sh +++ b/setup-compute.sh @@ -41,6 +41,26 @@ fi maybe_install_packages nova-compute sysfsutils maybe_install_packages libguestfs-tools libguestfs0 python-guestfs +# +# Once we install packages, if the user wants a bigger VM disk space +# area, we make that and copy anything in /var/lib/nova into it (which +# may include stuff that was just installed). Then we bind mount it to +# /var/lib/nova . +# +if [ "$COMPUTE_EXTRA_NOVA_DISK_SPACE" = "1" ]; then + mkdir -p /mnt/var-lib-nova + /usr/local/etc/emulab/mkextrafs.pl -r sda -s 4 /mnt/var-lib-nova + if [ $? = 0 ]; then + chown nova:nova /mnt/var-lib-nova + rsync -avz /var/lib/nova/ /mnt/var-lib-nova/ + mount -o bind /mnt/var-lib-nova /var/lib/nova + echo "/mnt/var-lib-nova /var/lib/nova none defaults,bind 0 0" \ + >> /etc/fstab + else + echo "*** ERROR: could not make larger Nova /var/lib/nova dir!" + fi +fi + crudini --set /etc/nova/nova.conf DEFAULT rpc_backend rabbit crudini --set /etc/nova/nova.conf DEFAULT auth_strategy keystone crudini --set /etc/nova/nova.conf DEFAULT my_ip ${MGMTIP} diff --git a/setup-lib.sh b/setup-lib.sh index a8b23bac7a8cacf54aa51e63ad3eb6ceb6d45d49..851825503fec722403ca0927f2fc622b9d2c0f82 100755 --- a/setup-lib.sh +++ b/setup-lib.sh @@ -65,6 +65,10 @@ QUOTASOFF=1 KEYSTONEUSEMEMCACHE=0 # Off by default for Juno; on for Kilo and on by default. KEYSTONEUSEWSGI="" +# On by default; users will have to take full disk images of the +# compute nodes if they have this enabled. +COMPUTE_EXTRA_NOVA_DISK_SPACE="1" + # # We have an 'adminapi' user that gets a random password. Then, we have # the dashboard and instance password, that comes in from geni-lib/rspec as a