mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Handle stale cache
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
f871c09e7b
commit
f6188fddfc
1 changed files with 5 additions and 0 deletions
|
@ -630,6 +630,11 @@ class VM:
|
|||
self.ctx.error(str(exc))
|
||||
self.ctx.exit(1)
|
||||
instance_id_path.unlink()
|
||||
except AttributeError:
|
||||
# This machine no longer exists?!
|
||||
instance_id_path.unlink()
|
||||
self.ctx.info("It appears the cached image no longer exists...")
|
||||
self.ctx.exit(1)
|
||||
if not instance_id_path.exists():
|
||||
filters = [
|
||||
{"Name": "tag:vm-name", "Values": [self.name]},
|
||||
|
|
Loading…
Add table
Reference in a new issue