message_field.Detail.EXCEPTION_DETAIL_MAPPINGS contains non-exception

Bug #1822025 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Brian Rosmaita

Bug Description

Seen in at least Stein and master (Train):

cinder.message_field.Detail.EXCEPTION_DETAIL_MAPPINGS dict contains this key/value pair:
UNMANAGE_ENC_NOT_SUPPORTED: ['UnmanageEncVolNotSupported']

There is no UnmanageEncVolNotSupported exception defined in the cinder.exception module.

In the current code this isn't causing a problem because that string will never match any __name__ of the __class__ of an exception, but it would probably be best to remove it. There's not an obvious exception defined in cinder.exception that matches the situation described by the detail message it maps to, namely, "Unmanaging encrypted volumes is not supported."

Changed in cinder:
assignee: nobody → Brian Rosmaita (brian-rosmaita)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/648309

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/648309
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a5b5d8e70ec4bdc8aea48491892aa20683f54e68
Submitter: Zuul
Branch: master

commit a5b5d8e70ec4bdc8aea48491892aa20683f54e68
Author: Brian Rosmaita <email address hidden>
Date: Wed Mar 27 23:34:28 2019 -0400

    Remove non-exception from EXCEPTION_DETAIL_MAPPINGS

    Removes a non-exception from the map and adds tests to check the
    consistency of message_field.Action and .Detail fields.

    Updates test-requirements and lower-constraints to use the most
    recent version of ddt allowed by current upper-constraints. (An
    included test uses the idata decorator, which allows passing an
    iterator to the test data.)

    Closes-bug: #1822025
    Change-Id: I0cad6589b145fac430942ccbb27279db7b3b152f

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

This issue was fixed in the openstack/cinder 15.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.