)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d84057a4f1e9f217c4cbeaad2040fc6d98043a8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gary Kotton \u003cgkotton@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-29 08:36:07 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"API: provide meaning error when neutron is down"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When doing a \u0027nova list\u0027 and the neutron service is down the"},{"line_number":10,"context_line":"access for the security groups for the instance will throw an"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aaa499b_a6d8b8f0","line":7,"updated":"2015-04-12 13:13:40.000000000","message":"s/meaning/meaningful/","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"}],"nova/api/openstack/compute/contrib/security_groups.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fc4e0dea922681feaead6f0620c618a53a8a1996","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                        self.security_group_api"},{"line_number":422,"context_line":"                        .get_instances_security_groups_bindings(context,"},{"line_number":423,"context_line":"                                                                servers))"},{"line_number":424,"context_line":"                except Exception as exp:"},{"line_number":425,"context_line":"                    LOG.error(_LE(\u0027Unable to access security groups: %s\u0027),"},{"line_number":426,"context_line":"                              six.text_type(exp))"},{"line_number":427,"context_line":"                    msg \u003d _(\u0027Unable to access security groups\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_c1e72e11","line":424,"updated":"2015-04-12 15:20:10.000000000","message":"This is too generic. Maybe we should catch \u0027ConnectionRefused\u0027?","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d84057a4f1e9f217c4cbeaad2040fc6d98043a8","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                    LOG.error(_LE(\u0027Unable to access security groups: %s\u0027),"},{"line_number":426,"context_line":"                              six.text_type(exp))"},{"line_number":427,"context_line":"                    msg \u003d _(\u0027Unable to access security groups\u0027)"},{"line_number":428,"context_line":"                    raise exc.HTTPServiceUnavailable(explanation\u003dmsg)"},{"line_number":429,"context_line":"                for server in servers:"},{"line_number":430,"context_line":"                    groups \u003d sg_instance_bindings.get(server[\u0027id\u0027])"},{"line_number":431,"context_line":"                    if groups:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_c6dbc4ec","line":428,"updated":"2015-04-12 13:13:40.000000000","message":"Couldn\u0027t we hit this anywhere in this module that security_group_api is used if neutron is down?  Why only handle it here?\n\nWould it be worthwhile to add a translation wrapper that can decorate each method that\u0027s calling the security_group_api here and handle the NeutronClientException with a specific 503 code and translate it?\n\nhttp://git.openstack.org/cgit/openstack/python-neutronclient/tree/neutronclient/common/exceptions.py#n99","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"560884776278993bd5cc170c73affba403ec7728","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                    LOG.error(_LE(\u0027Unable to access security groups: %s\u0027),"},{"line_number":426,"context_line":"                              six.text_type(exp))"},{"line_number":427,"context_line":"                    msg \u003d _(\u0027Unable to access security groups\u0027)"},{"line_number":428,"context_line":"                    raise exc.HTTPServiceUnavailable(explanation\u003dmsg)"},{"line_number":429,"context_line":"                for server in servers:"},{"line_number":430,"context_line":"                    groups \u003d sg_instance_bindings.get(server[\u0027id\u0027])"},{"line_number":431,"context_line":"                    if groups:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_1ffd553a","line":428,"in_reply_to":"7aaa499b_a1e4220d","updated":"2015-04-13 17:27:20.000000000","message":"I thought about this some more and it would actually be better if we translated the NeutronClientExceptions in the neutron security group API code and raised up a NovaException from there, then the translation code in here (the API extension) would handle the NovaException and convert it to the proper webob exception.\n\nThe same idea is true for pretty much any API extension that talks to the network_api where it could be neutron and that could be down temporarily, we\u0027re just returning 500s on those.\n\nI thought cleaning that up was going to be part of the neutron API refactor in Liberty though, i.e. better error handling and translating.\n\nI don\u0027t mean to blow up this change with piles of extra work though.","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fc4e0dea922681feaead6f0620c618a53a8a1996","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                    LOG.error(_LE(\u0027Unable to access security groups: %s\u0027),"},{"line_number":426,"context_line":"                              six.text_type(exp))"},{"line_number":427,"context_line":"                    msg \u003d _(\u0027Unable to access security groups\u0027)"},{"line_number":428,"context_line":"                    raise exc.HTTPServiceUnavailable(explanation\u003dmsg)"},{"line_number":429,"context_line":"                for server in servers:"},{"line_number":430,"context_line":"                    groups \u003d sg_instance_bindings.get(server[\u0027id\u0027])"},{"line_number":431,"context_line":"                    if groups:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_a1e4220d","line":428,"in_reply_to":"7aaa499b_c6dbc4ec","updated":"2015-04-12 15:20:10.000000000","message":"+1 @Matt\u0027s comment","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"}],"nova/api/openstack/compute/plugins/v3/security_groups.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fc4e0dea922681feaead6f0620c618a53a8a1996","unresolved":false,"context_lines":[{"line_number":462,"context_line":"                    LOG.error(_LE(\u0027Unable to access security groups: %s\u0027),"},{"line_number":463,"context_line":"                              six.text_type(exp))"},{"line_number":464,"context_line":"                    msg \u003d _(\u0027Unable to access security groups\u0027)"},{"line_number":465,"context_line":"                    raise exc.HTTPServiceUnavailable(explanation\u003dmsg)"},{"line_number":466,"context_line":"                for server in servers:"},{"line_number":467,"context_line":"                    groups \u003d sg_instance_bindings.get(server[\u0027id\u0027])"},{"line_number":468,"context_line":"                    if groups:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_81f126d0","line":465,"updated":"2015-04-12 15:20:10.000000000","message":"if we want to raise this exception, we should add status code into expected_error decorator like https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/plugins/v3/servers.py#L476","commit_id":"4dd1c9347105e354819403bf12a527290e8aa80b"}]}
