Incorrect usage of ResourceNotFound exception

Bug #1817533 reported by Tatiana Kholkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Undecided
Tatiana Kholkina

Bug Description

ResouceNotFound expects to receive two arguments. But one is provided here https://github.com/openstack/watcher/blob/stable/rocky/watcher/datasource/gnocchi.py#L98

It causes the following exception:

2019-02-25 09:11:07.040 1521 ERROR watcher.common.exception [req-e3d688fe-8e65-4785-8abd-1486c04caad3 - - - - -] Exception in string format operation: KeyError: u'id'
2019-02-25 09:11:07.040 1521 ERROR watcher.common.exception Traceback (most recent call last):
2019-02-25 09:11:07.040 1521 ERROR watcher.common.exception File "/opt/watcher/local/lib/python2.7/site-packages/watcher/common/exception.py", line 82, in __init__
2019-02-25 09:11:07.040 1521 ERROR watcher.common.exception message = self.msg_fmt % kwargs
2019-02-25 09:11:07.040 1521 ERROR watcher.common.exception KeyError: u'id'

Changed in watcher:
assignee: nobody → Tatiana Kholkina (tlashchova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

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

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

Reviewed: https://review.openstack.org/639052
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=594039f794ac5170cf0afd5e82dd08fbcba95633
Submitter: Zuul
Branch: master

commit 594039f794ac5170cf0afd5e82dd08fbcba95633
Author: Tatiana Kholkina <email address hidden>
Date: Mon Feb 25 13:55:22 2019 +0300

    Provide two arguments to exception's message

    Change-Id: I003c9e88abb08b11c22b008936413ee51f6096b1
    Closes-Bug: #1817533

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (stable/rocky)

Reviewed: https://review.openstack.org/639583
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=c1c0a472dd3bdde4d6bdb2a82658da627ac7ea12
Submitter: Zuul
Branch: stable/rocky

commit c1c0a472dd3bdde4d6bdb2a82658da627ac7ea12
Author: Tatiana Kholkina <email address hidden>
Date: Mon Feb 25 13:55:22 2019 +0300

    Provide two arguments to exception's message

    Change-Id: I003c9e88abb08b11c22b008936413ee51f6096b1
    Closes-Bug: #1817533
    (cherry picked from commit 594039f794ac5170cf0afd5e82dd08fbcba95633)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 2.0.0.0rc1

This issue was fixed in the openstack/watcher 2.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 1.12.1

This issue was fixed in the openstack/watcher 1.12.1 release.

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.