From bbe22d2fde455e0dfeb2d3306f180c93ad419f15 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Mon, 12 Jan 2015 16:36:53 -0800 Subject: [PATCH] tasks/calamari_setup: remove HTTP-downloaded iceball, if any Fixes: #10522 Signed-off-by: Dan Mick --- tasks/calamari_setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/calamari_setup.py b/tasks/calamari_setup.py index d1feeb90e0fc6..75e791d0fdcbe 100644 --- a/tasks/calamari_setup.py +++ b/tasks/calamari_setup.py @@ -205,9 +205,11 @@ def calamari_install(config, cal_svr): log.info('calamari server on %s' % ice_distro) iceball_loc = config.get('iceball_location', '.') ice_version = config.get('ice_version', ICE_VERSION_DEFAULT) + delete_iceball = False if iceball_loc.startswith('http'): - get_iceball_with_http(iceball_loc, ice_version, ice_distro, '.') - iceball_loc = '.' + get_iceball_with_http(iceball_loc, ice_version, ice_distro, '/tmp') + iceball_loc = '/tmp' + delete_iceball = True elif iceball_loc == '.': ice_tool_loc = os.path.join(ice_tool_dir, 'ice-tools') if not os.path.isdir(ice_tool_loc): @@ -251,6 +253,8 @@ def calamari_install(config, cal_svr): yield finally: log.info('Cleaning up after Calamari installation') + if delete_iceball: + os.unlink(gz_file) @contextlib.contextmanager -- 2.39.5