)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5bd95581f11d9122a9213c112d802b5c25a93afc","unresolved":false,"context_lines":[{"line_number":17,"context_line":"In this case we should try to fallback from direct snapshot"},{"line_number":18,"context_line":"to standard one, it won\u0027t change location and will be uploaded"},{"line_number":19,"context_line":"successfully."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I12b9c35f74c5efafb07eb636ca04ef2ce61b8302"},{"line_number":22,"context_line":"Signed-off-by: George Melikov \u003cmail@gmelikov.ru\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f621f24_dee5cc39","line":20,"updated":"2020-11-13 01:39:13.000000000","message":"This is a bug, so if you are able to open a nova bug for this problem, please do and add \"Closes-Bug: #\u003cbug number\u003e\" on the commit message here to link to it.","commit_id":"31507288558cb654b7f79d981191080b645b38ab"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5bd95581f11d9122a9213c112d802b5c25a93afc","unresolved":false,"context_lines":[{"line_number":2483,"context_line":"            self._image_api.update(context, image_id, metadata,"},{"line_number":2484,"context_line":"                                   purge_props\u003dFalse)"},{"line_number":2485,"context_line":"        except (NotImplementedError, exception.ImageUnacceptable,"},{"line_number":2486,"context_line":"                exception.Forbidden, exception.ImageNotAuthorized) as e:"},{"line_number":2487,"context_line":"            if type(e) !\u003d NotImplementedError:"},{"line_number":2488,"context_line":"                LOG.warning(\u0027Performing standard snapshot because direct \u0027"},{"line_number":2489,"context_line":"                            \u0027snapshot failed: %(error)s\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_be5d7016","line":2486,"updated":"2020-11-13 01:39:13.000000000","message":"Can confirm that we do raise ImageNotAuthorized when we receive Forbidden from glance [1][2].\n\nHowever I see that we catch exception.Forbidden here and ImageNotAuthorized unexpectedly does not inherit from exception.Forbidden [3], which seems like a bug.\n\nEither way, we will also want some test coverage to go along with your change. If you think you will not be able to add a unit test to this patch, let me know and I can add a test.\n\n[1] https://github.com/openstack/nova/blob/eb279e9a5676f4142cce4700c3097ecc14161895/nova/image/glance.py#L693\n[2] https://github.com/openstack/nova/blob/eb279e9a5676f4142cce4700c3097ecc14161895/nova/image/glance.py#L1044-L1047\n[3] https://github.com/openstack/nova/blob/eb279e9a5676f4142cce4700c3097ecc14161895/nova/exception.py#L178","commit_id":"31507288558cb654b7f79d981191080b645b38ab"}]}
