)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"45193754e656f0b2afe48ab0b1f532e95c92546e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This changes the RPC call for select_destinations(). It adds a parameter"},{"line_number":10,"context_line":"that I\u0027ve named `modern_flag` because I can\u0027t think of a good name for"},{"line_number":11,"context_line":"it, and didn\u0027t want to bikeshed on this. When a better name is agreed"},{"line_number":12,"context_line":"to, I\u0027ll do a search/replace on it."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When this flag is True, the scheduler will return lists of lists of"},{"line_number":15,"context_line":"Selection objects, representing the selected host and zero or more"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f4e5783_4bd9cc54","line":12,"updated":"2017-10-17 12:20:28.000000000","message":"You did it, go you, but you didn\u0027t update here.","commit_id":"1f0b79797f04b33add38a3137839f7ae0354011d"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"25b7e8f74868eb4444946b46908f4e1d9823dceb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This changes the RPC call for select_destinations(). It adds a parameter"},{"line_number":10,"context_line":"that I\u0027ve named `modern_flag` because I can\u0027t think of a good name for"},{"line_number":11,"context_line":"it, and didn\u0027t want to bikeshed on this. When a better name is agreed"},{"line_number":12,"context_line":"to, I\u0027ll do a search/replace on it."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When this flag is True, the scheduler will return lists of lists of"},{"line_number":15,"context_line":"Selection objects, representing the selected host and zero or more"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f4e5783_df8fb527","line":12,"in_reply_to":"5f4e5783_4bd9cc54","updated":"2017-10-17 14:48:52.000000000","message":"Done","commit_id":"1f0b79797f04b33add38a3137839f7ae0354011d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This changes select_destinations() on the scheduler side to optionally"},{"line_number":10,"context_line":"return Selection objects and alternates. The RPC signature doesn\u0027t"},{"line_number":11,"context_line":"change in this patch, though, so everything on the conductor side"},{"line_number":12,"context_line":"remains unchanged. The next patch in the series will make the actuall"},{"line_number":13,"context_line":"RPC change."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Blueprint: return-alternate-hosts"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1f485f77_c21910d7","line":12,"range":{"start_line":12,"start_character":62,"end_line":12,"end_character":69},"updated":"2017-11-19 16:08:28.000000000","message":"actual","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"}],"nova/conductor/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"45fedcf788ddf7c7985b5d933e462346e5d26155","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":625,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":626,"context_line":"        # Passing modern_flag\u003dFalse to preserve existing behavior. The next"},{"line_number":627,"context_line":"        # patch will flip the switch to receive the new format."},{"line_number":628,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":629,"context_line":"                request_spec, instance_uuids, modern_flag\u003dTrue)"},{"line_number":630,"context_line":"        return host_lists"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_9a0e5830","line":627,"updated":"2017-10-17 17:38:52.000000000","message":"This is out-dated now I guess? You\u0027re already passing \u003dTrue.","commit_id":"a810c2da76e16094bad73d201eea7b3604c50e01"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"542547b53cb2293985d1f63e0a61eae9781b0576","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":625,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":626,"context_line":"        # Passing modern_flag\u003dFalse to preserve existing behavior. The next"},{"line_number":627,"context_line":"        # patch will flip the switch to receive the new format."},{"line_number":628,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":629,"context_line":"                request_spec, instance_uuids, modern_flag\u003dTrue)"},{"line_number":630,"context_line":"        return host_lists"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_8339dfd7","line":627,"in_reply_to":"5f4e5783_9a0e5830","updated":"2017-10-17 22:34:30.000000000","message":"Done","commit_id":"a810c2da76e16094bad73d201eea7b3604c50e01"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"45fedcf788ddf7c7985b5d933e462346e5d26155","unresolved":false,"context_lines":[{"line_number":623,"context_line":"    def _schedule_instances(self, context, request_spec,"},{"line_number":624,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":625,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":626,"context_line":"        # Passing return_alternates\u003dFalse to preserve existing behavior. The"},{"line_number":627,"context_line":"        # next patch will flip the switch to receive the new format."},{"line_number":628,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":629,"context_line":"                request_spec, instance_uuids, return_alternates\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_97cec157","line":626,"range":{"start_line":626,"start_character":18,"end_line":626,"end_character":41},"updated":"2017-10-17 17:38:52.000000000","message":"This is still inverted from what you\u0027re doing below. You\u0027re already passing True for this.","commit_id":"45898661445009c205e78f260ec920b29a311a6a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"542547b53cb2293985d1f63e0a61eae9781b0576","unresolved":false,"context_lines":[{"line_number":623,"context_line":"    def _schedule_instances(self, context, request_spec,"},{"line_number":624,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":625,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":626,"context_line":"        # Passing return_alternates\u003dFalse to preserve existing behavior. The"},{"line_number":627,"context_line":"        # next patch will flip the switch to receive the new format."},{"line_number":628,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":629,"context_line":"                request_spec, instance_uuids, return_alternates\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_4ac3f389","line":626,"range":{"start_line":626,"start_character":18,"end_line":626,"end_character":41},"in_reply_to":"5f4e5783_97cec157","updated":"2017-10-17 22:34:30.000000000","message":"Done","commit_id":"45898661445009c205e78f260ec920b29a311a6a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47ee798a028c7d0845119aa8afc6e373547137f8","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":625,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":626,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":627,"context_line":"                request_spec, instance_uuids, return_alternates\u003dTrue)"},{"line_number":628,"context_line":"        return host_lists"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"    @targets_cell"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_587ccdea","line":627,"range":{"start_line":627,"start_character":46,"end_line":627,"end_character":68},"updated":"2017-10-27 18:18:24.000000000","message":"This won\u0027t be true for evacuate - in the case of evacuate, there are no reschedules, so we don\u0027t care about finding alternates. Let\u0027s avoid the wasted time in the scheduler if we aren\u0027t going to use the alternates.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cbc0fbe95911689325e221b9d58ce0ab8f9eafd6","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":622,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":623,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":624,"context_line":"                request_spec, instance_uuids, return_alternates\u003dTrue)"},{"line_number":625,"context_line":"        return host_lists"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    @targets_cell"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f4b6375_b84d01c6","line":624,"range":{"start_line":624,"start_character":46,"end_line":624,"end_character":68},"updated":"2017-10-27 18:20:30.000000000","message":"This is wrong for evacuate, see PS8.","commit_id":"b60769f00d7182a04823d63ee2e14ad76ef5f4b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0a3c6a9664553ba735e943168a922d17b211fd7b","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                            instance_uuids\u003dNone):"},{"line_number":622,"context_line":"        scheduler_utils.setup_instance_group(context, request_spec)"},{"line_number":623,"context_line":"        host_lists \u003d self.scheduler_client.select_destinations(context,"},{"line_number":624,"context_line":"                request_spec, instance_uuids, return_alternates\u003dTrue)"},{"line_number":625,"context_line":"        return host_lists"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    @targets_cell"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f4b6375_98f8054a","line":624,"range":{"start_line":624,"start_character":46,"end_line":624,"end_character":68},"in_reply_to":"3f4b6375_b84d01c6","updated":"2017-10-27 18:22:03.000000000","message":"Oh and unshelve - we don\u0027t do reschedules for unshelve.","commit_id":"b60769f00d7182a04823d63ee2e14ad76ef5f4b5"}],"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"84065fad56c9c4c244e38c810e5d8d4d61f8a85e","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            try:"},{"line_number":291,"context_line":"                selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":292,"context_line":"                        self.context, request_spec, [self.instance.uuid],"},{"line_number":293,"context_line":"                        return_alternates\u003dTrue)"},{"line_number":294,"context_line":"                selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":295,"context_line":"                selection \u003d selections[0]"},{"line_number":296,"context_line":"                host \u003d selection.service_host"},{"line_number":297,"context_line":"            except messaging.RemoteError as ex:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_aa7ecbac","line":294,"range":{"start_line":293,"start_character":24,"end_line":294,"end_character":79},"updated":"2017-10-27 17:10:34.000000000","message":"maybe I\u0027m missing something, but would it be more effective to just call return_alternates\u003dFalse and not have to do the call to scheduler_utils.remove_alternates()?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47ee798a028c7d0845119aa8afc6e373547137f8","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            try:"},{"line_number":291,"context_line":"                selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":292,"context_line":"                        self.context, request_spec, [self.instance.uuid],"},{"line_number":293,"context_line":"                        return_alternates\u003dTrue)"},{"line_number":294,"context_line":"                selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":295,"context_line":"                selection \u003d selections[0]"},{"line_number":296,"context_line":"                host \u003d selection.service_host"},{"line_number":297,"context_line":"            except messaging.RemoteError as ex:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_b81f41b6","line":294,"range":{"start_line":293,"start_character":24,"end_line":294,"end_character":79},"in_reply_to":"3f4b6375_aa7ecbac","updated":"2017-10-27 18:18:24.000000000","message":"We want alternates here - we\u0027re in a reschedule loop within this task, see _check_not_over_max_retries.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cbc0fbe95911689325e221b9d58ce0ab8f9eafd6","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        host \u003d None"},{"line_number":287,"context_line":"        while host is None:"},{"line_number":288,"context_line":"            self._check_not_over_max_retries(attempted_hosts)"},{"line_number":289,"context_line":"            request_spec.ignore_hosts \u003d attempted_hosts"},{"line_number":290,"context_line":"            try:"},{"line_number":291,"context_line":"                selection_lists \u003d self.scheduler_client.select_destinations("}],"source_content_type":"text/x-python","patch_set":16,"id":"3f4b6375_18d415bd","line":288,"range":{"start_line":288,"start_character":17,"end_line":288,"end_character":44},"updated":"2017-10-27 18:20:30.000000000","message":"We do the reschedule within this task, so we should re-use the alternates and not call the scheduler again, otherwise don\u0027t pass return_alternates\u003dTrue and this code doesn\u0027t need to change.","commit_id":"b60769f00d7182a04823d63ee2e14ad76ef5f4b5"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1954fcf8891619567beaed86fb309e3e774c5f96","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_b094e6e9","line":99,"updated":"2017-10-18 19:27:55.000000000","message":"So, you asked for \"alternates\u003dTrue\" above and then throw them away immediately.\n\nThis makes me think that since we\u0027re doing an RPC change here maybe:\n\n 1. Have a flag for \"give me selections not host blobs\"\n 2. Have a flag for \"go to the trouble of giving me alternates\"\n\nThoughts?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d958a2c620030fcdfed90639606af261f5245974","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_7dbc0669","line":99,"in_reply_to":"3f4b6375_0bd70fc2","updated":"2017-10-18 21:06:12.000000000","message":"There would still only be two cases. Either you\u0027re making the call at 4.4 and get both of the new behaviors, or 4.3 and you get none. Having another flag is only about returning less over RPC if you don\u0027t need it.\n\nImagine if I have my retries set really high, like 20. That means each time I want to migrate something, I dig up and return 21 structures only to throw away all but one.\n\nIf we don\u0027t put the flag on the RPC api, then we can\u0027t optimize placement later because the scheduler won\u0027t know if you need alternates or not. Then we would need yet another RPC version, and then we _would_ have four cases :)","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47ee798a028c7d0845119aa8afc6e373547137f8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_f825b90b","line":99,"in_reply_to":"3f4b6375_2f0bd78e","updated":"2017-10-27 18:18:24.000000000","message":"Umm, this is wrong anyway - we need to pass alternates to prep_resize because resize/cold migrate does a reschedule loop if the chosen dest host fails:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4012\n\nThe ONLY place we call the scheduler and don\u0027t care about alternates, because we don\u0027t do reschedules, is evacuate:\n\nhttps://github.com/openstack/nova/blob/master/nova/conductor/manager.py#L844\n\nEvacuate doesn\u0027t do reschedules. Initial server create does, resize/cold migrate does, and live migrate does (via the conductor):\n\nhttps://github.com/openstack/nova/blob/master/nova/conductor/tasks/live_migrate.py#L288\n\nSo in this case, we shouldn\u0027t be throwing away alternates.\n\nKeep in mind that if the user specifies a host, like in live migrate or evacuate (or soon to be cold migrate if Takashi\u0027s changes ever get merged), we shouldn\u0027t do the work of returning alternates if the request_spec has a requested_destination set - since we don\u0027t want alternates in that case either.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cb44a246d537fcd5f5c7c6d41bd68f2055e28795","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_2f0bd78e","line":99,"in_reply_to":"3f4b6375_7dbc0669","updated":"2017-10-19 20:09:42.000000000","message":"My original design (back in https://review.openstack.org/#/c/465767/) was to pass the number of hosts to be returned per instance explicitly. That was shot down, by Matt, IIRC, as unnecessary complexity; just use the max_attempts config option and be done with it. Now it seems we\u0027re coming full circle.\n\nIt\u0027s also odd to think that someone would configure their cloud to require 21 hosts to satisfy a single instance. If they do that, then they\u0027re unconcerned with passing around that much data.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b789317c7564bdd3be6e27c40f6d3548622066d2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_0bd70fc2","line":99,"in_reply_to":"3f4b6375_b094e6e9","updated":"2017-10-18 20:19:39.000000000","message":"There are two changes with the flag. The first is whether you get a single item back per instance or a list that contains zero or more alternates. The second is that you get Selection objects instead of dicts. That was the reason I waffled on naming that flag.\n\nIn this case, we want a selection object, not dicts, so we need to set the flag to True. We don\u0027t want the alternates, though, since migrations do not use the same retry path as instance creation does.\n\nSo yes, we could add *two* flags, but that will mean that there are now *4* possible combinations for the RPC call. We\u0027d have to add supporting code to handle all 4 cases instead of just two, and also add the testing code to verify that all 4 combinations work as expected. IMO that\u0027s much, much less maintainable than this approach.\n\nWhen I wrote this code, I wasn\u0027t sure if there would be other places where it would be necessary to remove the alternates, so I put it in scheduler.utils. Since there was only one other case, I\u0027d prefer to just move the one-liner here.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cdbf0d40dee4bd0e07b66ca5ca627f8f0154632","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        selection_lists \u003d self.scheduler_client.select_destinations("},{"line_number":97,"context_line":"                self.context, self.request_spec, [self.instance.uuid],"},{"line_number":98,"context_line":"                return_alternates\u003dTrue)"},{"line_number":99,"context_line":"        selections \u003d scheduler_utils.remove_alternates(selection_lists)"},{"line_number":100,"context_line":"        selection \u003d selections[0]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props, selection)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_38123164","line":99,"in_reply_to":"3f4b6375_f825b90b","updated":"2017-10-27 18:28:06.000000000","message":"\u003e Keep in mind that if the user specifies a host, like in live migrate or evacuate (or soon to be cold migrate if Takashi\u0027s changes ever get merged), we shouldn\u0027t do the work of returning alternates if the request_spec has a requested_destination set - since we don\u0027t want alternates in that case either.\n\nActually the scheduler will take care of this for us:\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L563\n\nSo that it will whittle the hosts before calling the filters, so we\u0027d effectively have no alternates to return anyway.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cbc0fbe95911689325e221b9d58ce0ab8f9eafd6","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        legacy_spec \u003d jsonutils.loads(jsonutils.dumps(legacy_spec))"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        # RPC cast to the destination host to start the migration process."},{"line_number":254,"context_line":"        self.compute_rpcapi.prep_resize("},{"line_number":255,"context_line":"            self.context, self.instance, legacy_spec[\u0027image\u0027],"},{"line_number":256,"context_line":"            self.flavor, host, migration, self.reservations,"},{"line_number":257,"context_line":"            request_spec\u003dlegacy_spec, filter_properties\u003dlegacy_props,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f4b6375_78ee698c","line":254,"range":{"start_line":254,"start_character":28,"end_line":254,"end_character":39},"updated":"2017-10-27 18:20:30.000000000","message":"The alternates need to go to the compute just like on initial server create because there is a reschedule loop for cold migrate / resize - see PS8.","commit_id":"b60769f00d7182a04823d63ee2e14ad76ef5f4b5"}],"nova/scheduler/chance.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1954fcf8891619567beaed86fb309e3e774c5f96","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":100,"context_line":"        \"\"\"Selects random destinations.\"\"\""},{"line_number":101,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":102,"context_line":"        # Returns a list of list of Selection objects."},{"line_number":103,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":104,"context_line":"        # and limiting the destination scope to a single requested cell"},{"line_number":105,"context_line":"        host_selections \u003d self._schedule(context, compute_rpcapi.RPC_TOPIC,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_50a37250","line":102,"updated":"2017-10-18 19:27:55.000000000","message":"It actually returns a list of (primary, secondaries) right?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b789317c7564bdd3be6e27c40f6d3548622066d2","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":100,"context_line":"        \"\"\"Selects random destinations.\"\"\""},{"line_number":101,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":102,"context_line":"        # Returns a list of list of Selection objects."},{"line_number":103,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":104,"context_line":"        # and limiting the destination scope to a single requested cell"},{"line_number":105,"context_line":"        host_selections \u003d self._schedule(context, compute_rpcapi.RPC_TOPIC,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_eb583357","line":102,"in_reply_to":"3f4b6375_50a37250","updated":"2017-10-18 20:19:39.000000000","message":"No, it returns a list (one per instance) of lists of Selection objects, with each inner list being [selected, alt1, ..., altN].","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d958a2c620030fcdfed90639606af261f5245974","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":100,"context_line":"        \"\"\"Selects random destinations.\"\"\""},{"line_number":101,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":102,"context_line":"        # Returns a list of list of Selection objects."},{"line_number":103,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":104,"context_line":"        # and limiting the destination scope to a single requested cell"},{"line_number":105,"context_line":"        host_selections \u003d self._schedule(context, compute_rpcapi.RPC_TOPIC,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_bd1efe6d","line":102,"in_reply_to":"3f4b6375_eb583357","updated":"2017-10-18 21:06:12.000000000","message":"That\u0027s what I meant, but I had missed \"list of list\" and collapsed that to one. This should be \"list of lists\" then right?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        if return_alternates:"},{"line_number":92,"context_line":"            alts_per_instance \u003d min(len(hosts), CONF.scheduler.max_attempts)"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            alts_per_instance \u003d 0"},{"line_number":95,"context_line":"        for sel_host in selected_hosts:"},{"line_number":96,"context_line":"            selection \u003d objects.Selection.from_host_state(sel_host)"},{"line_number":97,"context_line":"            sel_plus_alts \u003d [selection]"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_657b0c8c","line":94,"updated":"2017-12-04 18:10:44.000000000","message":"I don\u0027t think you have a unit test for this do you?","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        if return_alternates:"},{"line_number":92,"context_line":"            alts_per_instance \u003d min(len(hosts), CONF.scheduler.max_attempts)"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            alts_per_instance \u003d 0"},{"line_number":95,"context_line":"        for sel_host in selected_hosts:"},{"line_number":96,"context_line":"            selection \u003d objects.Selection.from_host_state(sel_host)"},{"line_number":97,"context_line":"            sel_plus_alts \u003d [selection]"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_c0c52690","line":94,"in_reply_to":"df87a7cf_657b0c8c","updated":"2017-12-04 18:46:04.000000000","message":"Added in a follow-up patch","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"}],"nova/scheduler/client/query.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9a7633b4ad7bcb873bbf77010ba4b1615b77856a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        \"\"\"Returns destinations(s) best suited for this request_spec and"},{"line_number":28,"context_line":"        filter_properties."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        When modern_flag is False, the result should be a list of dicts with"},{"line_number":31,"context_line":"        \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        When modern_flag is True, the result should be a list of lists of"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_b056d55b","line":30,"range":{"start_line":30,"start_character":13,"end_line":30,"end_character":24},"updated":"2017-10-12 21:27:28.000000000","message":"Please suggest some better names for this. I had to name it something, so this is just a placeholder name for now.","commit_id":"ee0d277163c72adc339aded270dbe2878be337c4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"84065fad56c9c4c244e38c810e5d8d4d61f8a85e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        zero or more Selection objects that represent alternate hosts."},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        return self.scheduler_rpcapi.select_destinations(context, spec_obj,"},{"line_number":39,"context_line":"                instance_uuids, return_alternates)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def update_aggregates(self, context, aggregates):"},{"line_number":42,"context_line":"        \"\"\"Updates HostManager internal aggregates information."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_ed397dd8","line":39,"updated":"2017-10-27 17:10:34.000000000","message":"I\u0027m kind of confused by this. Shouldn\u0027t the client always be requesting the latest RPC version for select_destinations() (which would be 4.5 as of this patch). The scheduler server should respond with the list of lists of Selection objects since the client requested 4.5.\n\nAn older client will send a request for select_destinations() at the 4.4 RPC API version and the scheduler server should return a list of dicts.\n\nOr are we now supporting upgrading either the conductor or the scheduler first instead of the scheduler first?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        will contain a Selection representing the selected (and claimed) host,"},{"line_number":37,"context_line":"        and, if return_alternates is True, zero or more Selection objects that"},{"line_number":38,"context_line":"        represent alternate hosts. The number of alternates returned depends on"},{"line_number":39,"context_line":"        the configuration setting `CONF.scheduler.max_attempts`."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return self.scheduler_rpcapi.select_destinations(context, spec_obj,"},{"line_number":42,"context_line":"                instance_uuids, return_objects, return_alternates)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_9a6a2f7e","line":39,"updated":"2017-12-04 18:10:44.000000000","message":"Well, the config setting and available hosts, but we don\u0027t need to get into too many details here. This is a good high level explanation of the usage of the variables.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fac1ef18f281665f491614c6a489cb904ff92fbc","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":48,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":49,"context_line":"            allocation_request_version\u003dNone, return_alternates\u003dFalse):"},{"line_number":50,"context_line":"        \"\"\"Returns a list of lists of Selection objects, which represent the"},{"line_number":51,"context_line":"        hosts and (optionally) alternates for each instance."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_54cc7b34","line":49,"updated":"2017-12-04 19:59:30.000000000","message":"I don\u0027t see any test for the FilterScheduler where return_alternates is False. Am I missing that?","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5e210f667a7fb021821341a3e66996f300d57f34","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":48,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":49,"context_line":"            allocation_request_version\u003dNone, return_alternates\u003dFalse):"},{"line_number":50,"context_line":"        \"\"\"Returns a list of lists of Selection objects, which represent the"},{"line_number":51,"context_line":"        hosts and (optionally) alternates for each instance."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_ea40440a","line":49,"in_reply_to":"df87a7cf_54cc7b34","updated":"2017-12-04 22:20:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        # is based on CONF.scheduler.max_attempts; note that if there are not"},{"line_number":158,"context_line":"        # enough filtered hosts to provide the full number of alternates, the"},{"line_number":159,"context_line":"        # list of hosts may be shorter than this amount."},{"line_number":160,"context_line":"        num_to_return \u003d CONF.scheduler.max_attempts if return_alternates else 0"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        if (instance_uuids is None or"},{"line_number":163,"context_line":"                not self.USES_ALLOCATION_CANDIDATES or"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_7a9e4b64","line":160,"range":{"start_line":160,"start_character":8,"end_line":160,"end_character":21},"updated":"2017-12-04 18:10:44.000000000","message":"It\u0027s confusing to me that this can be 0, which I think of as \"we aren\u0027t going to return *any* hosts\" but I think it really means, \"we aren\u0027t going to return any alternative hosts\", so maybe this should be renamed to num_alts_to_return?","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5e210f667a7fb021821341a3e66996f300d57f34","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        # is based on CONF.scheduler.max_attempts; note that if there are not"},{"line_number":158,"context_line":"        # enough filtered hosts to provide the full number of alternates, the"},{"line_number":159,"context_line":"        # list of hosts may be shorter than this amount."},{"line_number":160,"context_line":"        num_to_return \u003d CONF.scheduler.max_attempts if return_alternates else 0"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        if (instance_uuids is None or"},{"line_number":163,"context_line":"                not self.USES_ALLOCATION_CANDIDATES or"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_4a0a90d2","line":160,"range":{"start_line":160,"start_character":8,"end_line":160,"end_character":21},"in_reply_to":"df87a7cf_6033faac","updated":"2017-12-04 22:20:04.000000000","message":"Correction: changed it in this patch. Also note that this isn\u0027t new to this patch; it\u0027s been in master for 5 months now.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        # is based on CONF.scheduler.max_attempts; note that if there are not"},{"line_number":158,"context_line":"        # enough filtered hosts to provide the full number of alternates, the"},{"line_number":159,"context_line":"        # list of hosts may be shorter than this amount."},{"line_number":160,"context_line":"        num_to_return \u003d CONF.scheduler.max_attempts if return_alternates else 0"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        if (instance_uuids is None or"},{"line_number":163,"context_line":"                not self.USES_ALLOCATION_CANDIDATES or"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_6033faac","line":160,"range":{"start_line":160,"start_character":8,"end_line":160,"end_character":21},"in_reply_to":"df87a7cf_7a9e4b64","updated":"2017-12-04 18:46:04.000000000","message":"Changed it to \u0027num_alts\u0027 in a follow-up patch.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            # therefore we skip all the claiming logic for that scheduler"},{"line_number":168,"context_line":"            # driver. Also, if there was a problem communicating with the"},{"line_number":169,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_3a8f6324","line":172,"range":{"start_line":170,"start_character":45,"end_line":172,"end_character":67},"updated":"2017-12-04 18:10:44.000000000","message":"Unrelated, but this comment is a bit stale now - this code is returning Selection objects. The only place we convert back to old-style HostState objects is higher up the stack. Can clean this up in a follow up.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            # therefore we skip all the claiming logic for that scheduler"},{"line_number":168,"context_line":"            # driver. Also, if there was a problem communicating with the"},{"line_number":169,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_20e2d204","line":172,"range":{"start_line":170,"start_character":45,"end_line":172,"end_character":67},"in_reply_to":"df87a7cf_3a8f6324","updated":"2017-12-04 18:46:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."},{"line_number":176,"context_line":"            if instance_uuids is None:"},{"line_number":177,"context_line":"                num_to_return \u003d 0"},{"line_number":178,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_7af08bca","line":175,"range":{"start_line":173,"start_character":12,"end_line":175,"end_character":78},"updated":"2017-12-04 18:10:44.000000000","message":"Unrelated to this change, but this comment is stale now that _legacy_find_hosts exists. Can clean up in a follow up.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."},{"line_number":176,"context_line":"            if instance_uuids is None:"},{"line_number":177,"context_line":"                num_to_return \u003d 0"},{"line_number":178,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_c0e68617","line":175,"range":{"start_line":173,"start_character":12,"end_line":175,"end_character":78},"in_reply_to":"df87a7cf_7af08bca","updated":"2017-12-04 18:46:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        # The list of hosts selected for each instance"},{"line_number":341,"context_line":"        selected_hosts \u003d []"},{"line_number":342,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":343,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":344,"context_line":"        # will be a list of HostState objects representing the selected host"},{"line_number":345,"context_line":"        # along with alternates from the same cell. When \u0027include_alternates\u0027"},{"line_number":346,"context_line":"        # is False, the return value will be a list of HostState objects, with"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_7aac0b8c","line":343,"range":{"start_line":343,"start_character":29,"end_line":343,"end_character":66},"updated":"2017-12-04 18:10:44.000000000","message":"This is wrong now since that arg was removed. I suppose this comment should be updated to reflect the logic is based on the \u0027num_to_return\u0027 arg now.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        # The list of hosts selected for each instance"},{"line_number":341,"context_line":"        selected_hosts \u003d []"},{"line_number":342,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":343,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":344,"context_line":"        # will be a list of HostState objects representing the selected host"},{"line_number":345,"context_line":"        # along with alternates from the same cell. When \u0027include_alternates\u0027"},{"line_number":346,"context_line":"        # is False, the return value will be a list of HostState objects, with"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_e0e38a04","line":343,"range":{"start_line":343,"start_character":29,"end_line":343,"end_character":66},"in_reply_to":"df87a7cf_7aac0b8c","updated":"2017-12-04 18:46:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":381,"context_line":"        # more than one instance since the single selected host will get"},{"line_number":382,"context_line":"        # filtered out of the list of alternates below."},{"line_number":383,"context_line":"        if index \u003e 0:"},{"line_number":384,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":385,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":386,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_fae6dbe8","line":383,"updated":"2017-12-04 18:10:44.000000000","message":"We could short circuit here \"if not num_to_return\" yes?","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        # We only need to filter/weigh the hosts again if we\u0027re dealing with"},{"line_number":381,"context_line":"        # more than one instance since the single selected host will get"},{"line_number":382,"context_line":"        # filtered out of the list of alternates below."},{"line_number":383,"context_line":"        if index \u003e 0:"},{"line_number":384,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":385,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":386,"context_line":"            # hosts again to get an accurate count for alternates."}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_40a116a9","line":383,"in_reply_to":"df87a7cf_fae6dbe8","updated":"2017-12-04 18:46:04.000000000","message":"No, since at this point we have HostState objects for the selections. The loop starting at L393 is what constructs the lists of Selection objects.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":387,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":388,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":389,"context_line":"        # item per instance, and that item will be a list of HostState objects"},{"line_number":390,"context_line":"        # representing the selected host along with alternates from the same"},{"line_number":391,"context_line":"        # cell."},{"line_number":392,"context_line":"        selections_to_return \u003d []"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_1a05bf77","line":389,"range":{"start_line":389,"start_character":61,"end_line":389,"end_character":70},"updated":"2017-12-04 18:10:44.000000000","message":"Unrelated but this is wrong now.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":387,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":388,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":389,"context_line":"        # item per instance, and that item will be a list of HostState objects"},{"line_number":390,"context_line":"        # representing the selected host along with alternates from the same"},{"line_number":391,"context_line":"        # cell."},{"line_number":392,"context_line":"        selections_to_return \u003d []"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_20b092f4","line":389,"range":{"start_line":389,"start_character":61,"end_line":389,"end_character":70},"in_reply_to":"df87a7cf_1a05bf77","updated":"2017-12-04 18:46:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a58d74a01c2d6e2f6e6ade02a4962a3cd345727","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            # therefore we skip all the claiming logic for that scheduler"},{"line_number":168,"context_line":"            # driver. Also, if there was a problem communicating with the"},{"line_number":169,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_f99d8059","line":172,"range":{"start_line":170,"start_character":45,"end_line":172,"end_character":67},"updated":"2017-12-05 01:31:05.000000000","message":"Were you going to remove/change this in an earlier patch in the series where we started returning Selection objects? Or do it in a follow up?","commit_id":"f3fbb0a56017ee8848773cb21871566a88e2d766"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4504ef9c6c134b17dbd2250f4097325c9c2beda2","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            # therefore we skip all the claiming logic for that scheduler"},{"line_number":168,"context_line":"            # driver. Also, if there was a problem communicating with the"},{"line_number":169,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_fb36c1e7","line":172,"range":{"start_line":170,"start_character":45,"end_line":172,"end_character":67},"in_reply_to":"df87a7cf_f99d8059","updated":"2017-12-05 16:00:17.000000000","message":"Since I\u0027m changing the earlier patches in the series, I made the change there.","commit_id":"f3fbb0a56017ee8848773cb21871566a88e2d766"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a58d74a01c2d6e2f6e6ade02a4962a3cd345727","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":173,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":174,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":175,"context_line":"            # clean up once we no longer have to worry about older conductors."},{"line_number":176,"context_line":"            if instance_uuids is None:"},{"line_number":177,"context_line":"                num_alts \u003d 0"},{"line_number":178,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_b99ff84e","line":175,"range":{"start_line":173,"start_character":12,"end_line":175,"end_character":78},"updated":"2017-12-05 01:31:05.000000000","message":"same","commit_id":"f3fbb0a56017ee8848773cb21871566a88e2d766"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"caba1a1dd6346bad31c6082de40027b994d6d0c9","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":170,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":171,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":172,"context_line":"            # the objects without alternates. They will be converted back to"},{"line_number":173,"context_line":"            # the older dict format representing HostState objects."},{"line_number":174,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"},{"line_number":175,"context_line":"                    num_alts)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"df87a7cf_582c8598","line":173,"range":{"start_line":172,"start_character":45,"end_line":173,"end_character":67},"updated":"2017-12-06 02:02:31.000000000","message":"You should remove this now - the decision to return HostState dicts or Selection objects is based on the SchedulerManager logic, not something the driver here needs to care about.","commit_id":"542cdcdd86f50830846be504c0cfcc840dc9a337"}],"nova/scheduler/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"84065fad56c9c4c244e38c810e5d8d4d61f8a85e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            return_alternates\u003dFalse):"},{"line_number":125,"context_line":"        \"\"\"Returns destinations(s) best suited for this RequestSpec."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        Starting in Queens, this method returns a list of lists of Selection"},{"line_number":128,"context_line":"        objects, with one list for each requested instance. Each instance\u0027s"},{"line_number":129,"context_line":"        list will have its first element be the Selection object representing"},{"line_number":130,"context_line":"        the chosen host for the instance, along with zero or more alternates"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_cd3b61c6","line":127,"range":{"start_line":127,"start_character":20,"end_line":127,"end_character":26},"updated":"2017-10-27 17:10:34.000000000","message":"this should be 4.5, not \"Queens\". It\u0027s the RPC API version that matters not the release.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1954fcf8891619567beaed86fb309e3e774c5f96","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # If `return_alternates` is False, we need to convert the selections to"},{"line_number":182,"context_line":"        # the older format, which is a list of host state dicts."},{"line_number":183,"context_line":"        if not return_alternates:"},{"line_number":184,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":185,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"},{"line_number":186,"context_line":"                               for claim in claimed]"},{"line_number":187,"context_line":"            return jsonutils.to_primitive(selection_dicts)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_b0bd066a","line":184,"updated":"2017-10-18 19:27:55.000000000","message":"Could use your new scheduler.utils method here","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b789317c7564bdd3be6e27c40f6d3548622066d2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # If `return_alternates` is False, we need to convert the selections to"},{"line_number":182,"context_line":"        # the older format, which is a list of host state dicts."},{"line_number":183,"context_line":"        if not return_alternates:"},{"line_number":184,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":185,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"},{"line_number":186,"context_line":"                               for claim in claimed]"},{"line_number":187,"context_line":"            return jsonutils.to_primitive(selection_dicts)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_cb2a178f","line":184,"in_reply_to":"3f4b6375_b0bd066a","updated":"2017-10-18 20:19:39.000000000","message":"Yeah, that would be possible, but I think it\u0027s simpler to have both places use this one-liner. I\u0027ll change the other, and remove the method.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3e7427726b986915495c7da94611530873145ed6","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # Selection objects to a list of host state dicts, which is what the"},{"line_number":174,"context_line":"        # calling method expects. Remove the \u0027True or\u0027 in the conditional in"},{"line_number":175,"context_line":"        # the next patch."},{"line_number":176,"context_line":"        if True or not return_objects:"},{"line_number":177,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":178,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"},{"line_number":179,"context_line":"                               for claim in claimed]"}],"source_content_type":"text/x-python","patch_set":23,"id":"1f485f77_d9a2d59a","line":176,"range":{"start_line":176,"start_character":11,"end_line":176,"end_character":37},"updated":"2017-11-13 00:53:57.000000000","message":"This condition is always \"True\". So it should be removed.","commit_id":"3d506a123df0f84d0c9128edcfdb33e92859a2a9"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"96f67fe4254896996f73ffd9cdf241ff8681a66b","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # Selection objects to a list of host state dicts, which is what the"},{"line_number":174,"context_line":"        # calling method expects. Remove the \u0027True or\u0027 in the conditional in"},{"line_number":175,"context_line":"        # the next patch."},{"line_number":176,"context_line":"        if True or not return_objects:"},{"line_number":177,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":178,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"},{"line_number":179,"context_line":"                               for claim in claimed]"}],"source_content_type":"text/x-python","patch_set":23,"id":"1f485f77_9cb8cb2a","line":176,"range":{"start_line":176,"start_character":11,"end_line":176,"end_character":37},"in_reply_to":"1f485f77_d9a2d59a","updated":"2017-11-13 01:56:20.000000000","message":"Please see the next patch in the series, as mentioned in the TODO above:\n\nhttps://review.openstack.org/#/c/516707/9/nova/scheduler/manager.py@171","commit_id":"3d506a123df0f84d0c9128edcfdb33e92859a2a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c43e799281210c9eafb389f8d885081240e06066","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # patch, as it involves an RPC change. So convert the list of lists of"},{"line_number":173,"context_line":"        # Selection objects to a list of host state dicts, which is what the"},{"line_number":174,"context_line":"        # calling method expects. Remove the \u0027True or\u0027 in the conditional in"},{"line_number":175,"context_line":"        # the next patch."},{"line_number":176,"context_line":"        if True or not return_objects:"},{"line_number":177,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":178,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1f485f77_2ca92923","line":175,"updated":"2017-11-16 19:57:39.000000000","message":"You can\u0027t do this :)\n\nYou\u0027re declaring that you support version the 4.5 semantics in this patch, which means you need to actually support it. You can do this kind of prep before you bump the version if there\u0027s some reason for it, but once you\u0027ve bumped the version you\u0027re claiming you can do the new thing so you must do it.","commit_id":"8234e488b9496a7b8346de122100eb072b4246a8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"645b81ccd799698910b94ee1ff7cd3d2da25f353","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # patch, as it involves an RPC change. So convert the list of lists of"},{"line_number":173,"context_line":"        # Selection objects to a list of host state dicts, which is what the"},{"line_number":174,"context_line":"        # calling method expects. Remove the \u0027True or\u0027 in the conditional in"},{"line_number":175,"context_line":"        # the next patch."},{"line_number":176,"context_line":"        if True or not return_objects:"},{"line_number":177,"context_line":"            claimed \u003d [sel[0] for sel in selections]"},{"line_number":178,"context_line":"            selection_dicts \u003d [_selection_obj_to_dict(claim)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1f485f77_5dd6362a","line":175,"in_reply_to":"1f485f77_2ca92923","updated":"2017-11-17 17:12:56.000000000","message":"It really wasn\u0027t necessary; I added it to make it clear that we don\u0027t want to return the new style until the conductor is ready to handle it. Since \u0027return_objects\u0027 will always be False, the end result is the same, so I\u0027ll remove it.","commit_id":"8234e488b9496a7b8346de122100eb072b4246a8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        a deployment that have not been updated to Queens, and in that case"},{"line_number":122,"context_line":"        return_objects will be False, and the result will be a list of dicts"},{"line_number":123,"context_line":"        with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys. When return_objects is"},{"line_number":124,"context_line":"        False, the value of return_alternates has no effect."},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        LOG.debug(\"Starting to schedule for instances: %s\", instance_uuids)"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_224ea4c0","line":124,"updated":"2017-11-19 16:08:28.000000000","message":"nit: for posterity\u0027s sake (like for people like me who just had to read back in the review comments ;) ), it would be useful to put some of @dansmith\u0027s explanation about why we have a return_objects and a return_alternates kwarg. Something like this would be good I think:\n\n The reason there are two kwarg parameters return_objects and return_alternates\n is so we can differentiate between callers that understand the\n Selection object format but *don\u0027t* want to get alternate hosts, as\n is the case with the conductors that handle certain move operations.","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2ff06d7d8bce02ba679c2173dab50e25b2101c6f","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        a deployment that have not been updated to Queens, and in that case"},{"line_number":122,"context_line":"        return_objects will be False, and the result will be a list of dicts"},{"line_number":123,"context_line":"        with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys. When return_objects is"},{"line_number":124,"context_line":"        False, the value of return_alternates has no effect."},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        LOG.debug(\"Starting to schedule for instances: %s\", instance_uuids)"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ff82abbf_31a4d7b9","line":124,"in_reply_to":"1f485f77_224ea4c0","updated":"2017-11-28 17:04:38.000000000","message":"Done","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fac1ef18f281665f491614c6a489cb904ff92fbc","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    @messaging.expected_exceptions(exception.NoValidHost)"},{"line_number":85,"context_line":"    def select_destinations(self, ctxt, request_spec\u003dNone,"},{"line_number":86,"context_line":"            filter_properties\u003dNone, spec_obj\u003d_sentinel, instance_uuids\u003dNone,"},{"line_number":87,"context_line":"            return_objects\u003dFalse, return_alternates\u003dFalse):"},{"line_number":88,"context_line":"        \"\"\"Returns destinations(s) best suited for this RequestSpec."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        Starting in Queens, this method returns a list of lists of Selection"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_549a3b14","line":87,"updated":"2017-12-04 19:59:30.000000000","message":"I don\u0027t see any tests where either of these are True.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5e210f667a7fb021821341a3e66996f300d57f34","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    @messaging.expected_exceptions(exception.NoValidHost)"},{"line_number":85,"context_line":"    def select_destinations(self, ctxt, request_spec\u003dNone,"},{"line_number":86,"context_line":"            filter_properties\u003dNone, spec_obj\u003d_sentinel, instance_uuids\u003dNone,"},{"line_number":87,"context_line":"            return_objects\u003dFalse, return_alternates\u003dFalse):"},{"line_number":88,"context_line":"        \"\"\"Returns destinations(s) best suited for this RequestSpec."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        Starting in Queens, this method returns a list of lists of Selection"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_2de96619","line":87,"in_reply_to":"df87a7cf_549a3b14","updated":"2017-12-04 22:20:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"}],"nova/scheduler/rpcapi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"286b4cd434fa5066cca1ba303f7efea90dcc8a90","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                     serializer\u003dserializer)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def select_destinations(self, ctxt, spec_obj, instance_uuids,"},{"line_number":132,"context_line":"            modern_flag\u003dFalse):"},{"line_number":133,"context_line":"        # Modify the parameters if an older version is requested"},{"line_number":134,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":135,"context_line":"        msg_args \u003d {\u0027instance_uuids\u0027: instance_uuids,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_7b9b5565","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":23},"updated":"2017-10-16 14:44:43.000000000","message":"return_alternates?","commit_id":"ee0d277163c72adc339aded270dbe2878be337c4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"84065fad56c9c4c244e38c810e5d8d4d61f8a85e","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":135,"context_line":"        msg_args \u003d {\u0027instance_uuids\u0027: instance_uuids,"},{"line_number":136,"context_line":"                    \u0027spec_obj\u0027: spec_obj,"},{"line_number":137,"context_line":"                    \u0027return_alternates\u0027: return_alternates}"},{"line_number":138,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":139,"context_line":"            del msg_args[\u0027return_alternates\u0027]"},{"line_number":140,"context_line":"            version \u003d \u00274.4\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_2df1d502","line":137,"range":{"start_line":137,"start_character":21,"end_line":137,"end_character":59},"updated":"2017-10-27 17:10:34.000000000","message":"I don\u0027t see the point of the new parameter if the RPC API version is what can be used to indicate what the format of the response should be?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bccd35607356e03c35e4ea3124e0007323a5a7df","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":135,"context_line":"        msg_args \u003d {\u0027instance_uuids\u0027: instance_uuids,"},{"line_number":136,"context_line":"                    \u0027spec_obj\u0027: spec_obj,"},{"line_number":137,"context_line":"                    \u0027return_alternates\u0027: return_alternates}"},{"line_number":138,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":139,"context_line":"            del msg_args[\u0027return_alternates\u0027]"},{"line_number":140,"context_line":"            version \u003d \u00274.4\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_adeee5ea","line":137,"range":{"start_line":137,"start_character":21,"end_line":137,"end_character":59},"in_reply_to":"3f4b6375_2df1d502","updated":"2017-10-27 17:17:03.000000000","message":"The client\u0027s version does not get communicated to the server code. The server has to have compatible behavior regardless, and thus we need a way to say \"I want the new stuff\".","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a17c3bdad2079a37fda5e2bb8657e36a3d2577b9","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":135,"context_line":"        msg_args \u003d {\u0027instance_uuids\u0027: instance_uuids,"},{"line_number":136,"context_line":"                    \u0027spec_obj\u0027: spec_obj,"},{"line_number":137,"context_line":"                    \u0027return_alternates\u0027: return_alternates}"},{"line_number":138,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":139,"context_line":"            del msg_args[\u0027return_alternates\u0027]"},{"line_number":140,"context_line":"            version \u003d \u00274.4\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_0dae1998","line":137,"range":{"start_line":137,"start_character":21,"end_line":137,"end_character":59},"in_reply_to":"3f4b6375_adeee5ea","updated":"2017-10-27 17:19:29.000000000","message":"Thanks for hitting me up side the brain container with a cluestick. Sorry for being dense. :(","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"836733053c7d6f6ceba9fa29c438ea6ffac5f7f9","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                     serializer\u003dserializer)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def select_destinations(self, ctxt, spec_obj, instance_uuids,"},{"line_number":132,"context_line":"            return_alternates\u003dFalse):"},{"line_number":133,"context_line":"        # Modify the parameters if an older version is requested"},{"line_number":134,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":135,"context_line":"        msg_args \u003d {\u0027instance_uuids\u0027: instance_uuids,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f4b6375_73820a55","line":132,"range":{"start_line":132,"start_character":12,"end_line":132,"end_character":29},"updated":"2017-10-27 18:39:32.000000000","message":"Again, I think this is the wrong name for this. We\u0027re returning the new format, which is a Selection. I _also_ want return_alternates as a parameter here, but to mean \"don\u0027t bother returning alternates to me, just the first selection is fine\". If you burn this for this meaning, then later when I get the other it will be confusing.\n\nI also think we should go ahead and add both to this call now so that we\u0027re able to communicate from things like live migration etc that we don\u0027t want multiple results. You can\u0027t provide return_alternates\u003d if you didn\u0027t say return_selection\u003dTrue. It\u0027s really not a lot of complexity to do that.","commit_id":"b60769f00d7182a04823d63ee2e14ad76ef5f4b5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c43e799281210c9eafb389f8d885081240e06066","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":140,"context_line":"            del msg_args[\u0027return_objects\u0027]"},{"line_number":141,"context_line":"            del msg_args[\u0027return_alternates\u0027]"},{"line_number":142,"context_line":"            version \u003d \u00274.4\u0027"},{"line_number":143,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":144,"context_line":"            del msg_args[\u0027instance_uuids\u0027]"},{"line_number":145,"context_line":"            version \u003d \u00274.3\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1f485f77_0cf8ad46","line":142,"updated":"2017-11-16 19:57:39.000000000","message":"You need to raise here if either return_objects or return_alternates are true. The callers (not knowing what the version pin is) will be expecting one return type but get another. You need to signal to them that you can\u0027t do what they\u0027re asking for. This will ensure the rpc call is compatible, but is just going to break the caller, so there\u0027s no point in doing it.\n\nThis shouldn\u0027t be a supported case, so it\u0027s probably legit to not allow for this case in the caller. However, if someone configures their system with such a pin and we just blindly do this here, we\u0027ll fail in some cryptic way in the caller because we got back something we didn\u0027t expect. At a minimum the caller should catch whatever you raise here, log an error that means something, and fails gracefully.","commit_id":"8234e488b9496a7b8346de122100eb072b4246a8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"645b81ccd799698910b94ee1ff7cd3d2da25f353","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":140,"context_line":"            del msg_args[\u0027return_objects\u0027]"},{"line_number":141,"context_line":"            del msg_args[\u0027return_alternates\u0027]"},{"line_number":142,"context_line":"            version \u003d \u00274.4\u0027"},{"line_number":143,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":144,"context_line":"            del msg_args[\u0027instance_uuids\u0027]"},{"line_number":145,"context_line":"            version \u003d \u00274.3\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1f485f77_3de37adb","line":142,"in_reply_to":"1f485f77_0cf8ad46","updated":"2017-11-17 17:12:56.000000000","message":"Done","commit_id":"8234e488b9496a7b8346de122100eb072b4246a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04de019f48d2dfff89e0852cf9b6c9d41fe2c867","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    \u0027return_objects\u0027: return_objects,"},{"line_number":139,"context_line":"                    \u0027return_alternates\u0027: return_alternates}"},{"line_number":140,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":141,"context_line":"            if msg_args[\u0027return_objects\u0027] or msg_args[\u0027return_alternates\u0027]:"},{"line_number":142,"context_line":"                raise exc.SelectionObjectsWithOldRPCVersionNotSupported("},{"line_number":143,"context_line":"                        version\u003dself.client.version_cap)"},{"line_number":144,"context_line":"            del msg_args[\u0027return_objects\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_ba6cd336","line":141,"updated":"2017-12-04 18:10:44.000000000","message":"nit: would be good to add a comment here about why we make this a hard failure (because the client is requesting something we can\u0027t support yet).","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"bcec64bc2b7eca42cdf51f9eb571060597df53df","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    \u0027return_objects\u0027: return_objects,"},{"line_number":139,"context_line":"                    \u0027return_alternates\u0027: return_alternates}"},{"line_number":140,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":141,"context_line":"            if msg_args[\u0027return_objects\u0027] or msg_args[\u0027return_alternates\u0027]:"},{"line_number":142,"context_line":"                raise exc.SelectionObjectsWithOldRPCVersionNotSupported("},{"line_number":143,"context_line":"                        version\u003dself.client.version_cap)"},{"line_number":144,"context_line":"            del msg_args[\u0027return_objects\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_408fd622","line":141,"in_reply_to":"df87a7cf_ba6cd336","updated":"2017-12-04 18:46:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"}],"nova/scheduler/utils.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1954fcf8891619567beaed86fb309e3e774c5f96","unresolved":false,"context_lines":[{"line_number":606,"context_line":"retry_select_destinations \u003d retry_on_timeout(CONF.scheduler.max_attempts - 1)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"def remove_alternates(dests):"},{"line_number":610,"context_line":"    \"\"\"For methods that do not use the alternates returned by"},{"line_number":611,"context_line":"    select_destinations(), this method removes them and returns just the"},{"line_number":612,"context_line":"    selected host."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_90f44a5d","line":609,"updated":"2017-10-18 19:27:55.000000000","message":"I came here from migrate.py to see what this did. I think this is a bad name for this, because it\u0027s really returning you a new list of just the primaries, not actually removing anything from dests.\n\nI\u0027ll think of what would be a better name, but extract_primaries() or selection_list_to_host_list() or something maybe?","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b789317c7564bdd3be6e27c40f6d3548622066d2","unresolved":false,"context_lines":[{"line_number":606,"context_line":"retry_select_destinations \u003d retry_on_timeout(CONF.scheduler.max_attempts - 1)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"def remove_alternates(dests):"},{"line_number":610,"context_line":"    \"\"\"For methods that do not use the alternates returned by"},{"line_number":611,"context_line":"    select_destinations(), this method removes them and returns just the"},{"line_number":612,"context_line":"    selected host."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_ddfe5a04","line":609,"in_reply_to":"3f4b6375_90f44a5d","updated":"2017-10-18 20:19:39.000000000","message":"I think it\u0027s best to remove this and just use the one-liner where it\u0027s needed.","commit_id":"4ed8ae17bf328029449e673459da9477423bd8d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    \"\"\""},{"line_number":490,"context_line":"    if isinstance(selection, dict):"},{"line_number":491,"context_line":"        # TODO(edleafe): remove support for dicts"},{"line_number":492,"context_line":"        host \u003d selection.get(\"host\")"},{"line_number":493,"context_line":"        nodename \u003d selection.get(\"nodename\")"},{"line_number":494,"context_line":"        limits \u003d selection.get(\"limits\")"},{"line_number":495,"context_line":"    else:"},{"line_number":496,"context_line":"        host \u003d selection.service_host"},{"line_number":497,"context_line":"        nodename \u003d selection.nodename"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_c2cc7036","line":494,"range":{"start_line":492,"start_character":0,"end_line":494,"end_character":40},"updated":"2017-11-19 16:08:28.000000000","message":"were these were changed to get() notation because the Selection -\u003e dict transformation is lossy? I don\u0027t see nova/scheduler/manager.py:_selection_obj_to_dict() being a lossy transformation. The limits key is always present, AFAICT.","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2ff06d7d8bce02ba679c2173dab50e25b2101c6f","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    \"\"\""},{"line_number":490,"context_line":"    if isinstance(selection, dict):"},{"line_number":491,"context_line":"        # TODO(edleafe): remove support for dicts"},{"line_number":492,"context_line":"        host \u003d selection.get(\"host\")"},{"line_number":493,"context_line":"        nodename \u003d selection.get(\"nodename\")"},{"line_number":494,"context_line":"        limits \u003d selection.get(\"limits\")"},{"line_number":495,"context_line":"    else:"},{"line_number":496,"context_line":"        host \u003d selection.service_host"},{"line_number":497,"context_line":"        nodename \u003d selection.nodename"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff82abbf_91d4c3ea","line":494,"range":{"start_line":492,"start_character":0,"end_line":494,"end_character":40},"in_reply_to":"1f485f77_c2cc7036","updated":"2017-11-28 17:04:38.000000000","message":"As you may remember, the handling of limits changed several times in the life of this patch. At one point it was the case that limits may not be present; that is no longer the case. I\u0027ll change them back.","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":501,"context_line":"    # Adds a retry entry for the selected compute host and node:"},{"line_number":502,"context_line":"    _add_retry_host(filter_properties, host, nodename)"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"    # Adds oversubscription policy"},{"line_number":505,"context_line":"    if not filter_properties.get(\u0027force_hosts\u0027):"},{"line_number":506,"context_line":"        filter_properties[\u0027limits\u0027] \u003d limits"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"def populate_retry(filter_properties, instance_uuid):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_e2c9ac25","line":506,"range":{"start_line":504,"start_character":0,"end_line":506,"end_character":44},"updated":"2017-11-19 16:08:28.000000000","message":"huh, I always wondered where exactly the limits were ignored when a host was forced... now I know! :)","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fac1ef18f281665f491614c6a489cb904ff92fbc","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        host \u003d selection.service_host"},{"line_number":497,"context_line":"        nodename \u003d selection.nodename"},{"line_number":498,"context_line":"        limits \u003d selection.limits if \"limits\" in selection else {}"},{"line_number":499,"context_line":"        # \u0027limits\u0027 can also be None, so handle that as an empty dict"},{"line_number":500,"context_line":"        limits \u003d limits or {}"},{"line_number":501,"context_line":"    # Adds a retry entry for the selected compute host and node:"},{"line_number":502,"context_line":"    _add_retry_host(filter_properties, host, nodename)"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_54c31bee","line":500,"range":{"start_line":499,"start_character":8,"end_line":500,"end_character":29},"updated":"2017-12-04 19:59:30.000000000","message":"I\u0027m not seeing a test for this case where limits is None.","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5e210f667a7fb021821341a3e66996f300d57f34","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        host \u003d selection.service_host"},{"line_number":497,"context_line":"        nodename \u003d selection.nodename"},{"line_number":498,"context_line":"        limits \u003d selection.limits if \"limits\" in selection else {}"},{"line_number":499,"context_line":"        # \u0027limits\u0027 can also be None, so handle that as an empty dict"},{"line_number":500,"context_line":"        limits \u003d limits or {}"},{"line_number":501,"context_line":"    # Adds a retry entry for the selected compute host and node:"},{"line_number":502,"context_line":"    _add_retry_host(filter_properties, host, nodename)"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_8819807a","line":500,"range":{"start_line":499,"start_character":8,"end_line":500,"end_character":29},"in_reply_to":"df87a7cf_54c31bee","updated":"2017-12-04 22:20:04.000000000","message":"Done","commit_id":"1e9c849ed61f5d439195bd3575696ceb792bb800"}],"nova/tests/unit/scheduler/test_scheduler_utils.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            scheduler_utils.populate_filter_properties(filter_properties,"},{"line_number":189,"context_line":"                                                       host_state)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if force_hosts:"},{"line_number":192,"context_line":"            expected_limits \u003d None"},{"line_number":193,"context_line":"        else:"},{"line_number":194,"context_line":"            expected_limits \u003d \u0027fake-limits\u0027"},{"line_number":195,"context_line":"        self.assertEqual(expected_limits,"},{"line_number":196,"context_line":"                         filter_properties.get(\u0027limits\u0027))"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        if (with_retry and enable_retry_force_hosts"},{"line_number":199,"context_line":"                       and enable_retry_force_nodes):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_62ddbcde","side":"PARENT","line":196,"range":{"start_line":191,"start_character":0,"end_line":196,"end_character":57},"updated":"2017-11-19 16:08:28.000000000","message":"any reason this part of the test was removed? the relevant lines of code are still in the populate_filter_properties() function.","commit_id":"288cba29ec8a78adf430d36ae2736537568f5e86"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2ff06d7d8bce02ba679c2173dab50e25b2101c6f","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            scheduler_utils.populate_filter_properties(filter_properties,"},{"line_number":189,"context_line":"                                                       host_state)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if force_hosts:"},{"line_number":192,"context_line":"            expected_limits \u003d None"},{"line_number":193,"context_line":"        else:"},{"line_number":194,"context_line":"            expected_limits \u003d \u0027fake-limits\u0027"},{"line_number":195,"context_line":"        self.assertEqual(expected_limits,"},{"line_number":196,"context_line":"                         filter_properties.get(\u0027limits\u0027))"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        if (with_retry and enable_retry_force_hosts"},{"line_number":199,"context_line":"                       and enable_retry_force_nodes):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff82abbf_d13c8b30","side":"PARENT","line":196,"range":{"start_line":191,"start_character":0,"end_line":196,"end_character":57},"in_reply_to":"1f485f77_62ddbcde","updated":"2017-11-28 17:04:38.000000000","message":"Probably a rebase mistake. Fixed.","commit_id":"288cba29ec8a78adf430d36ae2736537568f5e86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4063c854b6cd49408f9688ad9cce26123824864","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    nodename\u003d\"fake-node\")"},{"line_number":174,"context_line":"        else:"},{"line_number":175,"context_line":"            selection \u003d dict(host\u003d\u0027fake-host\u0027,"},{"line_number":176,"context_line":"                             nodename\u003d\u0027fake-node\u0027)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        scheduler_utils.populate_filter_properties(filter_properties,"},{"line_number":179,"context_line":"                                                   selection)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_82d2f8cf","line":176,"range":{"start_line":176,"start_character":29,"end_line":176,"end_character":50},"updated":"2017-11-19 16:08:28.000000000","message":"did you remove the limits key to simulate what the Selection -\u003e dict transformation would be?","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2ff06d7d8bce02ba679c2173dab50e25b2101c6f","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    nodename\u003d\"fake-node\")"},{"line_number":174,"context_line":"        else:"},{"line_number":175,"context_line":"            selection \u003d dict(host\u003d\u0027fake-host\u0027,"},{"line_number":176,"context_line":"                             nodename\u003d\u0027fake-node\u0027)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        scheduler_utils.populate_filter_properties(filter_properties,"},{"line_number":179,"context_line":"                                                   selection)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff82abbf_9170430a","line":176,"range":{"start_line":176,"start_character":29,"end_line":176,"end_character":50},"in_reply_to":"1f485f77_82d2f8cf","updated":"2017-11-28 17:04:38.000000000","message":"This was done when the Selection object didn\u0027t have limits, and I wanted the dict to mirror the Selection object defined on L172-3.","commit_id":"86c955744d0916d1cd8e5d1151e70b80c03859af"}]}
