)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4975c60c79d049216e4f839426bfbcb8a1a5956b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"behavior with 1 (no retries) and 2 (one retry), just to make sure it is"},{"line_number":14,"context_line":"doing what we expect."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Further, we optimize _get_alternate_hosts() to only re-filter/weigh the"},{"line_number":17,"context_line":"host list if we\u0027re looking for alternates. Now that it\u0027s clear that"},{"line_number":18,"context_line":"num_alts is only nonzero if we are going to look at the host list again"},{"line_number":19,"context_line":"to find those alternates, it can be more clearly (and accurately) used"},{"line_number":20,"context_line":"to optimize out that extra step if we are not getting alternates."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I16ba29385dd2db5467829e6c17fc395096b5cfd3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_11038911","line":20,"range":{"start_line":16,"start_character":0,"end_line":20,"end_character":65},"updated":"2018-05-17 23:04:24.000000000","message":"All this is to say: _get_alternate_hosts() is a terrible name for that method.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e7f44059a7348de64ef2b6904740018071f9024b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"behavior with 1 (no retries) and 2 (one retry), just to make sure it is"},{"line_number":14,"context_line":"doing what we expect."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Further, we optimize _get_alternate_hosts() to only re-filter/weigh the"},{"line_number":17,"context_line":"host list if we\u0027re looking for alternates. Now that it\u0027s clear that"},{"line_number":18,"context_line":"num_alts is only nonzero if we are going to look at the host list again"},{"line_number":19,"context_line":"to find those alternates, it can be more clearly (and accurately) used"},{"line_number":20,"context_line":"to optimize out that extra step if we are not getting alternates."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I16ba29385dd2db5467829e6c17fc395096b5cfd3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_5bd912f2","line":20,"range":{"start_line":16,"start_character":0,"end_line":20,"end_character":65},"in_reply_to":"5f7c97a3_11038911","updated":"2018-05-18 13:06:53.000000000","message":"Not that this is a justification, but the code for this changed so many times during review that at one point the names _get_alternate_hosts() and num_alts were accurate. As I mentioned in IRC, it would make sense to rename them here so that people reading the code in the future aren\u0027t confused by them.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4fbffab022769f913f04d50a140f57bf5bf61aa","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance since the single selected host will get"},{"line_number":337,"context_line":"        # filtered out of the list of alternates below."},{"line_number":338,"context_line":"        if index \u003e 0:"},{"line_number":339,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":340,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":341,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3bf8e47a","line":338,"updated":"2018-05-17 20:47:49.000000000","message":"Shouldn\u0027t we skip re-filtering the hosts if num_alts \u003d\u003d 0?","commit_id":"db9665843fa78f30fabfea4f404639602b6a8685"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23369bcd6731b6068a94a783c3914f528c113021","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance since the single selected host will get"},{"line_number":337,"context_line":"        # filtered out of the list of alternates below."},{"line_number":338,"context_line":"        if index \u003e 0:"},{"line_number":339,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":340,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":341,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_310c8541","line":338,"in_reply_to":"5f7c97a3_3bf8e47a","updated":"2018-05-17 23:03:56.000000000","message":"Yes, and we should skip only in that case I think. index\u003e0 will be true for num_instances\u003d3,max_attempts\u003d1 which means we\u0027ll re-score for no reason I think.","commit_id":"db9665843fa78f30fabfea4f404639602b6a8685"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f4fbffab022769f913f04d50a140f57bf5bf61aa","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            # will have had its resources reduced and will have a much lower"},{"line_number":366,"context_line":"            # chance of being able to fit another instance on it."},{"line_number":367,"context_line":"            for host in hosts:"},{"line_number":368,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":369,"context_line":"                    break"},{"line_number":370,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":371,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5bccc060","line":368,"updated":"2018-05-17 20:47:49.000000000","message":"OK so this method is really more than just returning alternate hosts right, it\u0027s really, return me the selected host + alternates, and when num_alts is 0 because max_attempts\u003d1, then len(selected_plus_alts) \u003d\u003d 1 \u003e\u003d 1 and we\u0027re done.","commit_id":"db9665843fa78f30fabfea4f404639602b6a8685"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2e1598cd0b8ed5f9dc8e0b27668d8df873452ae4","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            # will have had its resources reduced and will have a much lower"},{"line_number":366,"context_line":"            # chance of being able to fit another instance on it."},{"line_number":367,"context_line":"            for host in hosts:"},{"line_number":368,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":369,"context_line":"                    break"},{"line_number":370,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":371,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_91cf99af","line":368,"in_reply_to":"5f7c97a3_5bccc060","updated":"2018-05-17 22:02:15.000000000","message":"Right","commit_id":"db9665843fa78f30fabfea4f404639602b6a8685"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d886682518b4590f1316dcc626502a5691282a55","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance since the single selected host will get"},{"line_number":337,"context_line":"        # filtered out of the list of alternates below."},{"line_number":338,"context_line":"        if index \u003e 0:"},{"line_number":339,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":340,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":341,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_115069d4","line":338,"updated":"2018-05-17 22:05:20.000000000","message":"same question about num_alts being 0 here.","commit_id":"b91804c21b523c11512899b7d8b5672b70508881"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    def _get_alternate_hosts(self, selected_hosts, spec_obj, hosts, index,"},{"line_number":333,"context_line":"                             num_alts, alloc_reqs_by_rp_uuid\u003dNone,"},{"line_number":334,"context_line":"                             allocation_request_version\u003dNone):"},{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance and are going to be picking alternates."},{"line_number":337,"context_line":"        if num_alts \u003e 0:"},{"line_number":338,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":339,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_ccb9e6e9","line":336,"range":{"start_line":335,"start_character":55,"end_line":336,"end_character":32},"updated":"2018-05-18 14:56:36.000000000","message":"The condition below has nothing to do with multi-create now.\n\nI can\u0027t exactly remember right now (would have to dig through the review that added this check) why we need to re-filter only in the case of multi-create.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e5562c895c8e2254faaba7daf83a0473e12f2043","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    def _get_alternate_hosts(self, selected_hosts, spec_obj, hosts, index,"},{"line_number":333,"context_line":"                             num_alts, alloc_reqs_by_rp_uuid\u003dNone,"},{"line_number":334,"context_line":"                             allocation_request_version\u003dNone):"},{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance and are going to be picking alternates."},{"line_number":337,"context_line":"        if num_alts \u003e 0:"},{"line_number":338,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":339,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_6c6bf21e","line":336,"range":{"start_line":335,"start_character":55,"end_line":336,"end_character":32},"in_reply_to":"5f7c97a3_8c79ae30","updated":"2018-05-18 15:07:48.000000000","message":"This was the change that added it:\n\nhttps://review.openstack.org/#/c/513931/\n\nThe idea being, if I\u0027m only scheduling one instance, by the time we get here, we\u0027ve already \"claimed\" resources on the selected host (which is in selected_hosts). The other hosts are the ones we will use to pick alternates. Those hosts have already been filtered/weighed on L189, so there isn\u0027t a point in re-filtering/weighing them for the single instance.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da383497a8e304b89ad5f00f63b2b234eed1cbb5","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    def _get_alternate_hosts(self, selected_hosts, spec_obj, hosts, index,"},{"line_number":333,"context_line":"                             num_alts, alloc_reqs_by_rp_uuid\u003dNone,"},{"line_number":334,"context_line":"                             allocation_request_version\u003dNone):"},{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance and are going to be picking alternates."},{"line_number":337,"context_line":"        if num_alts \u003e 0:"},{"line_number":338,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":339,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8c79ae30","line":336,"range":{"start_line":335,"start_character":55,"end_line":336,"end_character":32},"in_reply_to":"5f7c97a3_ccb9e6e9","updated":"2018-05-18 14:59:50.000000000","message":"I think it was because if we only did one instance, we would pull the first off the list, and didn\u0027t punch a bunch of holes in an otherwise sorted list.\n\nAnd yeah, I forgot to update the comment again after removing the index from the condition once I decided it shouldn\u0027t be required.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88fd180558c611aec0f77f703b04629b90db96ea","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                             allocation_request_version\u003dNone):"},{"line_number":335,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":336,"context_line":"        # more than one instance and are going to be picking alternates."},{"line_number":337,"context_line":"        if num_alts \u003e 0:"},{"line_number":338,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":339,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":340,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e7fddd08","line":337,"updated":"2018-05-18 15:16:10.000000000","message":"I think this needs to be:\n\nif index \u003e 0 and num_alts:\n\nOtherwise you\u0027re reverting https://review.openstack.org/#/c/513931/ and we\u0027ll re-filter/sort the hosts for the single instance and we\u0027ve already filtered/sorted those above. For the instance instance case (index\u003d0) where we want alternates, we just need to select alternates from the pool of already filtered/sorted hosts (hosts variable) in this method.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"026214317373950bf1e3f721bc09dc4215cdc67b","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            # will have had its resources reduced and will have a much lower"},{"line_number":365,"context_line":"            # chance of being able to fit another instance on it."},{"line_number":366,"context_line":"            for host in hosts:"},{"line_number":367,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":368,"context_line":"                    break"},{"line_number":369,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":370,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0ae6dde9","line":367,"range":{"start_line":367,"start_character":43,"end_line":367,"end_character":45},"updated":"2018-05-18 17:24:16.000000000","message":"I think you could have just changed this to:\n\n if len(selected_plus_alts) \u003e num_alts:","commit_id":"5d86aa7edb60ec35fa43c670ae1f0513dc1e9ad5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a559a1c08bc5083bbec1abe648c23d655be470c2","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            # will have had its resources reduced and will have a much lower"},{"line_number":365,"context_line":"            # chance of being able to fit another instance on it."},{"line_number":366,"context_line":"            for host in hosts:"},{"line_number":367,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":368,"context_line":"                    break"},{"line_number":369,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":370,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_2d18937f","line":367,"range":{"start_line":367,"start_character":43,"end_line":367,"end_character":45},"in_reply_to":"5f7c97a3_0ae6dde9","updated":"2018-05-18 18:38:10.000000000","message":"Yep, that\u0027s how I had it initially, but ed did this, which i think is better. \"Alternates + 1\" is what we\u0027re doing in this method. Having alternates include the primary is what got us confused about this in the first place.","commit_id":"5d86aa7edb60ec35fa43c670ae1f0513dc1e9ad5"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c483e4d600f68b527f26dbbabc4605c6653151dd","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def _test_create_server_with_error_with_retries(self):"},{"line_number":158,"context_line":"        # Create a server which will enter error state."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        fake.set_nodes([\u0027host2\u0027])"},{"line_number":162,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":163,"context_line":"        self.flags(host\u003d\u0027host2\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_d13af196","line":160,"range":{"start_line":159,"start_character":0,"end_line":160,"end_character":0},"updated":"2018-05-17 22:04:19.000000000","message":"sweet heaven that\u0027s a lot of whitespace","commit_id":"b91804c21b523c11512899b7d8b5672b70508881"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c483e4d600f68b527f26dbbabc4605c6653151dd","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        found_server \u003d self._wait_for_state_change(found_server, \u0027BUILD\u0027)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        self.assertEqual(\u0027ERROR\u0027, found_server[\u0027status\u0027])"},{"line_number":184,"context_line":"        self._delete_server(created_server_id)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        return len(fails)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9144791d","line":184,"range":{"start_line":184,"start_character":8,"end_line":184,"end_character":46},"updated":"2018-05-17 22:04:19.000000000","message":"Shouldn\u0027t need this, the DB is dropped between test runs.","commit_id":"b91804c21b523c11512899b7d8b5672b70508881"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        fake.set_nodes([\u0027host2\u0027])"},{"line_number":161,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":162,"context_line":"        self.flags(host\u003d\u0027host2\u0027)"},{"line_number":163,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        fails \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8c468e21","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":32},"updated":"2018-05-18 14:56:36.000000000","message":"I don\u0027t think you need to set this, start_service will handle it:\n\nhttps://github.com/openstack/nova/blob/04469a5181b82b09a43bfd401fde6ab13ff80160/nova/test.py#L424","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da383497a8e304b89ad5f00f63b2b234eed1cbb5","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        fake.set_nodes([\u0027host2\u0027])"},{"line_number":161,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":162,"context_line":"        self.flags(host\u003d\u0027host2\u0027)"},{"line_number":163,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        fails \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_cc9c865f","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":32},"in_reply_to":"5f7c97a3_8c468e21","updated":"2018-05-18 14:59:50.000000000","message":"I just copied this from elsewhere, but okay.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e5562c895c8e2254faaba7daf83a0473e12f2043","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        fake.set_nodes([\u0027host2\u0027])"},{"line_number":161,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":162,"context_line":"        self.flags(host\u003d\u0027host2\u0027)"},{"line_number":163,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        fails \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_cc5fa670","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":32},"in_reply_to":"5f7c97a3_cc9c865f","updated":"2018-05-18 15:07:48.000000000","message":"I was just trying to think if this was somehow leaking global state to maybe cause issues with the other test but it sounds like that\u0027s not the problem.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        fake.set_nodes([\u0027host2\u0027])"},{"line_number":161,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":162,"context_line":"        self.flags(host\u003d\u0027host2\u0027)"},{"line_number":163,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        fails \u003d []"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_4c5076d5","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":21},"updated":"2018-05-18 14:56:36.000000000","message":"This variable isn\u0027t needed (not used).","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        fails \u003d []"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def throw_error(*args, **kwargs):"},{"line_number":168,"context_line":"            fails.append(\u0027one\u0027)"},{"line_number":169,"context_line":"            raise test.TestingException(\u0027Please retry me\u0027)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.stub_out(\u0027nova.virt.fake.FakeDriver.spawn\u0027, throw_error)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        server \u003d self._build_minimal_create_server_request()"},{"line_number":174,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_6c72127f","line":171,"range":{"start_line":167,"start_character":8,"end_line":171,"end_character":69},"updated":"2018-05-18 14:56:36.000000000","message":"We could use FakeRescheduleDriver for the compute driver, then you don\u0027t need this. Not sure if it will make a difference. It would also require using your own test class to override how/when the compute services are started.\n\nI guess the test above is similar.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        found_server \u003d self.api.get_server(created_server_id)"},{"line_number":178,"context_line":"        self.assertEqual(created_server_id, found_server[\u0027id\u0027])"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        found_server \u003d self._wait_for_state_change(found_server, \u0027BUILD\u0027)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        self.assertEqual(\u0027ERROR\u0027, found_server[\u0027status\u0027])"},{"line_number":183,"context_line":"        self._delete_server(created_server_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8c1d2e11","line":180,"updated":"2018-05-18 14:56:36.000000000","message":"Seems this could be racy since we\u0027re using the CastAsCall fixture in the base class (_IntegratedTestBase). But again I see this test is copied for the most part from above.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bf6b013b54423f91a5cbc71de7336d29c01e8d","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        found_server \u003d self._wait_for_state_change(found_server, \u0027BUILD\u0027)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        self.assertEqual(\u0027ERROR\u0027, found_server[\u0027status\u0027])"},{"line_number":183,"context_line":"        self._delete_server(created_server_id)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        return len(fails)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_4c1716ef","line":183,"updated":"2018-05-18 14:56:36.000000000","message":"We don\u0027t need this.","commit_id":"ff74ad5e250f6a47d8b71ad20935e73249d72075"}],"nova/tests/unit/scheduler/test_filter_scheduler.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c989478628766b33fd78dadda20c70035d67f92d","unresolved":false,"context_lines":[{"line_number":910,"context_line":"        self._test_alternates_returned(num_instances\u003d1, num_alternates\u003d4)"},{"line_number":911,"context_line":"        self._test_alternates_returned(num_instances\u003d2, num_alternates\u003d3)"},{"line_number":912,"context_line":"        self._test_alternates_returned(num_instances\u003d8, num_alternates\u003d8)"},{"line_number":913,"context_line":"        self._test_alternates_returned(num_instances\u003d2, num_alternates\u003d0)"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"    @mock.patch(\"nova.scheduler.host_manager.HostState.consume_from_request\")"},{"line_number":916,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.claim_resources\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_22c1992f","line":913,"updated":"2018-05-17 18:43:42.000000000","message":"This isn\u0027t any different than the second line in this right?","commit_id":"db9665843fa78f30fabfea4f404639602b6a8685"}]}
