Comment 13 for bug 1836212

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

Reviewed: https://review.opendev.org/674068
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3a1be7afd0f11a2123c59b0ddea63f08bb4436ce
Submitter: Zuul
Branch: stable/rocky

commit 3a1be7afd0f11a2123c59b0ddea63f08bb4436ce
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
    (cherry picked from commit 738774b942dab21d8c03c70b4e74b6a487515ff5)
    (cherry picked from commit d83342226470e1957525978d7bec7d98db9bb695)