Ensure script cleanup is done in chroot
This commit is contained in:
parent
712a50ca27
commit
c1c22c81e7
|
@ -681,9 +681,15 @@ def create_vm(
|
||||||
|
|
||||||
def fail_clean(celery, msg, exception=ProvisioningError):
|
def fail_clean(celery, msg, exception=ProvisioningError):
|
||||||
try:
|
try:
|
||||||
vm_builder.cleanup()
|
with chroot(temp_dir):
|
||||||
|
vm_builder.cleanup()
|
||||||
|
except Exception:
|
||||||
|
# We're already failing, do the best we can
|
||||||
|
pass
|
||||||
|
try:
|
||||||
general_cleanup()
|
general_cleanup()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
# We're already failing, do the best we can
|
||||||
pass
|
pass
|
||||||
fail(celery, msg, exception=exception)
|
fail(celery, msg, exception=exception)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue