)]}'
{"nova/api/openstack/compute/hypervisors.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ca91c17f0c4f983d88dc53b44475d655bf7b50e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    self._view_hypervisor("},{"line_number":120,"context_line":"                        hyp, service, False, req))"},{"line_number":121,"context_line":"            except (exception.ComputeHostNotFound,"},{"line_number":122,"context_line":"                    exception.HostMappingNotFound):"},{"line_number":123,"context_line":"                # The compute service could be deleted which doesn\u0027t delete"},{"line_number":124,"context_line":"                # the compute node record, that has to be manually removed"},{"line_number":125,"context_line":"                # from the database so we just ignore it when listing nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_8913060e","line":122,"updated":"2017-04-13 15:56:44.000000000","message":"I asked about something like this in the original change, different API though:\n\nhttps://review.openstack.org/#/c/442162/21/nova/api/openstack/compute/hypervisors.py@256\n\nBut in that case we broke out of the loop if anything wasn\u0027t found, rather than skip that host. Here we skip the host and keep going.\n\nI don\u0027t have a good answer here about which we should do, if it\u0027s better to skip things not mapped or fail. Seems like we should be consistent though.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0dd797c6b91fbe30f70b8f6a978e32e9eab96aa","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    self._view_hypervisor("},{"line_number":120,"context_line":"                        hyp, service, False, req))"},{"line_number":121,"context_line":"            except (exception.ComputeHostNotFound,"},{"line_number":122,"context_line":"                    exception.HostMappingNotFound):"},{"line_number":123,"context_line":"                # The compute service could be deleted which doesn\u0027t delete"},{"line_number":124,"context_line":"                # the compute node record, that has to be manually removed"},{"line_number":125,"context_line":"                # from the database so we just ignore it when listing nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_be26f9b6","line":122,"in_reply_to":"9ff52f3f_2992baf7","updated":"2017-04-13 17:33:36.000000000","message":"I thought about that, and I suppose, but that behavior is here for a different reason, as the comment below suggests, it\u0027s for an intentional case where the service record is deleted but the compute node isn\u0027t. But I\u0027m OK with just putting these together, maybe they are closer than I\u0027m thinking.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eff416b309ef3715f4c5babd989e219d412d190d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    self._view_hypervisor("},{"line_number":120,"context_line":"                        hyp, service, False, req))"},{"line_number":121,"context_line":"            except (exception.ComputeHostNotFound,"},{"line_number":122,"context_line":"                    exception.HostMappingNotFound):"},{"line_number":123,"context_line":"                # The compute service could be deleted which doesn\u0027t delete"},{"line_number":124,"context_line":"                # the compute node record, that has to be manually removed"},{"line_number":125,"context_line":"                # from the database so we just ignore it when listing nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_2992baf7","line":122,"in_reply_to":"9ff52f3f_8913060e","updated":"2017-04-13 16:04:01.000000000","message":"I dunno, the least change is to keep the behavior we\u0027ve had for a long time in this code right?","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ca91c17f0c4f983d88dc53b44475d655bf7b50e","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                    self._view_hypervisor("},{"line_number":167,"context_line":"                        hyp, service, True, req))"},{"line_number":168,"context_line":"            except (exception.ComputeHostNotFound,"},{"line_number":169,"context_line":"                    exception.HostMappingNotFound):"},{"line_number":170,"context_line":"                # The compute service could be deleted which doesn\u0027t delete"},{"line_number":171,"context_line":"                # the compute node record, that has to be manually removed"},{"line_number":172,"context_line":"                # from the database so we just ignore it when listing nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_c9d7ce23","line":169,"updated":"2017-04-13 15:56:44.000000000","message":"Similar comment to _index above.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea0c676f016006637f3e4657cc138a0eed776be7","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                exception.HostMappingNotFound):"},{"line_number":193,"context_line":"            msg \u003d _(\"Hypervisor with ID \u0027%s\u0027 could not be found.\") % id"},{"line_number":194,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":195,"context_line":"        service \u003d self.host_api.service_get_by_compute_host("},{"line_number":196,"context_line":"            context, hyp.host)"},{"line_number":197,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor("},{"line_number":198,"context_line":"            hyp, service, True, req))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_4e2184b4","line":195,"range":{"start_line":195,"start_character":32,"end_line":195,"end_character":59},"updated":"2017-04-13 15:48:51.000000000","message":"What about this one? I guess we ignore because we assume if it were going to fail here, it would have failed on compute_node_get above?","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cb08fdd80b0dd3ec2c1cb98522f3e851e720e237","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_80408209","line":222,"range":{"start_line":222,"start_character":8,"end_line":222,"end_character":74},"updated":"2017-04-13 12:57:21.000000000","message":"I assume this would already have failed on line 204-210?","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d3b5aa727db1c783ac66a42977fa23013f0e39b","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_89eb06af","line":222,"range":{"start_line":222,"start_character":8,"end_line":222,"end_character":74},"in_reply_to":"9ff52f3f_490f3e2e","updated":"2017-04-13 15:59:10.000000000","message":"\u003e Yeah, but we\u0027re also targeted here because of the call on L189, which means we don\u0027t need to do the lookup again.\n\nI assume you meant L205? And by targeted you just mean we already pulled the compute node from a cell, right? Because compute_node_get doesn\u0027t use context.set_target_cell() which is what I think of when you say \u0027targeted\u0027.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea0c676f016006637f3e4657cc138a0eed776be7","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_490f3e2e","line":222,"range":{"start_line":222,"start_character":8,"end_line":222,"end_character":74},"in_reply_to":"9ff52f3f_80408209","updated":"2017-04-13 15:48:51.000000000","message":"Or get_host_uptime.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7cd691390974fbe9b5898a46597d1a08a41d3cca","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_6e6c4836","line":222,"range":{"start_line":222,"start_character":8,"end_line":222,"end_character":74},"in_reply_to":"9ff52f3f_80408209","updated":"2017-04-13 15:40:33.000000000","message":"Yeah, but we\u0027re also targeted here because of the call on L189, which means we don\u0027t need to do the lookup again.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eff416b309ef3715f4c5babd989e219d412d190d","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_c9cb4e1c","line":222,"range":{"start_line":222,"start_character":8,"end_line":222,"end_character":74},"in_reply_to":"9ff52f3f_89eb06af","updated":"2017-04-13 16:04:01.000000000","message":"Ah, you\u0027re right, because it doesn\u0027t use target_host_cell(). I guess I\u0027ll add something for this one too.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cb08fdd80b0dd3ec2c1cb98522f3e851e720e237","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    def search(self, req, id):"},{"line_number":228,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":229,"context_line":"        context.can(hv_policies.BASE_POLICY_NAME)"},{"line_number":230,"context_line":"        hypervisors \u003d self.host_api.compute_node_search_by_hypervisor("},{"line_number":231,"context_line":"                context, id)"},{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_e0506ed7","line":231,"range":{"start_line":230,"start_character":8,"end_line":231,"end_character":28},"updated":"2017-04-13 12:57:21.000000000","message":"Do we need to handle this?","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7cd691390974fbe9b5898a46597d1a08a41d3cca","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    def search(self, req, id):"},{"line_number":228,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":229,"context_line":"        context.can(hv_policies.BASE_POLICY_NAME)"},{"line_number":230,"context_line":"        hypervisors \u003d self.host_api.compute_node_search_by_hypervisor("},{"line_number":231,"context_line":"                context, id)"},{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_8ed54cbc","line":231,"range":{"start_line":230,"start_character":8,"end_line":231,"end_character":28},"in_reply_to":"9ff52f3f_e0506ed7","updated":"2017-04-13 15:40:33.000000000","message":"No because this does a cell scan, not a lookup of a specific host.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea0c676f016006637f3e4657cc138a0eed776be7","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    def search(self, req, id):"},{"line_number":228,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":229,"context_line":"        context.can(hv_policies.BASE_POLICY_NAME)"},{"line_number":230,"context_line":"        hypervisors \u003d self.host_api.compute_node_search_by_hypervisor("},{"line_number":231,"context_line":"                context, id)"},{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_29351adb","line":231,"range":{"start_line":230,"start_character":8,"end_line":231,"end_character":28},"in_reply_to":"9ff52f3f_e0506ed7","updated":"2017-04-13 15:48:51.000000000","message":"No it\u0027s a regex query in the DB so it\u0027s valid to not find things for this.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cb08fdd80b0dd3ec2c1cb98522f3e851e720e237","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"},{"line_number":235,"context_line":"                                     self.host_api.service_get_by_compute_host("},{"line_number":236,"context_line":"                                         context, hyp.host),"},{"line_number":237,"context_line":"                                     False, req)"},{"line_number":238,"context_line":"                                     for hyp in hypervisors])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_e0e2ae2f","line":235,"range":{"start_line":235,"start_character":37,"end_line":235,"end_character":79},"updated":"2017-04-13 12:57:21.000000000","message":"Ditto","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eff416b309ef3715f4c5babd989e219d412d190d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"},{"line_number":235,"context_line":"                                     self.host_api.service_get_by_compute_host("},{"line_number":236,"context_line":"                                         context, hyp.host),"},{"line_number":237,"context_line":"                                     False, req)"},{"line_number":238,"context_line":"                                     for hyp in hypervisors])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_c9990e20","line":235,"range":{"start_line":235,"start_character":37,"end_line":235,"end_character":79},"in_reply_to":"9ff52f3f_a96feac3","updated":"2017-04-13 16:04:01.000000000","message":"Well the above doesn\u0027t use the host mappings to do the search, so we should catch this one too (and did in my latest).","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea0c676f016006637f3e4657cc138a0eed776be7","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"},{"line_number":235,"context_line":"                                     self.host_api.service_get_by_compute_host("},{"line_number":236,"context_line":"                                         context, hyp.host),"},{"line_number":237,"context_line":"                                     False, req)"},{"line_number":238,"context_line":"                                     for hyp in hypervisors])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_a96feac3","line":235,"range":{"start_line":235,"start_character":37,"end_line":235,"end_character":79},"in_reply_to":"9ff52f3f_e0e2ae2f","updated":"2017-04-13 15:48:51.000000000","message":"I assume this is omitted because if you got the compute nodes above, then you should get them here too.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7cd691390974fbe9b5898a46597d1a08a41d3cca","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if hypervisors:"},{"line_number":233,"context_line":"            return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":234,"context_line":"                                     hyp,"},{"line_number":235,"context_line":"                                     self.host_api.service_get_by_compute_host("},{"line_number":236,"context_line":"                                         context, hyp.host),"},{"line_number":237,"context_line":"                                     False, req)"},{"line_number":238,"context_line":"                                     for hyp in hypervisors])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_aee93081","line":235,"range":{"start_line":235,"start_character":37,"end_line":235,"end_character":79},"in_reply_to":"9ff52f3f_e0e2ae2f","updated":"2017-04-13 15:40:33.000000000","message":"This one does, so yeah, it needs fixing.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b834fe71ffcc69f6f88640033e0a9a2bbf54b40c","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                exception.HostMappingNotFound) as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":223,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor(hyp, service, False, req,"},{"line_number":224,"context_line":"                                                     uptime\u003duptime))"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ff52f3f_fe7a4186","line":222,"range":{"start_line":222,"start_character":32,"end_line":222,"end_character":59},"updated":"2017-04-13 17:34:53.000000000","message":"I guess we have to handle this one too then, based on PS1.","commit_id":"72dda1d6041b0a730329a451395026d237ef3555"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64fc16941222576a9175af7a855ff9a6c1956536","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                        False, req)"},{"line_number":240,"context_line":"                    for hyp in hypervisors])"},{"line_number":241,"context_line":"            except exception.HostMappingNotFound:"},{"line_number":242,"context_line":"                msg \u003d _(\"No hypervisor matching \u0027%s\u0027 could be found.\") % id"},{"line_number":243,"context_line":"                raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":244,"context_line":"        else:"},{"line_number":245,"context_line":"            msg \u003d _(\"No hypervisor matching \u0027%s\u0027 could be found.\") % id"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ff52f3f_e961723b","line":242,"range":{"start_line":242,"start_character":73,"end_line":242,"end_character":75},"updated":"2017-04-13 16:02:17.000000000","message":"hyp.host?","commit_id":"72dda1d6041b0a730329a451395026d237ef3555"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"02e356b47c258e2d31f53bb1686b18e271eccfc5","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                        False, req)"},{"line_number":240,"context_line":"                    for hyp in hypervisors])"},{"line_number":241,"context_line":"            except exception.HostMappingNotFound:"},{"line_number":242,"context_line":"                msg \u003d _(\"No hypervisor matching \u0027%s\u0027 could be found.\") % id"},{"line_number":243,"context_line":"                raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":244,"context_line":"        else:"},{"line_number":245,"context_line":"            msg \u003d _(\"No hypervisor matching \u0027%s\u0027 could be found.\") % id"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ff52f3f_292e3aa5","line":242,"range":{"start_line":242,"start_character":73,"end_line":242,"end_character":75},"in_reply_to":"9ff52f3f_e961723b","updated":"2017-04-13 16:05:04.000000000","message":"Why? You\u0027re doing a search here, not a query for a specific one, so we shouldn\u0027t return the specific one we failed to get right? Either way, referencing the listcomp iteration variable here seems like a bad idea.","commit_id":"72dda1d6041b0a730329a451395026d237ef3555"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"269f6013e134707674161c908eb8bf26e0f984c9","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":244,"context_line":"        else:"},{"line_number":245,"context_line":"            msg \u003d _(\"No hypervisor matching \u0027%s\u0027 could be found.\") % id"},{"line_number":246,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @extensions.expected_errors(404)"},{"line_number":249,"context_line":"    def servers(self, req, id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ff52f3f_04191d78","line":246,"updated":"2017-04-13 16:06:40.000000000","message":"Note I was mirroring this.","commit_id":"72dda1d6041b0a730329a451395026d237ef3555"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"bdc90419e3f84e49bb3f456fda57716bda1c7579","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            hyp \u003d self.host_api.compute_node_get(context, id)"},{"line_number":190,"context_line":"            req.cache_db_compute_node(hyp)"},{"line_number":191,"context_line":"        except (ValueError, exception.ComputeHostNotFound,"},{"line_number":192,"context_line":"                exception.HostMappingNotFound):"},{"line_number":193,"context_line":"            msg \u003d _(\"Hypervisor with ID \u0027%s\u0027 could not be found.\") % id"},{"line_number":194,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":195,"context_line":"        service \u003d self.host_api.service_get_by_compute_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_7288c070","line":192,"updated":"2017-04-13 22:29:59.000000000","message":"I\u0027m not seeing how HostMappingNotFound could be raised by host_api.compute_node_get. And then at L195 it looks like we could miss catching HostMappingNotFound and not raise the proper webob.exc.HTTPNotFound.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"bdc90419e3f84e49bb3f456fda57716bda1c7579","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            msg \u003d _(\"Hypervisor with ID \u0027%s\u0027 could not be found.\") % id"},{"line_number":194,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":195,"context_line":"        service \u003d self.host_api.service_get_by_compute_host("},{"line_number":196,"context_line":"            context, hyp.host)"},{"line_number":197,"context_line":"        return dict(hypervisor\u003dself._view_hypervisor("},{"line_number":198,"context_line":"            hyp, service, True, req))"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_92e8ec16","line":196,"updated":"2017-04-13 22:29:59.000000000","message":"I think we need a try-except around this and raise NotFound.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"bdc90419e3f84e49bb3f456fda57716bda1c7579","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            hyp \u003d self.host_api.compute_node_get(context, id)"},{"line_number":206,"context_line":"            req.cache_db_compute_node(hyp)"},{"line_number":207,"context_line":"        except (ValueError, exception.ComputeHostNotFound,"},{"line_number":208,"context_line":"                exception.HostMappingNotFound):"},{"line_number":209,"context_line":"            msg \u003d _(\"Hypervisor with ID \u0027%s\u0027 could not be found.\") % id"},{"line_number":210,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_32823851","line":208,"updated":"2017-04-13 22:29:59.000000000","message":"Again I\u0027m not seeing how HostMappingNotFound could be raised in this case.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c9d425bf3856cea9914ada58ac3923375ffbe47f","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            common.raise_feature_not_supported()"},{"line_number":219,"context_line":"        except exception.ComputeServiceUnavailable as e:"},{"line_number":220,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":221,"context_line":"        except exception.HostMappingNotFound:"},{"line_number":222,"context_line":"            # NOTE(danms): This mirrors the compute_node_get() behavior"},{"line_number":223,"context_line":"            # where the node is missing, resulting in NotFound instead of"},{"line_number":224,"context_line":"            # BadRequest if we fail on the map lookup."}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_27baf8dd","line":221,"range":{"start_line":221,"start_character":8,"end_line":221,"end_character":45},"updated":"2017-04-13 22:00:45.000000000","message":"Yeah this is a good separation, I didn\u0027t notice that we were raising 400 for this 400 before.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b5ad4d5a44034b7cf3f6a29b997bacdfdc86d5e3","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        hypervisors_list \u003d []"},{"line_number":114,"context_line":"        for hyp in compute_nodes:"},{"line_number":115,"context_line":"            try:"},{"line_number":116,"context_line":"                service \u003d self.host_api.service_get_by_compute_host("},{"line_number":117,"context_line":"                    context, hyp.host)"},{"line_number":118,"context_line":"                hypervisors_list.append("},{"line_number":119,"context_line":"                    self._view_hypervisor("}],"source_content_type":"text/x-python","patch_set":5,"id":"7ffa3b31_6039f83f","line":116,"updated":"2017-04-14 15:02:39.000000000","message":"Crap, so you know what this means...see step 6 in our fresh install setup guide for cells v2:\n\nhttps://docs.openstack.org/developer/nova/cells.html#fresh-install\n\nThat tells you to create the cell, then startup your nova-computes and start polling \"nova hypervisor-list\" until they show up, at which point you can run the discover_hosts command.\n\nBut now listing hypervisors is dependent on having the hosts mapped, which will blow up here if you haven\u0027t run discover_hosts yet. So we have a chicken and egg issue.\n\nI realized this because kolla was broken by our multi-cell in API support patch (the one that caused this bug too), see bug 1682060. I\u0027m working on a release note and noticed the catch-22 in our cells install guide.\n\nI think we can replace \u0027nova hypervisor-list\u0027 with \u0027nova service-list\u0027 in the install guide, because we don\u0027t perform a host mapping check for listing services. And that\u0027s what kolla is using, it\u0027s listing services looking for the compute services to show up:\n\nhttps://github.com/openstack/kolla-ansible/blob/master/ansible/roles/nova/tasks/simple_cell_setup.yml#L30","commit_id":"370820ba52629c9de5046d616a63da904fdaa014"}],"nova/tests/unit/api/openstack/compute/test_hypervisors.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c344ac51d41611740b59d14d91d97c6a50ce2f77","unresolved":false,"context_lines":[{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        @mock.patch.object(self.controller.host_api, \u0027compute_node_get\u0027,"},{"line_number":476,"context_line":"                           fake_service_get_by_compute_host)"},{"line_number":477,"context_line":"        def _test(self):"},{"line_number":478,"context_line":"            req \u003d self._get_request(True)"},{"line_number":479,"context_line":"            self.assertRaises(exc.HTTPNotFound, self.controller.show,"},{"line_number":480,"context_line":"                              req, compute_nodes[1].id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_65d590b9","line":477,"updated":"2017-04-13 12:40:16.000000000","message":"you could have used a contextmanager for that, but meh.","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77567717ba2d19aa9022757dc92f8110296abf0a","unresolved":false,"context_lines":[{"line_number":555,"context_line":"            self.assertRaises(exc.HTTPNotFound,"},{"line_number":556,"context_line":"                              self.controller.uptime, req,"},{"line_number":557,"context_line":"                              self.TEST_HYPERS_OBJ[0].id)"},{"line_number":558,"context_line":"            mock_get.assert_called_once_with(mock.ANY,"},{"line_number":559,"context_line":"                                             self.TEST_HYPERS_OBJ[0].id)"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    def test_uptime_hypervisor_not_mapped(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_884c3b77","line":558,"range":{"start_line":558,"start_character":45,"end_line":558,"end_character":53},"updated":"2017-04-12 23:47:07.000000000","message":"It can be req.environ[\u0027nova.context\u0027].","commit_id":"976590165c7b206d5c1f4254cf1f65989acb99c5"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"bdc90419e3f84e49bb3f456fda57716bda1c7579","unresolved":false,"context_lines":[{"line_number":473,"context_line":"            raise exception.HostMappingNotFound(name\u003dhost)"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        @mock.patch.object(self.controller.host_api, \u0027compute_node_get\u0027,"},{"line_number":476,"context_line":"                           fake_service_get_by_compute_host)"},{"line_number":477,"context_line":"        def _test(self):"},{"line_number":478,"context_line":"            req \u003d self._get_request(True)"},{"line_number":479,"context_line":"            self.assertRaises(exc.HTTPNotFound, self.controller.show,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_7209e0db","line":476,"updated":"2017-04-13 22:29:59.000000000","message":"I don\u0027t understand why this is patching compute_node_get with service_get_by_compute_host (why mismatch?). From what I can tell, compute_node_get can\u0027t raise HostMappingNotFound.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d8d10d4b60a7d43c61db20550c924fd3370035af","unresolved":false,"context_lines":[{"line_number":572,"context_line":"                              self.controller.uptime, req,"},{"line_number":573,"context_line":"                              self.TEST_HYPERS_OBJ[0].id)"},{"line_number":574,"context_line":"            mock_get_uptime.assert_called_once_with("},{"line_number":575,"context_line":"                mock.ANY, self.TEST_HYPERS_OBJ[0].host)"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def test_uptime_hypervisor_not_mapped(self):"},{"line_number":578,"context_line":"        with mock.patch.object(self.controller.host_api, \u0027get_host_uptime\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_ad3149ef","line":575,"updated":"2017-04-13 23:13:20.000000000","message":"I guess technically we should have kept (and renamed) this test and made \u0027service_get_by_compute_host\u0027 raise HostMappingNotFound. The existing test in PS5 only covers \u0027get_host_uptime\u0027 raising HostMappingNotFound.","commit_id":"76da5646aa6db429c090a1fa1ae2febc990710ee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"61da3dbf22cfa43c8bfd6d2e6c676049e87eda33","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            objects.ComputeNode(**TEST_HYPERS[1])"},{"line_number":468,"context_line":"        ])"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        def fake_service_get_by_compute_host(context, host):"},{"line_number":471,"context_line":"            return TEST_SERVICES[0]"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        @mock.patch.object(self.controller.host_api, \u0027compute_node_get\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ffa3b31_52138467","line":470,"range":{"start_line":470,"start_character":12,"end_line":470,"end_character":44},"updated":"2017-04-13 23:13:46.000000000","message":"This name is wrong/misleading but I don\u0027t want to hold this up more.","commit_id":"370820ba52629c9de5046d616a63da904fdaa014"}]}
