Download each cached image once.
Nodepool's devstack image cacher was redownloading every image one time per devstack branch. We only need to download the image once if the image name doesn't change. Change-Id: Ib1910c34b8479ebad740a915fcc9297205cbe387
This commit is contained in:
parent
a6bf081ad8
commit
6894c3ffaa
@ -106,7 +106,7 @@ def main():
|
||||
distribution = sys.argv[1]
|
||||
|
||||
branches = local_prep(distribution)
|
||||
image_filenames = {}
|
||||
image_filenames = []
|
||||
for branch_data in branches:
|
||||
if branch_data.get('debs'):
|
||||
run_local(['sudo', 'apt-get', '-y', '-d', 'install'] +
|
||||
@ -121,6 +121,7 @@ def main():
|
||||
fname = url.split('/')[-1]
|
||||
if fname in image_filenames:
|
||||
continue
|
||||
image_filenames.append(fname)
|
||||
run_local(['wget', '-nv', '-c', url,
|
||||
'-O', os.path.join(CACHEDIR, fname)])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user