)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"80aed54b1b0df523aa3c3c65507ae72b39079591","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-09 15:46:15 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes host_manager limit the compute node and service listing"},{"line_number":10,"context_line":"to a single cell, if asked in the RequestSpec. It also makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9a30ddce_abc3e387","line":7,"updated":"2017-03-10 10:36:00.000000000","message":"Are you planning to do that as well for other move operations like evacuate ?","commit_id":"50ca38ebb115d31f88bd85e2d72e98fcdb4a2627"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0dec9f8a9a39de3c673945807a68a9ef35774d9e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-09 15:46:15 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes host_manager limit the compute node and service listing"},{"line_number":10,"context_line":"to a single cell, if asked in the RequestSpec. It also makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9a30ddce_9fdc8b47","line":7,"in_reply_to":"9a30ddce_82d0b9f7","updated":"2017-03-10 15:57:19.000000000","message":"Okay, so you\u0027d like to add a new change for evacuate and other move operations? Maybe okay, but I need to make sure we don\u0027t forget it.","commit_id":"50ca38ebb115d31f88bd85e2d72e98fcdb4a2627"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4dbb4cac5b02c32dd17d12ba4549abe7131abfc8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-09 15:46:15 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes host_manager limit the compute node and service listing"},{"line_number":10,"context_line":"to a single cell, if asked in the RequestSpec. It also makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9a30ddce_ffa10795","line":7,"in_reply_to":"9a30ddce_9fdc8b47","updated":"2017-03-10 15:59:57.000000000","message":"Yeah, this series doesn\u0027t do anything but make things that would currently be broken if you had multiple cells work. So the assumption today and tomorrow is that if you create a second cell, a bunch of stuff will be broken. So until we open the door for that second cell (in a reno or something) we\u0027re still in that state. Thus, I don\u0027t think we need to fix all the things in a single patch and since I\u0027m focused on what is in a tempest run right now, that\u0027s the list I\u0027m working towards.\n\nIf this set wasn\u0027t already very large, I\u0027d throw a WIP at the end as a marker, but... it\u0027s large :)","commit_id":"50ca38ebb115d31f88bd85e2d72e98fcdb4a2627"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"87038b363e153caf754852b708140f597c246a0f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-09 15:46:15 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes host_manager limit the compute node and service listing"},{"line_number":10,"context_line":"to a single cell, if asked in the RequestSpec. It also makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9a30ddce_82d0b9f7","line":7,"in_reply_to":"9a30ddce_abc3e387","updated":"2017-03-10 14:40:13.000000000","message":"Yep, this series is aimed at all the things tempest covers, which does not include evacuate (and some service manipulation stuff).\n\nOnce this is all working, we\u0027ll need a second round to pick up some things like that.","commit_id":"50ca38ebb115d31f88bd85e2d72e98fcdb4a2627"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9b1e06a2abccb9a9b20867e51cc11c929e2b7140","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-27 13:01:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes changes to the host manager to collect information"},{"line_number":10,"context_line":"about the cell that a particular HostState is in, and makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"ffe62b97_22bb35c5","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":46},"updated":"2017-03-29 13:24:49.000000000","message":"so this change adds a scheduler modification for verifying if the Destination object is having a cell field, fine by me.\nIn that change, you also modify conductor.tasks.migrate for adding that Destination.cell, good. So, you\u0027re restricting resizes and cold-migrations to stay in the original cell. All good.\n\nBut my concern is that I looked at your series, and I haven\u0027t found any change also adding the Destination.cell for all the other move operations, ie. evacuate/rebuild and live-migrate. Am I missing something ? Why do you want to *not* restrict that as well ?\n\nTBH, given that change is modifying both server-side (ie. scheduler verifying the Destination field for RequestSpec) and the client-side (ie. migrate task adding it), maybe we should just cut that big change in two, so another developer could help us by adding the same client-side modification for all the other move operations ?","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0634f6c406735a7feaa905f0aa5731c31a7be999","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-27 13:01:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes changes to the host manager to collect information"},{"line_number":10,"context_line":"about the cell that a particular HostState is in, and makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"ffe62b97_384928b6","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":46},"in_reply_to":"ffe62b97_22bb35c5","updated":"2017-03-29 13:44:31.000000000","message":"We already discussed this and I said I\u0027m trying to get these set of patches through for what gets tested tempest so I can move on to those other operations (and performance improvements that need to happen as well). Unfortunately, progress towards that goal seems to be slower than I had hoped.\n\nRebuild doesn\u0027t schedule to a different host, and evacuate is not tested in tempest. Our live migrate job will require some different devstack work as we need to make the live job actually a single cell so we continue to get migrations tested at all after my devstack change merges.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d869dc14bcb9a6a4c1af1c456ca88d376c45acd5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-27 13:01:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make conductor ask scheduler to limit migrates to same cell"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This makes changes to the host manager to collect information"},{"line_number":10,"context_line":"about the cell that a particular HostState is in, and makes"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"ffe62b97_cc083793","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":46},"in_reply_to":"ffe62b97_384928b6","updated":"2017-03-29 15:54:39.000000000","message":"Right, I know we discussed about that, but I do wonder why we couldn\u0027t just implement the client-side change in the conductor for the \"rebuild/evacuate\" and live-migrate commands just by modifying UTs without waiting Tempest to test that (and yeah I understand how it can be tough to be tested in gate, in particular for evacuate)","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"2a443a777b15c5d5bf4aaa856883bf51d2ac23bd","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        LOG.debug(\u0027Requesting cell %(cell)s while migrating\u0027,"},{"line_number":69,"context_line":"                  {\u0027cell\u0027: instance_mapping.cell_mapping.identity},"},{"line_number":70,"context_line":"                  instance\u003dself.instance)"},{"line_number":71,"context_line":"        if (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":72,"context_line":"                self.request_spec.requested_destination):"},{"line_number":73,"context_line":"            self.request_spec.requested_destination.cell \u003d ("},{"line_number":74,"context_line":"                instance_mapping.cell_mapping)"},{"line_number":75,"context_line":"        else:"},{"line_number":76,"context_line":"            self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":77,"context_line":"                cell\u003dinstance_mapping.cell_mapping)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        hosts \u003d self.scheduler_client.select_destinations("},{"line_number":80,"context_line":"            self.context, self.request_spec)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a22e58a_583e64b9","line":77,"range":{"start_line":71,"start_character":8,"end_line":77,"end_character":51},"updated":"2017-03-14 11:42:43.000000000","message":"nit: could be simplified like:\n\nif not \u0027requested_destination\u0027 in self.request_spec or not\n   self.request_spec.requested_destination:\n   self.request_spec.requested_destination \u003d objects.Destination()\n\nself.request_spec.requested_destination.cell \u003d ...","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9b1e06a2abccb9a9b20867e51cc11c929e2b7140","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            self.request_spec.requested_destination.cell \u003d ("},{"line_number":67,"context_line":"                instance_mapping.cell_mapping)"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":70,"context_line":"                cell\u003dinstance_mapping.cell_mapping)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        hosts \u003d self.scheduler_client.select_destinations("},{"line_number":73,"context_line":"            self.context, self.request_spec)"}],"source_content_type":"text/x-python","patch_set":32,"id":"ffe62b97_8271e178","line":70,"range":{"start_line":69,"start_character":54,"end_line":70,"end_character":51},"updated":"2017-03-29 13:24:49.000000000","message":"so you\u0027re creating a Destination object that\u0027s not having host or node in there. Well, okay, given you verified the host attribute in https://review.openstack.org/#/c/438025/32/nova/scheduler/host_manager.py@549 I\u0027m fine with that.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"}],"nova/scheduler/caching_scheduler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6ba1589e8695564a2deb8143e9ed64436dc13404","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            only_cell \u003d None"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if only_cell:"},{"line_number":84,"context_line":"            return self._all_hoststates.get(only_cell, [])"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            return itertools.chain.from_iterable("},{"line_number":87,"context_line":"                self.all_host_states.values())"}],"source_content_type":"text/x-python","patch_set":31,"id":"ffe62b97_9d9e5852","line":84,"range":{"start_line":84,"start_character":19,"end_line":84,"end_character":39},"updated":"2017-03-27 12:20:40.000000000","message":"should it be self.all_host_states ? Typo ?","commit_id":"5285683621c5525a1c47d553cbbf15284c94e8a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"947850008a1b011e49f0b3e281c8465d8561c2ae","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            only_cell \u003d None"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if only_cell:"},{"line_number":84,"context_line":"            return self._all_hoststates.get(only_cell, [])"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            return itertools.chain.from_iterable("},{"line_number":87,"context_line":"                self.all_host_states.values())"}],"source_content_type":"text/x-python","patch_set":31,"id":"ffe62b97_15b3264f","line":84,"range":{"start_line":84,"start_character":19,"end_line":84,"end_character":39},"in_reply_to":"ffe62b97_9d9e5852","updated":"2017-03-27 19:59:57.000000000","message":"Good catch. There\u0027s another bug in here, in that I should be using only_cell.uuid.\n\nWe seem to have very little actual coverage of caching_scheduler, tbh, but I definitely hadn\u0027t added one to check the single-cell case.","commit_id":"5285683621c5525a1c47d553cbbf15284c94e8a5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9b1e06a2abccb9a9b20867e51cc11c929e2b7140","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        # a dict for us. However, it flattens the information for the more"},{"line_number":93,"context_line":"        # mainline FilterScheduler. Since CachingScheduler goes away soonish,"},{"line_number":94,"context_line":"        # and since we were already iterating the full host list on every"},{"line_number":95,"context_line":"        # refresh, just build the dict here for now."},{"line_number":96,"context_line":"        hosts_by_cell \u003d collections.defaultdict(list)"},{"line_number":97,"context_line":"        for host in all_hosts_iterator:"},{"line_number":98,"context_line":"            hosts_by_cell[host.cell_uuid].append(host)"}],"source_content_type":"text/x-python","patch_set":32,"id":"ffe62b97_22ca151a","line":95,"updated":"2017-03-29 13:24:49.000000000","message":"Fair enough.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"127d07a3765a2e89f886cb8d864235af984da30f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":61,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""},{"line_number":62,"context_line":"        elevated \u003d context.elevated()"},{"line_number":63,"context_line":"        # NOTE(johngarbutt) Fetching the list of hosts before we get"},{"line_number":64,"context_line":"        # a user request, so no user requests have to wait while we"},{"line_number":65,"context_line":"        # fetch the list of hosts."},{"line_number":66,"context_line":"        self.all_host_states \u003d self._get_up_hosts(elevated)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def _get_all_host_states(self, context, spec_obj):"},{"line_number":69,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"dfeb2761_ed0190b1","line":66,"range":{"start_line":63,"start_character":8,"end_line":66,"end_character":59},"updated":"2017-03-30 21:53:56.000000000","message":"We should probably update this to point out it\u0027s a mapping of hosts to cell now, keyed by cell uuid with a list of HostState objects.","commit_id":"9370ccf055005768394ded791521fb0f51127ab8"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1a53f5f5d323d5379c2314fcd89c81e6efaa2e59","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        compute_uuids \u003d [rp.uuid for rp in rps]"},{"line_number":178,"context_line":"        return self.host_manager.get_host_states_by_uuids(context,"},{"line_number":179,"context_line":"                                                          compute_uuids,"},{"line_number":180,"context_line":"                                                          spec_obj)"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a30ddce_5c666bed","line":180,"updated":"2017-03-13 14:23:34.000000000","message":"Alex is correct, this method is overridden in the caching scheduler.\n\nIt calls get_all_hosts() I think?\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/caching_scheduler.py#L75\n\nHmm, that thing is proving harder to maintain than I would like.","commit_id":"8b11782f1cb92e97963922b4b3ea24b948d136f9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5a91adb651c021b3b626418127ac645977f543b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a22e58a_1a7ce91f","line":181,"updated":"2017-03-14 09:12:26.000000000","message":"Thinking of the problem of restricting to a cell for CachingScheduler, I think I have an idea.\n\nIn the CachingScheduler, _get_up_hosts() could still possibly return the whole list of compute nodes to cache in memory but we could restrict what is returned by get_all_host_states to all the cached HostStates that are within the cell given by spec_obj.requested_destination. It would imply that we build that cache (ie. what _get_up_hosts () returns) by rather having a dict keyed by cell names instead of just a list, but that looks to me a small price to pay.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9b1e06a2abccb9a9b20867e51cc11c929e2b7140","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"ffe62b97_a2106558","line":181,"updated":"2017-03-29 13:24:49.000000000","message":"You\u0027re unfortunately missing the 3rd scheduler driver, aka. ChanceScheduler. I don\u0027t see it restricting to return only computes that are part of the requested cell. \n\nYeah, I know, ChanceScheduler is pretty smallish and not really intended to be running for production use, albeit not for cells :-) But sometimes, it\u0027s used for CI purposes or stress benchmarking, and I\u0027d love to see it modified as well in order to be cells-aware too.\n\nThat said, maybe logging a reno note saying that this change doesn\u0027t target to fix ChanceScheduler, and leave a big TODO explaining that could be worth it so we could address that in a follow-up patch (and I could help you).","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d8f14fa1a69954ea332259062ccede232e099dae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"ffe62b97_d86b5cee","line":181,"in_reply_to":"ffe62b97_388c88d5","updated":"2017-03-29 13:45:30.000000000","message":"Actually I already had it properly in the commit message.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0634f6c406735a7feaa905f0aa5731c31a7be999","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"ffe62b97_388c88d5","line":181,"in_reply_to":"ffe62b97_a2106558","updated":"2017-03-29 13:44:31.000000000","message":"A reno doesn\u0027t make sense if we\u0027re going to fix it rather quick anyway. However, I\u0027ll add a todo and a note in the commit message.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1a53f5f5d323d5379c2314fcd89c81e6efaa2e59","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        the HostManager knows about. Also, each of the consumable resources"},{"line_number":628,"context_line":"        in HostState are pre-populated and adjusted based on data in the db."},{"line_number":629,"context_line":"        \"\"\""},{"line_number":630,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells(context)"},{"line_number":631,"context_line":"        return self._get_host_states(context, compute_nodes, services)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def _get_host_states(self, context, compute_nodes, services):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a30ddce_5c702b72","line":630,"updated":"2017-03-13 14:23:34.000000000","message":"Yeah, I think we just need to pass the spec_obj through here for the caching scheduler.","commit_id":"8b11782f1cb92e97963922b4b3ea24b948d136f9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5a91adb651c021b3b626418127ac645977f543b2","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        if (spec_obj and \u0027requested_destination\u0027 in spec_obj and"},{"line_number":591,"context_line":"                spec_obj.requested_destination and"},{"line_number":592,"context_line":"                \u0027cell\u0027 in spec_obj.requested_destination):"},{"line_number":593,"context_line":"            only_cell \u003d spec_obj.requested_destination.cell"},{"line_number":594,"context_line":"        else:"},{"line_number":595,"context_line":"            only_cell \u003d None"},{"line_number":596,"context_line":"        for cell in self.cells:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a22e58a_549f1a5f","line":593,"updated":"2017-03-14 09:12:26.000000000","message":"FWIW, we already restrict which compute nodes are verified if requested_destination is set by _get_hosts_matching_request() which is called by get_filtered_hosts() after the HostManager creates the list of HostStates that are related to filtered hosts that match the request.\n\nUnfortunately, creating that list of HostStates needs to call the cell DB hence why it\u0027s probably fine to do this.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5a91adb651c021b3b626418127ac645977f543b2","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a22e58a_7fa78f4f","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"updated":"2017-03-14 09:12:26.000000000","message":"instead of using that method which is badly named in case the destination asks for only one cell, why not verify the spec_obj here and call _get_computes_for_cells(context, computes_uuids, cell_uuids) ?\n\nIt would IMO be better to modify the internal method signature.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d2c52b6971c9651a927d4916355f2181fc148318","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_ce09b4df","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_2e6888ba","updated":"2017-03-14 16:52:21.000000000","message":"Yeah, aside from the rename of the all cells method, isn\u0027t that what I did in the next PS?","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"05347a778bc59a2c72dd76b700a6f7de823875f7","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_4eadc430","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_4e79442f","updated":"2017-03-14 17:03:10.000000000","message":"Okay, I\u0027m completely missing the benefit of doing that. If I do it that way,  in the resize case, I iterate cells once to filter the one I want then iterate again in the for_cells() case. To avoid iterating the list twice in the unrestricted case, I have to have a conditional here anyway. What\u0027s the benefit I\u0027m missing?","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"84b157d1fe0d2af97010e3db54c06b03b09727cc","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_a1872911","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_4eadc430","updated":"2017-03-14 17:16:23.000000000","message":"I didn\u0027t know there\u0027s a case of iterating twice. I thought it was either one cell or all cells, so I was thinking passing just the one would be better than skipping all but the one in the RequestSpec.cell case.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7732a03b30bfe61573c3aa09d2af8df27dd33a63","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_2e6888ba","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_64038a10","updated":"2017-03-14 16:49:14.000000000","message":"I think maybe he was saying verify the RequestSpec here and then pass either a list of the one cell uuid or a list of all the cell uuids (after pulling them from the db, or passing the cached list) to a renamed method called _get_computes_for_cells that doesn\u0027t automatically do \"all\".","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ffd560fddfdc1b677a4b3ea75151a02076ec6ba2","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_7fadc887","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_a1872911","updated":"2017-03-14 17:54:13.000000000","message":"I\u0027m saying there is if I don\u0027t put the same conditional here instead of above. Just saying I don\u0027t see the point in making the change to move it from one place to the other, but I\u0027m clearly missing something meta about it, so I\u0027m just doing it.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a827a8832f1c1938959ee6f3780aae07b3e3d0f8","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_4e79442f","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"3a1ff146_ce09b4df","updated":"2017-03-14 16:57:27.000000000","message":"No because the all cells method pulls all the cells (or uses the cached list) and iterates over them and skips nonlocal cells if only_cell was passed. If it were _get_computes_for_cells(..., [list of cells]) then you wouldn\u0027t have the skip logic at all because only the list of candidate cells would be passed in.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"892820257ee4904224b588f97c5565132e44ada3","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        return compute_nodes, services"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":619,"context_line":"        compute_nodes, services \u003d self._get_computes_all_cells("},{"line_number":620,"context_line":"            context,"},{"line_number":621,"context_line":"            compute_uuids\u003dcompute_uuids,"},{"line_number":622,"context_line":"            spec_obj\u003dspec_obj)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a1ff146_64038a10","line":619,"range":{"start_line":619,"start_character":39,"end_line":619,"end_character":63},"in_reply_to":"5a22e58a_7fa78f4f","updated":"2017-03-14 14:05:05.000000000","message":"The signature of the external method will be exactly the same even if I move that block into here, but.. okay.","commit_id":"d11e01ba5da4874ddb00fb39d6e9ad5bb7995060"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"76390740cdf415a0fd97b9988394408e90d4a3f9","unresolved":false,"context_lines":[{"line_number":550,"context_line":"            # NOTE(sbauza): Reduce a potentially long set of hosts as much as"},{"line_number":551,"context_line":"            # possible to any requested destination nodes before passing the"},{"line_number":552,"context_line":"            # list to the filters"},{"line_number":553,"context_line":"            hosts \u003d _get_hosts_matching_request(hosts, requested_node)"},{"line_number":554,"context_line":"        if ignore_hosts or force_hosts or force_nodes:"},{"line_number":555,"context_line":"            # NOTE(deva): we can\u0027t assume \"host\" is unique because"},{"line_number":556,"context_line":"            #             one host may have many nodes."}],"source_content_type":"text/x-python","patch_set":30,"id":"1a1ced50_0c5640d2","line":553,"range":{"start_line":553,"start_character":12,"end_line":553,"end_character":70},"updated":"2017-03-18 10:51:19.000000000","message":"Another question, if the user specified a target host in the migration, so that is allowed to cross cell?","commit_id":"1b778c3105741c0d8fdfd833d18cffe1bb2949fd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6ba1589e8695564a2deb8143e9ed64436dc13404","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        \"\"\""},{"line_number":649,"context_line":"        # Get resource usage across the available compute nodes:"},{"line_number":650,"context_line":"        seen_nodes \u003d set()"},{"line_number":651,"context_line":"        for cell_uuid, computes in compute_nodes.items():"},{"line_number":652,"context_line":"            for compute in computes:"},{"line_number":653,"context_line":"                service \u003d services.get(compute.host)"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"ffe62b97_3da2acaf","line":651,"range":{"start_line":651,"start_character":35,"end_line":651,"end_character":56},"updated":"2017-03-27 12:20:40.000000000","message":"nit: in general, I prefer using six.iteritems() given .items() returns differency between py2 and py3 but okay.","commit_id":"5285683621c5525a1c47d553cbbf15284c94e8a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"127d07a3765a2e89f886cb8d864235af984da30f","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        force_nodes \u003d spec_obj.force_nodes or []"},{"line_number":547,"context_line":"        requested_node \u003d spec_obj.requested_destination"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        if requested_node is not None and \u0027host\u0027 in requested_node:"},{"line_number":550,"context_line":"            # NOTE(sbauza): Reduce a potentially long set of hosts as much as"},{"line_number":551,"context_line":"            # possible to any requested destination nodes before passing the"},{"line_number":552,"context_line":"            # list to the filters"}],"source_content_type":"text/x-python","patch_set":33,"id":"dfeb2761_8dc0c452","line":549,"updated":"2017-03-30 21:53:56.000000000","message":"Why is this needed?","commit_id":"9370ccf055005768394ded791521fb0f51127ab8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"36e72d95613f44aab924e5c0d06315ac25df3015","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        force_nodes \u003d spec_obj.force_nodes or []"},{"line_number":547,"context_line":"        requested_node \u003d spec_obj.requested_destination"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        if requested_node is not None and \u0027host\u0027 in requested_node:"},{"line_number":550,"context_line":"            # NOTE(sbauza): Reduce a potentially long set of hosts as much as"},{"line_number":551,"context_line":"            # possible to any requested destination nodes before passing the"},{"line_number":552,"context_line":"            # list to the filters"}],"source_content_type":"text/x-python","patch_set":33,"id":"dfeb2761_2df9b87f","line":549,"in_reply_to":"dfeb2761_8dc0c452","updated":"2017-03-30 21:56:22.000000000","message":"Because destination used to only be used if you asked for a host. However, now we can ask for just a cell, and thus host won\u0027t be set.","commit_id":"9370ccf055005768394ded791521fb0f51127ab8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"127d07a3765a2e89f886cb8d864235af984da30f","unresolved":false,"context_lines":[{"line_number":610,"context_line":"            self.cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":611,"context_line":"            LOG.debug(\u0027Found %(count)i cells: %(cells)s\u0027,"},{"line_number":612,"context_line":"                      {\u0027count\u0027: len(self.cells),"},{"line_number":613,"context_line":"                       \u0027cells\u0027: \u0027, \u0027.join([c.uuid for c in self.cells])})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def get_host_states_by_uuids(self, context, compute_uuids, spec_obj):"},{"line_number":616,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"dfeb2761_2d941844","line":613,"range":{"start_line":613,"start_character":45,"end_line":613,"end_character":49},"updated":"2017-03-30 21:53:56.000000000","message":"Could use the identity property here.","commit_id":"9370ccf055005768394ded791521fb0f51127ab8"}],"nova/tests/unit/scheduler/test_caching_scheduler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9b1e06a2abccb9a9b20867e51cc11c929e2b7140","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            uuids.cell2: host_states_cell2,"},{"line_number":224,"context_line":"        }"},{"line_number":225,"context_line":"        d \u003d self.driver.select_destinations(self.context, spec_obj)"},{"line_number":226,"context_line":"        self.assertIn(d[0][\u0027host\u0027], [hs.host for hs in host_states_cell2])"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":32,"id":"ffe62b97_550155ae","line":226,"updated":"2017-03-29 13:24:49.000000000","message":"Well, given we only return one destination when calling select_dests(), there could be a possibility that the CachingScheduler would find both hosts as valid and only return the second one. But, given we random() the list of results before passing the first item back, the assertion would randomly fail in our CI if host1 was returned. \n\nSo, I think this is fine here.","commit_id":"d7fc7d0b319164a228c9803d9092ec6d0ac2a56a"}]}
