Comment 2 for bug 1631561

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/384124
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f4f42c966e378109f5ba9e4b800ae6e23dde1c75
Submitter: Jenkins
Branch: master

commit f4f42c966e378109f5ba9e4b800ae6e23dde1c75
Author: Zhiteng Huang <email address hidden>
Date: Sat Oct 8 13:03:37 2016 -0700

    Log message cleanup for volume-usage-audit

    volume-usage-audit utlis logs unecessary message at for deleted
    volumes or exception:

      try:
          LOG.debug('Send notification for vol X')
          _notify_func
      except Exception:
          LOG.exception(...)

    In the case when _notify_func raises exception, it logs
    'Send notification' and the exception.

    This change reduce logs by only logging 'Sent notification' when
    there is no exception by:

      try:
          _notify_func
          LOG.debug('Sent notification for vol X')
      except Exception:
          LOG.exception(...)

    Also, this change fixes notify_snapshot_usage() for not handling
    the case when source volume for the snapshot is deleted.

    Closes-bug: #1631561

    Change-Id: Iff5448e888ee39bce1ff99c7bf48581d655fb687