Skip to content

Commit

Permalink
Log when an image is not deleted because current count < last (#708)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Dec 14, 2023
1 parent a522726 commit 1fc6468
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openstack_image_manager/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,10 @@ def manage_outdated_images(self, managed_images: set) -> list:
except Exception as e:
logger.error("An Exception occurred: \n%s" % e)
self.exit_with_error = True
elif counter[image_name] <= last:
logger.info(
f"Image '{image}' will not be deleted, {counter[image_name]} <= {last}"
)
elif (
counter[image_name] < last and self.CONF.hide and not self.CONF.dry_run
):
Expand Down

0 comments on commit 1fc6468

Please sign in to comment.