Commit de82a2ac authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis
Browse files

deploy: Download base image once

Both Image and Kamaki download the debian base image. In order
to download it just once we store it under /tmp and check
if it exists before downloading it again.

Use -4 option in wget in order not to use IPv6.
Signed-off-by: default avatarDimitris Aragiorgis <>
parent 0ca0e1cc
......@@ -740,7 +740,8 @@ class Image(base.Component):
d = config.images_dir
image = "debian_base.diskdump"
return [
"test -e %s/%s || wget %s -O %s/%s" % (d, image, url, d, image),
"test -e /tmp/%s || wget -4 %s -O /tmp/%s" % (image, url, image),
"cp /tmp/%s %s/%s" % (image, d, image),
"mv /etc/default/snf-image /etc/default/snf-image.orig",
......@@ -1675,7 +1676,7 @@ EOF
url = config.debian_base_url
image = "debian_base.diskdump"
return [
"test -e /tmp/%s || wget %s -O /tmp/%s" % (image, url, image)
"test -e /tmp/%s || wget -4 %s -O /tmp/%s" % (image, url, image)
def _upload_image(self):
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