summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-07-22 22:52:46 +0200
committerHolger Levsen <holger@layer-acht.org>2016-07-22 19:36:14 -0400
commit332af47cc2c59c7513d76cc89cef75046602737a (patch)
tree51978fe86147d9eb80ba57ba7d1a6160c23acbab
parenta26d737835e4bb3354b3cd420e3d09f6492ea93a (diff)
downloadjenkins.debian.net-332af47cc2c59c7513d76cc89cef75046602737a.tar.xz
lvc: move vm-pools to /srv/lvc to avoid filling swap via tmpfs
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rw-r--r--cucumber/features/support/helpers/storage_helper.rb2
-rwxr-xr-xupdate_jdn.sh10
2 files changed, 9 insertions, 3 deletions
diff --git a/cucumber/features/support/helpers/storage_helper.rb b/cucumber/features/support/helpers/storage_helper.rb
index b8c79501..de782eed 100644
--- a/cucumber/features/support/helpers/storage_helper.rb
+++ b/cucumber/features/support/helpers/storage_helper.rb
@@ -19,7 +19,7 @@ class VMStorage
pool_xml = REXML::Document.new(File.read("#{@xml_path}/storage_pool.xml"))
pool_name = LIBVIRT_DOMAIN_NAME
pool_xml.elements['pool/name'].text = pool_name
- @pool_path = "/srv/workspace/vm-pools/#{pool_name}" # FIXME -- hardwiring the .../vm-pools path semms like a poor effort
+ @pool_path = "/srv/lvc/vm-pools/#{pool_name}" # FIXME -- hardwiring the .../vm-pools path semms like a poor effort
begin
@pool = @virt.lookup_storage_pool_by_name(pool_name)
rescue Libvirt::RetrieveError
diff --git a/update_jdn.sh b/update_jdn.sh
index 8bb24f1d..f24f9b64 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -123,12 +123,18 @@ if [ "$HOSTNAME" = "jenkins-test-vm" ] || [ "$HOSTNAME" = "profitbricks-build10-
sudo adduser jenkins libvirt-qemu
# we need a directory for the VM's storage pools
- VM_POOL_DIR=/srv/workspace/vm-pools
+ VM_POOL_DIR=/srv/lvc/vm-pools
if [ ! -d $VM_POOL_DIR ] ; then
- sudo mkdir $VM_POOL_DIR
+ sudo mkdir -p $VM_POOL_DIR
sudo chown jenkins:libvirt-qemu $VM_POOL_DIR
sudo chmod 775 $VM_POOL_DIR
fi
+
+ # tidy up after ourselves, for a while at least
+ OLD_VM_POOL_DIR=/srv/workspace/vm-pools
+ if [ -d "$OLD_VM_POOL_DIR" ] ; then
+ sudo rm -r "$OLD_VM_POOL_DIR"
+ fi
fi
# prepare tmpfs on some hosts