makebuildserver prune gloabal vagrant status when purging broken VMs

This commit is contained in:
Michael Pöhn 2017-03-24 04:16:30 +01:00 committed by Hans-Christoph Steiner
parent 8cfd3ca770
commit 2aa5523011

View file

@ -304,6 +304,7 @@ def destroy_current_image(v, serverdir):
v.destroy() v.destroy()
elif options.verbose: elif options.verbose:
print('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!') print('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
subprocess.check_call(['vagrant', 'global-status', '--prune'])
try: try:
shutil.rmtree(os.path.join(serverdir, '.vagrant')) shutil.rmtree(os.path.join(serverdir, '.vagrant'))