summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-06-21 17:22:10 +0200
committerHolger Levsen <holger@layer-acht.org>2016-06-21 17:31:16 +0200
commitb5c6a9ddff61f9ed783c6ac6e3feb952f85094f2 (patch)
tree61091eec3786722d190009e4211fd1e33dd2e6f6
parent03cfc1f8a12a8290ffffd1742b608cc566c41003 (diff)
downloadjenkins.debian.net-b5c6a9ddff61f9ed783c6ac6e3feb952f85094f2.tar.xz
lvc: put VM storage in /srv/workspace/vm-pools/
-rw-r--r--cucumber/features/support/helpers/storage_helper.rb2
-rwxr-xr-xupdate_jdn.sh18
2 files changed, 14 insertions, 6 deletions
diff --git a/cucumber/features/support/helpers/storage_helper.rb b/cucumber/features/support/helpers/storage_helper.rb
index a96bc514..2040937b 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 = "#{$config["TMPDIR"]}/pool-#{pool_name}"
+ @pool_path = "/srv/workspace/vm-pools/#{pool_name}"
begin
@pool = @virt.lookup_storage_pool_by_name(pool_name)
rescue Libvirt::RetrieveError
diff --git a/update_jdn.sh b/update_jdn.sh
index 33aced15..e6e7aafa 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -88,16 +88,24 @@ for user in helmut holger mattia lunar phil ; do
sudo usermod -G $extra_groups $user
done
+sudo mkdir -p /srv/workspace
+[ -d /srv/schroots ] || sudo mkdir -p /srv/schroots
+[ -h /chroots ] || sudo ln -s /srv/workspace/chroots /chroots
+[ -h /schroots ] || sudo ln -s /srv/schroots /schroots
+
if [ "$HOSTNAME" = "jenkins-test-vm" ] || [ "$HOSTNAME" = "profitbricks-build10-amd64" ] ; then
# jenkins needs access to libvirt
sudo adduser jenkins libvirt
sudo adduser jenkins libvirt-qemu
-fi
-sudo mkdir -p /srv/workspace
-[ -d /srv/schroots ] || sudo mkdir -p /srv/schroots
-[ -h /chroots ] || sudo ln -s /srv/workspace/chroots /chroots
-[ -h /schroots ] || sudo ln -s /srv/schroots /schroots
+ # we need a directory for the VM's storage pools
+ VM_POOL_DIR=/srv/workspace/vm-pools
+ if [ ! -d $VM_POOL_DIR ] ; then
+ sudo mkdir $VM_POOL_DIR
+ sudo chown jenkins:libvirt-qemu $VM_POOL_DIR
+ sudo chmod 775 $VM_POOL_DIR
+ fi
+fi
# prepare tmpfs on some hosts
case $HOSTNAME in