diff options
author | Stefan Sicleru <stefan.sicleru@enea.com> | 2016-09-26 14:09:09 +0200 |
---|---|---|
committer | Stefan Sicleru <stefan.sicleru@enea.com> | 2016-09-26 14:27:23 +0200 |
commit | d4f9612475a07773af182f244bcd597d25bf4cd8 (patch) | |
tree | 9fca314d0638fb136895ada0f974e88d4a9dee55 /deploy | |
parent | 1d4f96facadd5458a87a4d68b0b5298ca47cd1fd (diff) |
deploy: fix: remove storage files during cleanup
Remove old disks through virsh instead of calling os.delete()
methods so that the cleanup phase would succeed within a non-root
setup. [1]
Related-bug: ARMBAND-128
[1] https://gerrit.opnfv.org/gerrit/#/c/19491/
Change-Id: I90007edf014c7e15a68b9a334fcaffaa127ee4ab
Signed-off-by: Stefan Sicleru <stefan.sicleru@enea.com>
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/environments/execution_environment.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py index af0e130dd..3812902aa 100644 --- a/deploy/environments/execution_environment.py +++ b/deploy/environments/execution_environment.py @@ -46,9 +46,7 @@ class ExecutionEnvironment(object): disk_files.append(source_file) log('Deleting VM %s with disks %s' % (vm_name, disk_files)) exec_cmd('virsh destroy %s' % vm_name, False) - exec_cmd('virsh undefine %s' % vm_name, False) - for file in disk_files: - delete(file) + exec_cmd('virsh undefine --managed-save --remove-all-storage %s' % vm_name, False) def overwrite_xml(self, vm_xml, vm_definition_overwrite): if not vm_definition_overwrite: |