Public bug reported: During rocky glance has added ability to mention 'backend' information in the location as a metadata attribute. As of now while setting a class for multi_store [1] we are accessing 'backend' from location as it will always be present. This can lead us to KeyError if backend is not present/provided to image.
To avoid this use dict.get() function which will return None if 'backend' key is not present in the location metadata. Reference: Glance Store tips job [2] is failing with this issue at the moment. [1] https://github.com/openstack/glance/blob/master/glance/location.py#L70 [2] http://logs.openstack.org/periodic/opendev.org/openstack/glance/master/glance-tox-functional-glance_store-tips/27b550c/testr_results.html.gz ** Affects: glance Importance: High Assignee: Abhishek Kekane (abhishek-kekane) Status: New ** Changed in: glance Assignee: (unassigned) => Abhishek Kekane (abhishek-kekane) ** Changed in: glance Importance: Undecided => High -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1832490 Title: Avoid keyerror which might cause failure of functional tests Status in Glance: New Bug description: During rocky glance has added ability to mention 'backend' information in the location as a metadata attribute. As of now while setting a class for multi_store [1] we are accessing 'backend' from location as it will always be present. This can lead us to KeyError if backend is not present/provided to image. To avoid this use dict.get() function which will return None if 'backend' key is not present in the location metadata. Reference: Glance Store tips job [2] is failing with this issue at the moment. [1] https://github.com/openstack/glance/blob/master/glance/location.py#L70 [2] http://logs.openstack.org/periodic/opendev.org/openstack/glance/master/glance-tox-functional-glance_store-tips/27b550c/testr_results.html.gz To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1832490/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp