diff --git a/snf-deploy/conf/deploy.conf b/snf-deploy/conf/deploy.conf index 8076447537427eae849fdb5f71e551398361d70c..c019e00af7eba14c90535650617d3b39c433fc41 100644 --- a/snf-deploy/conf/deploy.conf +++ b/snf-deploy/conf/deploy.conf @@ -11,8 +11,8 @@ state_dir = /var/lib/snf-deploy # dir to find all template files used to customize setup # in case you want to add another setting please modify the corresponding file template_dir = /var/lib/snf-deploy/files -# dir to store local images (disk0, disk1 of the virtual cluster) -image_dir = /var/lib/snf-deploy/images +# dir to store disks for the virtual cluster) +vcluster_dir = /var/lib/snf-deploy/vcluster # dir to store/find local packages # dir to locally save packages that will be downloaded from package_url # put here any locally created packages (useful for development) diff --git a/snf-deploy/snfdeploy/components.py b/snf-deploy/snfdeploy/components.py index 0e5aaa33cde56491ce7f6767ddcd1ed849eea264..b5c06bd4d161cc828bdd1b00c4c0c959168a3638 100644 --- a/snf-deploy/snfdeploy/components.py +++ b/snf-deploy/snfdeploy/components.py @@ -1226,8 +1226,8 @@ class NFS(base.Component): "mkdir -p %s/data" % p, "mkdir -p %s/blocks" % config.archip_dir, "mkdir -p %s/maps" % config.archip_dir, - "chown www-data.www-data %s/data" % p, - "chmod g+ws %s/data" % p, + "chown www-data.www-data %s/data" % config.pithos_dir, + "chmod g+ws %s/data" % config.pithos_dir, ] @base.run_cmds diff --git a/snf-deploy/snfdeploy/vcluster.py b/snf-deploy/snfdeploy/vcluster.py index 68101176b6444690945dee955732e83598022829..d2658da1c13f3933873606af07ab6309158c10bf 100644 --- a/snf-deploy/snfdeploy/vcluster.py +++ b/snf-deploy/snfdeploy/vcluster.py @@ -155,8 +155,10 @@ def image(): else: url = config.squeeze_image_url - disk0 = "{0}/{1}.disk0".format(config.image_dir, config.os) - disk1 = "{0}/{1}.disk1".format(config.image_dir, config.os) + disk0 = "{0}/{1}.disk0".format(config.vcluster_dir, config.os) + disk1 = "{0}/{1}.disk1".format(config.vcluster_dir, config.os) + + create_dir(config.vcluster_dir, False) if url and not os.path.exists(disk0): cmd = "wget {0} -O {1}".format(url, disk0) @@ -200,13 +202,13 @@ def _launch_vm(name, mac): disks = """ \ -drive file={0}/{1}.disk0,format=raw,if=none,id=drive0,snapshot=on \ -device virtio-blk-pci,drive=drive0,id=virtio-blk-pci.0 \ -""".format(config.image_dir, config.os) +""".format(config.vcluster_dir, config.os) if config.create_extra_disk: disks += """ \ -drive file={0}/{1}.disk1,format=raw,if=none,id=drive1,snapshot=on \ -device virtio-blk-pci,drive=drive1,id=virtio-blk-pci.1 \ -""".format(config.image_dir, config.os) +""".format(config.vcluster_dir, config.os) ifup = config.lib_dir + "/ifup" nics = """ \