]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/calamari_setup: remove HTTP-downloaded iceball, if any
authorDan Mick <dan.mick@redhat.com>
Tue, 13 Jan 2015 00:36:53 +0000 (16:36 -0800)
committerDan Mick <dan.mick@redhat.com>
Tue, 13 Jan 2015 03:56:58 +0000 (19:56 -0800)
Fixes: #10522
Signed-off-by: Dan Mick <dan.mick@redhat.com>
tasks/calamari_setup.py

index d1feeb90e0fc614301a9e3a413fd19bc2584e4e2..75e791d0fdcbec8805b31f9e955f63524222d54e 100644 (file)
@@ -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