Comment 9 for bug 1836212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/671640
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=738774b942dab21d8c03c70b4e74b6a487515ff5
Submitter: Zuul
Branch: master

commit 738774b942dab21d8c03c70b4e74b6a487515ff5
Author: melanie witt <email address hidden>
Date: Thu Jul 18 23:59:16 2019 +0000

    Avoid logging traceback when detach device not found

    We use the oslo.utils save_and_reraise_exception context manager in our
    detach device code and catch specific exceptions that mean 'not found'
    and raise DeviceNotFound instead. When we do that, the
    save_and_reraise_exception context manager logs an ERROR traceback of
    the original exception, for informational purposes. This is misleading
    when trying to debug other issues, as it makes it look like the caught
    exception caused a problem.

    This passes the reraise=False keyword arg to the context manager and
    sets the 'reraise' attribute to True only if we are not going to raise
    a different exception.

    Related-Bug: #1836212

    Change-Id: Icce1e31fe3ebcbf9e4897bbfa57b7f3d1fba67a3