model = None
try:
if not await self.model_exists(model_name, controller=controller):
+ self.log.warn(f"Model {model_name} doesn't exist")
return
- self.log.debug("Destroying model {}".format(model_name))
-
+ self.log.debug(f"Getting model {model_name} to be destroyed")
model = await self.get_model(controller, model_name)
+ self.log.debug(f"Destroying manual machines in model {model_name}")
# Destroy machines that are manually provisioned
# and still are in pending state
await self._destroy_pending_machines(model, only_manual=True)
)
except Exception as e:
if not await self.model_exists(model_name, controller=controller):
+ self.log.warn(
+ f"Failed deleting model {model_name}: model doesn't exist"
+ )
return
+ self.log.warn(f"Failed deleting model {model_name}: {e}")
raise e
finally:
if model:
:param: controller: Controller object
:param: timeout: Timeout in seconds
"""
+ self.log.debug(f"Destroying model {model_name}")
async def _destroy_model_loop(model_name: str, controller: Controller):
while await self.model_exists(model_name, controller=controller):