KeyErrror 'volume' occurs when filter file does not existed

Bug #1857945 reported by Yang Youseok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Yang Youseok

Bug Description

api/v2/volumes.py _get_volume_filter_options() assume that resource filter dictionary existed. But if there is Exception when non existed filter file read, it returns empty dict. The code which assume that there would always be valid dict should be changed.

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

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

commit fe7cf6be84ca133da31d97beb9593b79fad34e0e
Author: Yang Youseok <email address hidden>
Date: Fri Nov 29 19:18:28 2019 +0900

    Fix KeyError exception when volume filter file does not exist

    Since current code assume that resource key is existed, exception
    happens when filter file does not initialized. Return empty list
    to avoid KeyError exception.

    Closes-Bug: #1857945
    Change-Id: I2d3c0f3f8d2c02ffedc4bf5ddc45e21c2d22c3e2

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

This issue was fixed in the openstack/cinder 16.0.0.0b1 development milestone.

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.