)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b567b21dbb39d02aab2dd58fee649954706a619","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Any enabled placement request filters are processed during scheduling"},{"line_number":10,"context_line":"here:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"https://github.com/openstack/nova/blob/d78055df0e39b53fd481c53429ba77f8c1e1ab09/nova/scheduler/manager.py#L127"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"But then if we\u0027re doing a rebuild, we don\u0027t call placement:"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_8d617e3c","line":12,"range":{"start_line":12,"start_character":39,"end_line":12,"end_character":45},"updated":"2018-05-22 14:18:45.000000000","message":"Just shorten these to d78055 if you\u0027re going to include the references in the commit message.","commit_id":"e82cb17b985988d28ee2cca2d72f48dc1241b556"}],"nova/scheduler/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b567b21dbb39d02aab2dd58fee649954706a619","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                                           filter_properties)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        is_rebuild \u003d utils.request_is_rebuild(spec_obj)"},{"line_number":127,"context_line":"        if not is_rebuild:"},{"line_number":128,"context_line":"            try:"},{"line_number":129,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":130,"context_line":"            except exception.RequestFilterFailed as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_ed4912b7","line":127,"updated":"2018-05-22 14:18:45.000000000","message":"Might be nice to leave a comment here, something like, \"Since we won\u0027t get allocation candidates from Placement below during a rebuild, we don\u0027t need to process the Placement request spec filters.\"","commit_id":"e82cb17b985988d28ee2cca2d72f48dc1241b556"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7aea6fc475dc04e7da0509df8b0b890f88e38fb","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_83362fb4","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"updated":"2018-05-22 15:42:03.000000000","message":"you can move this under the line L138 as we only need to run the filters if the driver uses allocation candidates and it is not a rebuild.","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"eb10f50b441167869e86d90bdd60867faf500a2e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_15281032","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"in_reply_to":"5f7c97a3_83362fb4","updated":"2018-05-23 01:23:58.000000000","message":"Hmm, that makes sense to me","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2538a32d87e69c47f5468aee8011b92597adbecf","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b0e12a2d","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"in_reply_to":"5f7c97a3_83362fb4","updated":"2018-05-23 02:53:38.000000000","message":"Thinking again, I\u0027m not sure about the allocation_candidates part, it seems the filters could still work if we are not using allocation_candidates","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"6765dd823cee19e0f8090507a21e86cf1be55713","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_adc54c90","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"in_reply_to":"5f7c97a3_83362fb4","updated":"2018-05-23 09:57:16.000000000","message":"if the driver does not use allocation candidates, don\u0027t we still run the request_filter? if so, it looks good to me the way it is","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c45bd6a34c945f9df94791b0311853ff425b3676","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_be21f44f","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"in_reply_to":"5f7c97a3_adc54c90","updated":"2018-05-23 14:13:07.000000000","message":"The only other scheduler driver that we care about besides FilterScheduler is CachingScheduler and that doesn\u0027t use placement, so USE_ALLOCATION_CANDIDATES is False for the CachingScheduler, and that means that yes we are unnecessarily doing the placement request spec filtering just to throw it away. So I agree with gibi that rather than move the is_rebuild check, we can just move the request_filter.process_reqspec block into the conditional below. Make sure you update the commit message accordingly.","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"99474e45817c5e878b91e350f69154b068f16837","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # If we\u0027re doing a rebuild, we don\u0027t call Placement below so we"},{"line_number":128,"context_line":"        # don\u0027t need to process the Placement request spec filters here."},{"line_number":129,"context_line":"        if not is_rebuild:"},{"line_number":130,"context_line":"            try:"},{"line_number":131,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":132,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":133,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":136,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries, allocation_request_version \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_7854cb21","line":133,"range":{"start_line":130,"start_character":1,"end_line":133,"end_character":61},"in_reply_to":"5f7c97a3_be21f44f","updated":"2018-05-24 01:34:30.000000000","message":"Thanks for the clearification, looks like I missunderstood this parameter, I should have checked it more, I thought this was a conf and people can set, clearly I\u0027m wrong.","commit_id":"4c6a697f8badf129039e470ae393c533b18ef7b1"}],"nova/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"2b84084e23b4ee0e5fc30e62c187226a8cf5aef3","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":233,"context_line":"                \u0027get_allocation_candidates\u0027)"},{"line_number":234,"context_line":"    def test_select_destination_is_rebuild(self, mock_get_ac, mock_rfrs,"},{"line_number":235,"context_line":"                                           mock_process):"},{"line_number":236,"context_line":"        fake_spec \u003d objects.RequestSpec("},{"line_number":237,"context_line":"            scheduler_hints\u003d{\u0027_nova_check_type\u0027: [\u0027rebuild\u0027]})"},{"line_number":238,"context_line":"        fake_spec.instance_uuid \u003d uuids.instance"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_dbecf490","line":235,"range":{"start_line":235,"start_character":43,"end_line":235,"end_character":55},"updated":"2018-05-24 11:41:05.000000000","message":"IMO, something like mock_process_rs would be more self-explanatory and easier to read","commit_id":"a80b17dfdcefaeec7bf4b34f8d029301f2f6167b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3a3abaf43ad79ca1d445193ebe550fd06f4a27a1","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                [fake_spec.instance_uuid], None, None, None, False)"},{"line_number":246,"context_line":"            mock_get_ac.assert_not_called()"},{"line_number":247,"context_line":"            mock_process.assert_not_called()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"},{"line_number":250,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":251,"context_line":"                \u0027get_allocation_candidates\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_ee7355e7","line":248,"updated":"2018-06-19 08:36:05.000000000","message":"nit: You could add one more test case where self.driver.USES_ALLOCATION_CANDIDATES are False (e.g. where the ChanceScheduler is the driver)","commit_id":"036fb56ab3779ebb37804487aecbfaa69e764b3b"}]}
