)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c2ddead48be853a9a3bbfb0aa5cb25dd1ae14ee","unresolved":false,"context_lines":[{"line_number":12,"context_line":"even the compute service is available. This patch will raise exception"},{"line_number":13,"context_line":"if the compute service isn\u0027t avalible when stop/start instance."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug #1228804"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I236a77a0cf5a8fd5e31bac708f0650df22e8f3eb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAS3%2F%2FrZc%3D","line":15,"updated":"2013-09-22 12:14:18.000000000","message":"please using Closes bug.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"95ea65ce8047da30aeaecb13fb68ea633d09bd89","unresolved":false,"context_lines":[{"line_number":12,"context_line":"even the compute service is available. This patch will raise exception"},{"line_number":13,"context_line":"if the compute service isn\u0027t avalible when stop/start instance."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fixes bug #1228804"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I236a77a0cf5a8fd5e31bac708f0650df22e8f3eb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAS3%2F%2FrY0%3D","line":15,"in_reply_to":"AAAAS3%2F%2FrZc%3D","updated":"2013-09-22 12:39:27.000000000","message":"Done","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"}],"nova/api/openstack/compute/contrib/server_start_stop.py":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c2ddead48be853a9a3bbfb0aa5cb25dd1ae14ee","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.compute_api.start(context, instance)"},{"line_number":64,"context_line":"        except (exception.HostNotFound,"},{"line_number":65,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":66,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":68,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":69,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrZY%3D","line":66,"updated":"2013-09-22 12:14:18.000000000","message":"feel like HTTPNotFound would be more appropriate than bad request.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"8b3c8909006ee8590b09fd3756cae24ec2544840","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.compute_api.start(context, instance)"},{"line_number":64,"context_line":"        except (exception.HostNotFound,"},{"line_number":65,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":66,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":68,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":69,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrM8%3D","line":66,"in_reply_to":"AAAAS3%2F%2FrYY%3D","updated":"2013-09-22 16:12:20.000000000","message":"I would like using resource rather than item, resource not only can be use to describe the action target, but also can be use to describe other resource which involved into the operation target, here Host can be abstracted as a resource IMHO, the point is the bad request is worse than resource not found IMHO.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"95ea65ce8047da30aeaecb13fb68ea633d09bd89","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.compute_api.start(context, instance)"},{"line_number":64,"context_line":"        except (exception.HostNotFound,"},{"line_number":65,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":66,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":67,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":68,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":69,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrYY%3D","line":66,"in_reply_to":"AAAAS3%2F%2FrZY%3D","updated":"2013-09-22 12:39:27.000000000","message":"Hi Guo Hui ,  HTTPNotFound usually means can\u0027t find the item. instance can\u0027t be found in database . In fact we can find instance when stop/start . I follow the exception which live_migrate and evacuate used .  See https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/evacuate.py#L88\n\n       * 400 - HTTPBadRequest\n        * 401 - HTTPUnauthorized\n        * 402 - HTTPPaymentRequired\n        * 403 - HTTPForbidden\n        * 404 - HTTPNotFound","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c2ddead48be853a9a3bbfb0aa5cb25dd1ae14ee","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self.compute_api.stop(context, instance)"},{"line_number":80,"context_line":"        except (exception.HostNotFound,"},{"line_number":81,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":82,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":83,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":84,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":85,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrZU%3D","line":82,"updated":"2013-09-22 12:14:18.000000000","message":"feel like HTTPNotFound would be more appropriate than bad request.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"c0c1b6179adc0e0ab2abd1c0c89b27649382050f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _assert_service_up(self, context, instance):"},{"line_number":48,"context_line":"        ctxt \u003d context.elevated()"},{"line_number":49,"context_line":"        host_name \u003d instance[\u0027host\u0027]"},{"line_number":50,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(ctxt, host_name)"},{"line_number":51,"context_line":"        if not service:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FqjE%3D","line":48,"updated":"2013-09-23 05:03:43.000000000","message":"This patch evelvate context to fix tempest exeption unauthorized","commit_id":"e79dcb9b75f593d92e603a8ad0e289aae3251507"}],"nova/api/openstack/compute/plugins/v3/servers.py":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c2ddead48be853a9a3bbfb0aa5cb25dd1ae14ee","unresolved":false,"context_lines":[{"line_number":1367,"context_line":"            self.compute_api.start(context, instance)"},{"line_number":1368,"context_line":"        except (exception.HostNotFound,"},{"line_number":1369,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":1370,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":1371,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":1372,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":1373,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrZM%3D","line":1370,"updated":"2013-09-22 12:14:18.000000000","message":"feel like HTTPNotFound would be more appropriate than bad request.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c2ddead48be853a9a3bbfb0aa5cb25dd1ae14ee","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"            self.compute_api.stop(context, instance)"},{"line_number":1385,"context_line":"        except (exception.HostNotFound,"},{"line_number":1386,"context_line":"                exception.ComputeServiceUnavailable) as e:"},{"line_number":1387,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":1388,"context_line":"        except exception.InstanceNotReady as e:"},{"line_number":1389,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":1390,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FrZI%3D","line":1387,"updated":"2013-09-22 12:14:18.000000000","message":"feel like HTTPNotFound would be more appropriate than bad request.","commit_id":"a9a03c01b14f7ef4c6a4c9f2c5ee5a8157bb2967"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1e2b0f26be1d48a0aa1b533eb01d3cbe84cddecf","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, host_name)"},{"line_number":699,"context_line":"        if not service:"},{"line_number":700,"context_line":"            raise exception.HostNotFound(host\u003dhost_name)"},{"line_number":701,"context_line":"        if not self.servicegroup_api.service_is_up(service):"},{"line_number":702,"context_line":"            raise exception.ComputeServiceUnavailable(host\u003dhost_name)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    @wsgi.serializers(xml\u003dServerTemplate)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FrVk%3D","line":701,"updated":"2013-09-22 14:05:20.000000000","message":"Can we move this check to decorator \u0027nova.compute.api.check_instance_host\u0027? Because check_instance_host already check HostNotFound, then we needn\u0027t check that in api layer again.","commit_id":"9c8aab0c43138eb2e6086686a925a2f6618e0f18"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"c666293faf405afe6709d7e1680fdc45f799e856","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, host_name)"},{"line_number":699,"context_line":"        if not service:"},{"line_number":700,"context_line":"            raise exception.HostNotFound(host\u003dhost_name)"},{"line_number":701,"context_line":"        if not self.servicegroup_api.service_is_up(service):"},{"line_number":702,"context_line":"            raise exception.ComputeServiceUnavailable(host\u003dhost_name)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    @wsgi.serializers(xml\u003dServerTemplate)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FrRg%3D","line":701,"in_reply_to":"AAAAS3%2F%2FrVk%3D","updated":"2013-09-22 14:52:17.000000000","message":"That is also my original thought :), nova.compute.api.check_instance_host was used many places , I\u0027m not sure  whether othere actions require  compute service is availale. I think rejecting  the request before passing to compute.api  is more efficient(don\u0027t need rpc call). Need more disscussion","commit_id":"9c8aab0c43138eb2e6086686a925a2f6618e0f18"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"371b6b3a9a0403a971b198fd771bc4ea1eca0a04","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, host_name)"},{"line_number":699,"context_line":"        if not service:"},{"line_number":700,"context_line":"            raise exception.HostNotFound(host\u003dhost_name)"},{"line_number":701,"context_line":"        if not self.servicegroup_api.service_is_up(service):"},{"line_number":702,"context_line":"            raise exception.ComputeServiceUnavailable(host\u003dhost_name)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    @wsgi.serializers(xml\u003dServerTemplate)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2Fq88%3D","line":701,"updated":"2013-09-22 22:08:56.000000000","message":"copy Alex Xu\u0027s comment from patch 4. Need more discussion :\nAlex Xu:\nCan we move this check to decorator \u0027nova.compute.api.check_instance_host\u0027? Because check_instance_host already check HostNotFound, then we needn\u0027t check that in api layer again.\n\nMy reply:\nThat is also my original thought :), nova.compute.api.check_instance_host was used many places , I\u0027m not sure whether othere actions require compute service is availale. I think rejecting the request before passing to compute.api is more efficient(don\u0027t need rpc call). Need more disscussion","commit_id":"2e38bd9cc0aa625633660b78703c76cff7a514de"}],"nova/compute/api.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"3993a6fab5b04a8b45fe0a7e277c623516c861c8","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    @functools.wraps(function)"},{"line_number":182,"context_line":"    def wrapped(self, context, instance, *args, **kwargs):"},{"line_number":183,"context_line":"        service \u003d \\"},{"line_number":184,"context_line":"           service_obj.Service.get_by_compute_host(context.elevated(),"},{"line_number":185,"context_line":"                                                   instance[\u0027host\u0027])"},{"line_number":186,"context_line":"        if not service:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FSuY%3D","line":183,"updated":"2013-09-30 18:25:50.000000000","message":"Only check these if cell_type !\u003d \u0027api\u0027.  If cell_type is \u0027api\u0027, it means cells is enabled and this is the API cell... where these checks will fail.","commit_id":"4f34ade690e558144238e19140a4078e71a51a8f"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"2e773c6181cd5eb47e279b67c6c4172041c13cdb","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    @functools.wraps(function)"},{"line_number":182,"context_line":"    def wrapped(self, context, instance, *args, **kwargs):"},{"line_number":183,"context_line":"        service \u003d \\"},{"line_number":184,"context_line":"           service_obj.Service.get_by_compute_host(context.elevated(),"},{"line_number":185,"context_line":"                                                   instance[\u0027host\u0027])"},{"line_number":186,"context_line":"        if not service:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATH%2F%2F6hM%3D","line":183,"in_reply_to":"AAAAS3%2F%2FSuY%3D","updated":"2013-10-08 05:15:21.000000000","message":"Done","commit_id":"4f34ade690e558144238e19140a4078e71a51a8f"},{"author":{"_account_id":6722,"name":"ChangBo Guo(gcb)","email":"guochbo@cn.ibm.com","username":"guochbo"},"change_message_id":"9b9cddcef42078f7a12a88782e13f10dd82621c2","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    @functools.wraps(function)"},{"line_number":182,"context_line":"    def wrapped(self, context, instance, *args, **kwargs):"},{"line_number":183,"context_line":"        service \u003d \\"},{"line_number":184,"context_line":"           service_obj.Service.get_by_compute_host(context.elevated(),"},{"line_number":185,"context_line":"                                                   instance[\u0027host\u0027])"},{"line_number":186,"context_line":"        if not service:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FKtQ%3D","line":183,"in_reply_to":"AAAAS3%2F%2FSuY%3D","updated":"2013-10-03 01:56:26.000000000","message":"Thanks Chris, will update this after vacation :-)","commit_id":"4f34ade690e558144238e19140a4078e71a51a8f"}]}
