Commit ac918f7d authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

deploy: image_dir -> vcluster_dir in deploy.conf

..so that it does not get overridden by image_dir in synnefo.conf.

This dir is used to keep locally the disks of the virtual cluster VMs.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent acaf6afa
......@@ -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)
......
......@@ -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
......
......@@ -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 = """ \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment