)]}'
{"nova/scheduler/manager.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e4ffccd166e16ac2eb72f0a540ca1ef5c4b30326","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                          \"API. This may be a temporary occurrence as compute \""},{"line_number":135,"context_line":"                          \"nodes start up and begin reporting inventory to \""},{"line_number":136,"context_line":"                          \"the Placement service.\")"},{"line_number":137,"context_line":"                raise exception.NoValidHost(reason\u003d_(\"No valid host found\"))"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                # Build a dict of lists of allocation requests, keyed by"},{"line_number":140,"context_line":"                # provider UUID, so that when we attempt to claim resources for"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf3e73b7_b29dfc5a","line":137,"updated":"2017-08-07 13:39:10.000000000","message":"This \"reason\" repeats the original message of the exception, can we just leave it off:\n\n    class NoValidHost(NovaException):\n        msg_fmt \u003d _(\"No valid host was found. %(reason)s\")","commit_id":"a7957b1c0926a45ba6e697888fb942d408741b76"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3de731ea95b4867626ff12872512c2a3cf4c9ea2","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                          \"API. This may be a temporary occurrence as compute \""},{"line_number":135,"context_line":"                          \"nodes start up and begin reporting inventory to \""},{"line_number":136,"context_line":"                          \"the Placement service.\")"},{"line_number":137,"context_line":"                raise exception.NoValidHost(reason\u003d_(\"No valid host found\"))"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                # Build a dict of lists of allocation requests, keyed by"},{"line_number":140,"context_line":"                # provider UUID, so that when we attempt to claim resources for"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf3e73b7_f22f04f4","line":137,"in_reply_to":"bf3e73b7_b29dfc5a","updated":"2017-08-07 13:42:51.000000000","message":"Done","commit_id":"a7957b1c0926a45ba6e697888fb942d408741b76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b69a0ecf5a660681cd7a0cc0a2399c26b811aa3e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                          \"the Placement service.\")"},{"line_number":137,"context_line":"                # TODO(jaypipes): Setting provider_summaries to None triggers"},{"line_number":138,"context_line":"                # the scheduler to load all compute nodes to do scheduling \"the"},{"line_number":139,"context_line":"                # old way\".  Really, we should raise NoValidHosts here, but all"},{"line_number":140,"context_line":"                # functional tests will fall over if we do that without"},{"line_number":141,"context_line":"                # changing the PlacementFixture to load compute node inventory"},{"line_number":142,"context_line":"                # into the placement database before starting functional tests."},{"line_number":143,"context_line":"                provider_summaries \u003d None"},{"line_number":144,"context_line":"            else:"},{"line_number":145,"context_line":"                # Build a dict of lists of allocation requests, keyed by"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_d23bccce","side":"PARENT","line":142,"range":{"start_line":139,"start_character":72,"end_line":142,"end_character":79},"updated":"2017-08-09 15:24:41.000000000","message":"So I guess this isn\u0027t actually a problem?","commit_id":"13f52d443ed2a5154c9b10ee19ea5aed8205e37b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"468c7b0bd681c4adbe4d49250371abaacc254f84","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                alloc_reqs, provider_summaries \u003d None, None"},{"line_number":130,"context_line":"            else:"},{"line_number":131,"context_line":"                alloc_reqs, provider_summaries \u003d res"},{"line_number":132,"context_line":"            if not alloc_reqs:"},{"line_number":133,"context_line":"                LOG.debug(\"Got no allocation candidates from the Placement \""},{"line_number":134,"context_line":"                          \"API. This may be a temporary occurrence as compute \""},{"line_number":135,"context_line":"                          \"nodes start up and begin reporting inventory to \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_7a919299","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":30},"updated":"2017-08-09 18:35:44.000000000","message":"This can also happen if Placement 1.10 isn\u0027t available, which is what self.placement_client.get_allocation_candidates(resources) is requesting.\n\nAnd we only check for 1.4 as the minimum in nova-status:\n\nhttps://github.com/openstack/nova/blob/master/nova/cmd/status.py#L208","commit_id":"6b0ab40e4233a480c9bdcca657f594d7e90fadc8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec23ae3b5f931e44588da7789b25265c27b169f4","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                alloc_reqs, provider_summaries \u003d None, None"},{"line_number":130,"context_line":"            else:"},{"line_number":131,"context_line":"                alloc_reqs, provider_summaries \u003d res"},{"line_number":132,"context_line":"            if not alloc_reqs:"},{"line_number":133,"context_line":"                LOG.debug(\"Got no allocation candidates from the Placement \""},{"line_number":134,"context_line":"                          \"API. This may be a temporary occurrence as compute \""},{"line_number":135,"context_line":"                          \"nodes start up and begin reporting inventory to \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_15c13955","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":30},"in_reply_to":"9f436f4f_7a919299","updated":"2017-08-09 19:26:26.000000000","message":"https://review.openstack.org/#/c/492234/","commit_id":"6b0ab40e4233a480c9bdcca657f594d7e90fadc8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b69a0ecf5a660681cd7a0cc0a2399c26b811aa3e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                          \"nodes start up and begin reporting inventory to \""},{"line_number":136,"context_line":"                          \"the Placement service.\")"},{"line_number":137,"context_line":"                raise exception.NoValidHost(reason\u003d\"\")"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                # Build a dict of lists of allocation requests, keyed by"},{"line_number":140,"context_line":"                # provider UUID, so that when we attempt to claim resources for"},{"line_number":141,"context_line":"                # a host, we can grab an allocation request easily"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_d2406c38","line":138,"updated":"2017-08-09 15:24:41.000000000","message":"nit: you could remove this else and shift everything in there left.","commit_id":"6b0ab40e4233a480c9bdcca657f594d7e90fadc8"}],"nova/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fc015c2de1c7acc053f716c5597882b639bf2423","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":150,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":151,"context_line":"                \u0027get_allocation_candidates\u0027, return_value\u003dNone)"},{"line_number":152,"context_line":"    def test_select_destination_placement_connect_fails("},{"line_number":153,"context_line":"            self, mock_get_ac, mock_rfrs):"},{"line_number":154,"context_line":"        \"\"\"Tests that we will pass None for the provider_summaries parameter to"},{"line_number":155,"context_line":"        the scheduler driver select_destinations() method when the scheduler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_e4c76045","line":152,"updated":"2017-08-08 07:45:49.000000000","message":"I\u0027m not 100% sure that this is what we want. I definitely want the new behavior in test_select_destination_no_candidates test but might not in here and in test_select_destination_old_placement test","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b8f875e8d4014b36b8b355b60c3ed41317017b9d","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":150,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":151,"context_line":"                \u0027get_allocation_candidates\u0027, return_value\u003dNone)"},{"line_number":152,"context_line":"    def test_select_destination_placement_connect_fails("},{"line_number":153,"context_line":"            self, mock_get_ac, mock_rfrs):"},{"line_number":154,"context_line":"        \"\"\"Tests that we will pass None for the provider_summaries parameter to"},{"line_number":155,"context_line":"        the scheduler driver select_destinations() method when the scheduler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_2e5e62e6","line":152,"in_reply_to":"9f436f4f_1b887ec4","updated":"2017-08-08 09:29:51.000000000","message":"TBC I explained that when I wrote the implementation for the scheduler calling GET /resource_providers, we didn\u0027t really separated behaviours between a possible connection issue or no RPs found, we rather just returned NoValidHosts in all ways : \n\nhttps://github.com/openstack/nova/blob/stable/ocata/nova/scheduler/filter_scheduler.py#L184-L189","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"39171a71f6cd1abed3173af881bc4ff92974fb71","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":150,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":151,"context_line":"                \u0027get_allocation_candidates\u0027, return_value\u003dNone)"},{"line_number":152,"context_line":"    def test_select_destination_placement_connect_fails("},{"line_number":153,"context_line":"            self, mock_get_ac, mock_rfrs):"},{"line_number":154,"context_line":"        \"\"\"Tests that we will pass None for the provider_summaries parameter to"},{"line_number":155,"context_line":"        the scheduler driver select_destinations() method when the scheduler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_1b887ec4","line":152,"in_reply_to":"9f436f4f_b803b80f","updated":"2017-08-08 09:14:24.000000000","message":"Sylvain convinced me on IRC that we can be strict and raise NoValidHost in all three cases","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9dae2734003c9017575819a729bf48279597208a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":150,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":151,"context_line":"                \u0027get_allocation_candidates\u0027, return_value\u003dNone)"},{"line_number":152,"context_line":"    def test_select_destination_placement_connect_fails("},{"line_number":153,"context_line":"            self, mock_get_ac, mock_rfrs):"},{"line_number":154,"context_line":"        \"\"\"Tests that we will pass None for the provider_summaries parameter to"},{"line_number":155,"context_line":"        the scheduler driver select_destinations() method when the scheduler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_b803b80f","line":152,"in_reply_to":"9f436f4f_e4c76045","updated":"2017-08-08 08:39:45.000000000","message":"in the other hand if CoreFilter, RamFilter and DiskFilter are not turned on then the only reasonable thing is to fail the scheduling if the placement API is not available.","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b8f875e8d4014b36b8b355b60c3ed41317017b9d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                    self.manager.select_destinations, None, spec_obj\u003dfake_spec,"},{"line_number":189,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":190,"context_line":"            select_destinations.assert_not_called()"},{"line_number":191,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":194,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_4e276666","line":191,"updated":"2017-08-08 09:29:51.000000000","message":"yup, all those 3 tests should potentially have the same behaviour so we could just make it clear and have the same test method for both.","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"065bfe8d85c91cc44716f1b71c6781b465e4d031","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                    self.manager.select_destinations, None, spec_obj\u003dfake_spec,"},{"line_number":189,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":190,"context_line":"            select_destinations.assert_not_called()"},{"line_number":191,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":194,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_425e17e7","line":191,"in_reply_to":"9f436f4f_4e276666","updated":"2017-08-08 12:01:33.000000000","message":"Done","commit_id":"6ff5f96ea02cb156866ca201bcf6f6a33ec869a3"}]}
