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
Reviewed: https:/ /review. openstack. org/384124 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=f4f42c966e3 78109f5ba9e4b80 0ae6e23dde1c75
Committed: https:/
Submitter: Jenkins
Branch: master
commit f4f42c966e37810 9f5ba9e4b800ae6 e23dde1c75
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
LOG. exception( ...)
except 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')
LOG. exception( ...)
except 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: Iff5448e888ee39 bce1ff99c7bf485 81d655fb687