From 5aa2bc7af6f22776ea5751b7f9620845bb5f3a3a Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 28 Aug 2020 13:14:19 -0400 Subject: [PATCH] Drop snapshot in use log from ERROR to WARN This message is not actually an error inside the system for most of the time. The primary reason behind this is that it is possible that there are VMs using this image and therefore it can't be deleted, the operator has no actionable thing to do about this. For those who are monitoring ERROR level messages and alerting on them, this is noisy and not actionable, drop this error message to warning. Change-Id: If5447c3f5b4f678943273c2bdb2e44cd25d5b226 --- glance_store/_drivers/rbd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glance_store/_drivers/rbd.py b/glance_store/_drivers/rbd.py index 7c71075c..9eb9324f 100644 --- a/glance_store/_drivers/rbd.py +++ b/glance_store/_drivers/rbd.py @@ -463,26 +463,26 @@ class Store(driver.Store): {'snap_exc': exc}) LOG.debug(msg) except rbd.ImageBusy as exc: - log_msg = (_LE("Snap Operating Exception " + log_msg = (_LW("Snap Operating Exception " "%(snap_exc)s " "Snapshot is in use.") % {'snap_exc': exc}) - LOG.error(log_msg) + LOG.warning(log_msg) raise exceptions.InUseByStore() # Then delete image. rbd.RBD().remove(ioctx, image_name) except rbd.ImageHasSnapshots: - log_msg = (_LE("Remove image %(img_name)s failed. " + log_msg = (_LW("Remove image %(img_name)s failed. " "It has snapshot(s) left.") % {'img_name': image_name}) - LOG.error(log_msg) + LOG.warning(log_msg) raise exceptions.HasSnapshot() except rbd.ImageBusy: - log_msg = (_LE("Remove image %(img_name)s failed. " + log_msg = (_LW("Remove image %(img_name)s failed. " "It is in use.") % {'img_name': image_name}) - LOG.error(log_msg) + LOG.warning(log_msg) raise exceptions.InUseByStore() except rbd.ImageNotFound: msg = _("RBD image %s does not exist") % image_name