rbd driver _trash_purge exception handling

Bug #1852471 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Jon Bernard

Bug Description

Detected by our pylint job...

_trash_purge does "except Exception as e" and then assumes that e.errno exists, which is not valid. This means that non-OSError exceptions will cascade into another messy exception here.

Should only check for e.errno on exception types where that is valid. (Which is OSError, I think)

Tags: drivers rbd
Changed in cinder:
assignee: nobody → Jon Bernard (jbernard)
status: New → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :
Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/694140
Committed: https://opendev.org/openstack/cinder/commit/25a5145a9d05efa0ab9c6baaae0b4316d13a5ec6
Submitter: "Zuul (22348)"
Branch: master

commit 25a5145a9d05efa0ab9c6baaae0b4316d13a5ec6
Author: Jon Bernard <email address hidden>
Date: Wed Nov 13 13:59:19 2019 -0500

    RBD: Check for OSError before using errno

    Change-Id: I40d46ddbe1e5a4e8c48a38f8b52f7281c5e0f7dd
    Closes-Bug: #1852471

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 20.0.0.0rc1

This issue was fixed in the openstack/cinder 20.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.