)]}'
{"nova/api/openstack/compute/remote_consoles.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"765e91c7c04138bd633b37b1e39cc8e6ee847c62","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        except exception.ConsoleTypeUnavailable as e:"},{"line_number":87,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":88,"context_line":"        except (exception.InstanceUnknownCell,"},{"line_number":89,"context_line":"                     exception.InstanceNotFound) as e:"},{"line_number":90,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":91,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":92,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_743cea93","line":89,"range":{"start_line":89,"start_character":21,"end_line":89,"end_character":47},"updated":"2016-10-05 08:55:53.000000000","message":"shouldn\u0027t we remove it then?","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"f803a8a082392be7f1c74bcd066858e277d4d8d0","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        except exception.ConsoleTypeUnavailable as e:"},{"line_number":87,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":88,"context_line":"        except (exception.InstanceUnknownCell,"},{"line_number":89,"context_line":"                     exception.InstanceNotFound) as e:"},{"line_number":90,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":91,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":92,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_864a3d26","line":89,"range":{"start_line":89,"start_character":21,"end_line":89,"end_character":47},"in_reply_to":"1a95cdbc_27a8ec8c","updated":"2016-11-14 13:06:02.000000000","message":"I\u0027ve checked code once again, so you are right, InstanceNotFound isn\u0027t converted to HTTPNotFound, so it makes sense to leave this except section as is. I\u0027ve expected that there should be auto-conversion, because of this line\nhttps://github.com/openstack/nova/blob/master/nova/exception.py#L570","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"31439526e84150684557a5ee38e7e38e395aef82","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        except exception.ConsoleTypeUnavailable as e:"},{"line_number":87,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":88,"context_line":"        except (exception.InstanceUnknownCell,"},{"line_number":89,"context_line":"                     exception.InstanceNotFound) as e:"},{"line_number":90,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":91,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":92,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_27a8ec8c","line":89,"range":{"start_line":89,"start_character":21,"end_line":89,"end_character":47},"in_reply_to":"1a95cdbc_5f5154d7","updated":"2016-10-07 18:21:12.000000000","message":"I am not sure what you are saying here TBH..\n\nHere is handling InstanceNotFound, not HTTPNotFound which is raised by common.get_instance().\n\nIf InstanceNotFound is raised in self.compute_api.get_spice_console() after passing the above common.get_instance() due to a race condition, it is fine to return 404 response to clients because the resource(in this case, server) is specified in URI.\nPlease see api-wg guideline[1]:\n\n If a request contains a reference to a nonexistent resource\n in the body (not URI), the code should be 400 Bad Request.\n Do not use 404 NotFound because :rfc:`7231#section-6.5.4`\n (section 6.5.4) mentions the origin server did not find a\n current representation for the target resource for 404 and\n representation for the target resource means a URI.\n\n[1]: https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9a984cd93a492f91838d82d7045de59f8c63a8f7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        except exception.ConsoleTypeUnavailable as e:"},{"line_number":87,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":88,"context_line":"        except (exception.InstanceUnknownCell,"},{"line_number":89,"context_line":"                     exception.InstanceNotFound) as e:"},{"line_number":90,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":91,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":92,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_cbe8af7f","line":89,"range":{"start_line":89,"start_character":21,"end_line":89,"end_character":47},"in_reply_to":"1a95cdbc_743cea93","updated":"2016-10-05 13:33:51.000000000","message":"I guess this handling for some race condition like \"delete-server\" happens between the above get_instance and here.\nOr it never happens?","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"763d6c62d5bda16afcf3a12df6b2d69e50448754","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        except exception.ConsoleTypeUnavailable as e:"},{"line_number":87,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":88,"context_line":"        except (exception.InstanceUnknownCell,"},{"line_number":89,"context_line":"                     exception.InstanceNotFound) as e:"},{"line_number":90,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":91,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":92,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_5f5154d7","line":89,"range":{"start_line":89,"start_character":21,"end_line":89,"end_character":47},"in_reply_to":"1a95cdbc_cbe8af7f","updated":"2016-10-07 09:59:29.000000000","message":"Even if it happens, what\u0027s the difference here? It will be exposed over REST API as 404, right? and there is no extra handling here.","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"}],"nova/api/openstack/compute/security_groups.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"765e91c7c04138bd633b37b1e39cc8e6ee847c62","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            groups \u003d self.security_group_api.get_instance_security_groups("},{"line_number":349,"context_line":"                context, instance, True)"},{"line_number":350,"context_line":"        except (exception.SecurityGroupNotFound,"},{"line_number":351,"context_line":"                exception.InstanceNotFound) as exp:"},{"line_number":352,"context_line":"            msg \u003d exp.format_message()"},{"line_number":353,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_345342e3","line":351,"range":{"start_line":351,"start_character":16,"end_line":351,"end_character":42},"updated":"2016-10-05 08:55:53.000000000","message":"same question","commit_id":"bf38f0d1c2a82f9da065a0cea27ea2f525ef6a60"}]}
