)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32ed86769ddb45d26e2f0c61923502b82fd8837b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"that have group members on them. Access of the \u0027hosts\u0027 field calls"},{"line_number":12,"context_line":"InstanceGroup.get_hosts during a lazy-load and get_hosts does a query"},{"line_number":13,"context_line":"for all instances that are members of the group and returns their hosts"},{"line_number":14,"context_line":"after removing duplicates. The InstanceList query isn\u0027t targeting any"},{"line_number":15,"context_line":"cells, so it will return [] in a multi-cell environment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This makes setup_instance_group query all cells for instances that are"},{"line_number":18,"context_line":"members of the instance group."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bf659307_8293db00","line":15,"range":{"start_line":14,"start_character":27,"end_line":15,"end_character":56},"updated":"2018-04-04 21:47:39.000000000","message":"This depends I think - if you\u0027re doing a move operation, then the context is already targeted to a cell. For initial scheduling of the instance before it\u0027s created in a cell, yes this is correct.","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"}],"nova/objects/instance_group.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6acbd4c36f13142dd86e12ea2fba8a93c9d7bbeb","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        if attrname !\u003d \u0027hosts\u0027:"},{"line_number":297,"context_line":"            raise exception.ObjectActionError("},{"line_number":298,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        self.hosts \u003d self.get_hosts()"},{"line_number":301,"context_line":"        self.obj_reset_changes([\u0027hosts\u0027])"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_e1470e1d","side":"PARENT","line":299,"updated":"2018-02-06 15:58:51.000000000","message":"nit: unnecessary change","commit_id":"1a762d00e21597e2766b0209f05390c9cd316c1f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"938aee37476270d728847026af8e4bdc28c892a8","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        filters \u003d {\u0027uuid\u0027: filter_uuids, \u0027deleted\u0027: False}"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        instances \u003d []"},{"line_number":474,"context_line":"        results \u003d nova_context.scatter_gather_all_cells("},{"line_number":475,"context_line":"            self._context, objects.InstanceList.get_by_filters,"},{"line_number":476,"context_line":"            filters\u003dfilters)"},{"line_number":477,"context_line":"        for cell_uuid, result in results.items():"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_cd2ea4a4","line":474,"range":{"start_line":474,"start_character":31,"end_line":474,"end_character":55},"updated":"2018-02-07 17:04:26.000000000","message":"Since we shouldn\u0027t have nova-computes in cell0, we could optimize and call scatter_gather_skip_cell0 here.","commit_id":"a50c6245941d11f7afd860768cc4bc814be4d6eb"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"33bb3f4f7c0ceb81d6ffd457da2444afef8cb2dd","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        filters \u003d {\u0027uuid\u0027: filter_uuids, \u0027deleted\u0027: False}"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        instances \u003d []"},{"line_number":474,"context_line":"        results \u003d nova_context.scatter_gather_all_cells("},{"line_number":475,"context_line":"            self._context, objects.InstanceList.get_by_filters,"},{"line_number":476,"context_line":"            filters\u003dfilters)"},{"line_number":477,"context_line":"        for cell_uuid, result in results.items():"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_d054f7cc","line":474,"range":{"start_line":474,"start_character":31,"end_line":474,"end_character":55},"in_reply_to":"3fa0c359_cd2ea4a4","updated":"2018-02-07 17:12:39.000000000","message":"I had been thinking we could have group members in ERROR state in cell0, but we only put instances with no host in cell0, so they would not be valid group members anyway. So, I agree, we could skip cell0 here.","commit_id":"a50c6245941d11f7afd860768cc4bc814be4d6eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4153fd25369272cc6ef373cdac65da5892f04ec6","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        return list(members)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"    @base.remotable"},{"line_number":461,"context_line":"    def get_hosts(self, exclude\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Get a list of hosts for non-deleted instances in the group"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        This method allows you to get a list of the hosts where instances in"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_e10e0031","line":461,"updated":"2018-02-07 22:39:58.000000000","message":"This is remotable, which means it really shouldn\u0027t be scanning across cells. Remotable methods are only really used by db-isolated services, which means compute and the like, which can\u0027t talk to other cells anyway.\n\nThis is why we have a dedicated method for this in service:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/service.py#L461\n\nI bet bringing this up will remind Matt, as I think he was part of the initial discussion on this :)","commit_id":"5412f859cd15c7ccfc74c5f69dfcdb13d74eb094"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"077c5a3e67762e9589cbc14eaa3226e68981f0d0","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        return list(members)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"    @base.remotable"},{"line_number":461,"context_line":"    def get_hosts(self, exclude\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Get a list of hosts for non-deleted instances in the group"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        This method allows you to get a list of the hosts where instances in"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_7264fcb9","line":461,"in_reply_to":"3fa0c359_e10e0031","updated":"2018-02-08 01:29:18.000000000","message":"I have no idea what you\u0027re talking about.","commit_id":"5412f859cd15c7ccfc74c5f69dfcdb13d74eb094"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"355e3e5e93bf91ce1a02a01bf18ecbce62c6195e","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            raise exception.ObjectActionError("},{"line_number":344,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        LOG.debug(\"Lazy-loading \u0027%(attr)s\u0027 on %(name)s uuid %(uuid)s\","},{"line_number":347,"context_line":"                  {\u0027attr\u0027: attrname,"},{"line_number":348,"context_line":"                   \u0027name\u0027: self.obj_name(),"},{"line_number":349,"context_line":"                   \u0027uuid\u0027: self.uuid,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_a8273cc7","line":346,"updated":"2018-08-23 17:52:26.000000000","message":"Note that you could also check self._context and explode if it\u0027s untargeted. Presumably lazy-loading without a targeted cell is never going to yield the right thing (probably true for any object in the cell db).","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            raise exception.ObjectActionError("},{"line_number":344,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        LOG.debug(\"Lazy-loading \u0027%(attr)s\u0027 on %(name)s uuid %(uuid)s\","},{"line_number":347,"context_line":"                  {\u0027attr\u0027: attrname,"},{"line_number":348,"context_line":"                   \u0027name\u0027: self.obj_name(),"},{"line_number":349,"context_line":"                   \u0027uuid\u0027: self.uuid,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_566869f3","line":346,"in_reply_to":"3f79a3b5_598f5822","updated":"2018-08-24 19:48:09.000000000","message":"Seen here:\n\nhttp://logs.openstack.org/58/540258/13/check/neutron-tempest-multinode-full/d533c9d/logs/screen-n-super-cond.txt.gz#_Aug_16_07_54_28_752780\n\nAug 16 07:54:28.752780 ubuntu-xenial-inap-mtl01-0001351415 nova-conductor[5429]: DEBUG nova.objects.instance_group [None req-d7cde4cb-1925-4107-841a-e7b72aab0f92 tempest-ServersOnMultiNodesTest-1829177035 tempest-ServersOnMultiNodesTest-1829177035] Lazy-loading \u0027hosts\u0027 on InstanceGroup uuid c23e0686-2e2c-4647-8515-3d00a6ea8f8d {{(pid\u003d6594) obj_load_attr /opt/stack/new/nova/nova/objects/instance_group.py:349}}\n\nThat is during a server create request.\n\nI don\u0027t see the same log message in the cell conductor logs during a move...which is kind of surprising.\n\n(later)\n\nOK I see that with your change we don\u0027t rely on the lazy-load if we\u0027re moving and hosts isn\u0027t set:\n\n# NOTE(melwitt): Proactively query for the instance group hosts instead of\n# relying on a lazy-load via the \u0027hosts\u0027 field of the InstanceGroup object.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e0f1ad2475b0fd145388ffb9048ebf244d88660c","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            raise exception.ObjectActionError("},{"line_number":344,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        LOG.debug(\"Lazy-loading \u0027%(attr)s\u0027 on %(name)s uuid %(uuid)s\","},{"line_number":347,"context_line":"                  {\u0027attr\u0027: attrname,"},{"line_number":348,"context_line":"                   \u0027name\u0027: self.obj_name(),"},{"line_number":349,"context_line":"                   \u0027uuid\u0027: self.uuid,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_598f5822","line":346,"in_reply_to":"3f79a3b5_a8273cc7","updated":"2018-08-23 21:08:30.000000000","message":"Ack, something to think about.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"}],"nova/scheduler/utils.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"081f96fadc8d8f03403d7b5b7f9fda063197692f","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":704,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":705,"context_line":"            hosts.extend(result)"},{"line_number":706,"context_line":"    return hosts"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"def setup_instance_group(context, request_spec):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_4c6eef2f","line":706,"updated":"2018-02-08 20:25:41.000000000","message":"This is genius.","commit_id":"074ebad3093376b4c2f3870c26fc9fccd510dbac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"081f96fadc8d8f03403d7b5b7f9fda063197692f","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    # NOTE(melwitt): Query all cells for the instance group members instead of"},{"line_number":717,"context_line":"    # relying on a lazy-load via the \u0027hosts\u0027 field of the InstanceGroup object."},{"line_number":718,"context_line":"    if (request_spec.instance_group and"},{"line_number":719,"context_line":"            not request_spec.instance_group.obj_attr_is_set(\u0027hosts\u0027)):"},{"line_number":720,"context_line":"        group \u003d request_spec.instance_group"},{"line_number":721,"context_line":"        group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_ec681b1e","line":719,"updated":"2018-02-08 20:25:41.000000000","message":"This should be:\n\n if not \u0027hosts\u0027 in request_spec.instance_group:\n\nfor modern-ness and clean-ness, but this will work.","commit_id":"074ebad3093376b4c2f3870c26fc9fccd510dbac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b3f16e03bae5467671d4ca523fdf324a26850e93","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    # NOTE(melwitt): Query all cells for the instance group members instead of"},{"line_number":717,"context_line":"    # relying on a lazy-load via the \u0027hosts\u0027 field of the InstanceGroup object."},{"line_number":718,"context_line":"    if (request_spec.instance_group and"},{"line_number":719,"context_line":"            not request_spec.instance_group.obj_attr_is_set(\u0027hosts\u0027)):"},{"line_number":720,"context_line":"        group \u003d request_spec.instance_group"},{"line_number":721,"context_line":"        group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_4fdee16d","line":719,"in_reply_to":"3fa0c359_ec681b1e","updated":"2018-02-08 20:40:19.000000000","message":"Dangit, I keep forgetting about that.","commit_id":"074ebad3093376b4c2f3870c26fc9fccd510dbac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a6088c62d59abd7f498857ebf0501db122bef5c6","unresolved":false,"context_lines":[{"line_number":684,"context_line":"            msg \u003d _(\"ServerGroupSoftAntiAffinityWeigher not configured\")"},{"line_number":685,"context_line":"            LOG.error(msg)"},{"line_number":686,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":687,"context_line":"        group_hosts \u003d set(_get_instance_group_hosts_all_cells(context, group))"},{"line_number":688,"context_line":"        user_hosts \u003d set(user_group_hosts) if user_group_hosts else set()"},{"line_number":689,"context_line":"        return GroupDetails(hosts\u003duser_hosts | group_hosts,"},{"line_number":690,"context_line":"                            policies\u003dgroup.policies, members\u003dgroup.members)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_785e76ea","line":687,"updated":"2018-04-04 23:28:20.000000000","message":"Here, we could decide whether to scatter-gather based on whether the context is already targeted to a cell? If it is, don\u0027t scatter-gather, else do.","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac938e6f22af0168dbcd5b0d609e8789fb9f2f60","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    return hosts"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"def setup_instance_group(context, request_spec):"},{"line_number":710,"context_line":"    \"\"\"Add group_hosts and group_policies fields to filter_properties dict"},{"line_number":711,"context_line":"    based on instance uuids provided in request_spec, if those instances are"},{"line_number":712,"context_line":"    belonging to a group."}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_22f52f84","line":709,"range":{"start_line":709,"start_character":4,"end_line":709,"end_character":24},"updated":"2018-04-04 21:42:15.000000000","message":"Looks like several operations calls this when they have a cell-targeted context, like for cold migrate, live migrate, rebuild / evacuate and unshelve. In those cases, couldn\u0027t we simply restrict the hosts to the ones in the cell that the instance is already in?","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a6088c62d59abd7f498857ebf0501db122bef5c6","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    return hosts"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"def setup_instance_group(context, request_spec):"},{"line_number":710,"context_line":"    \"\"\"Add group_hosts and group_policies fields to filter_properties dict"},{"line_number":711,"context_line":"    based on instance uuids provided in request_spec, if those instances are"},{"line_number":712,"context_line":"    belonging to a group."}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_d85ea211","line":709,"range":{"start_line":709,"start_character":4,"end_line":709,"end_character":24},"in_reply_to":"bf659307_22f52f84","updated":"2018-04-04 23:28:20.000000000","message":"As discussed on IRC, we could be more efficient here if we know we\u0027re going to restrict ourselves to same-cell for move operations by not querying all cells in that case.\n\nEach of the move methods in conductor/manager is decorated with @targets_cell which targets the context before passing it along. So that means in this method we could have an already-cell-targeted context.\n\nWe could decide whether or not to scatter-gather based on whether request_spec.requested_destination.cell is set. (And make sure we move all setup_instance_group calls *after* requested_destination.cell are set in conductor tasks.","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a6088c62d59abd7f498857ebf0501db122bef5c6","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    # NOTE(melwitt): Query all cells for the instance group members instead of"},{"line_number":717,"context_line":"    # relying on a lazy-load via the \u0027hosts\u0027 field of the InstanceGroup object."},{"line_number":718,"context_line":"    if (request_spec.instance_group and"},{"line_number":719,"context_line":"            \u0027hosts\u0027 not in request_spec.instance_group):"},{"line_number":720,"context_line":"        group \u003d request_spec.instance_group"},{"line_number":721,"context_line":"        group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_b8196e23","line":719,"updated":"2018-04-04 23:28:20.000000000","message":"We could have another condition here which checks:\n\n if \u0027requested_destination\u0027 in request_spec and\n     request_spec.requested_destination.cell:\n\nand do instead of scatter-gather:\n\n with request_spec.instance_group.obj_alternate_context(context):\n     request_spec.instance_group.get_hosts()\n\nand I think we would need to use obj_alternate_context because when the RequestSpec is queried in compute/api at the beginning of a move operation, the context isn\u0027t targeted yet, so the request_spec.instance_group object will also not have a _context targeted to a cell.\n\nSo, I think the bug I\u0027m trying to fix affects move operations as well as instance creates.","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8bb1eeb3bfcbf2b884f7ab747816112a7ba3169","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":687,"context_line":"        # NOTE(melwitt): If the context is already targeted to a cell (during a"},{"line_number":688,"context_line":"        # move operation), we don\u0027t need to scatter-gather."},{"line_number":689,"context_line":"        if context.db_connection:"},{"line_number":690,"context_line":"            # We don\u0027t need to target the group object\u0027s context because it was"},{"line_number":691,"context_line":"            # retrieved with the targeted context earlier in this method."},{"line_number":692,"context_line":"            group_hosts \u003d set(group.get_hosts())"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f2461850","line":689,"range":{"start_line":689,"start_character":11,"end_line":689,"end_character":32},"updated":"2018-05-03 21:10:41.000000000","message":"nit: we might want to consider adding a method on RequestContext to hide the internals of what a targeted contxt means, which would just be this, but we could add something like:\n\ndef is_targeted():\n    return context.db_connection is not None","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"789aea27dcfaf15630e0128f654a3f574c356fe3","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":687,"context_line":"        # NOTE(melwitt): If the context is already targeted to a cell (during a"},{"line_number":688,"context_line":"        # move operation), we don\u0027t need to scatter-gather."},{"line_number":689,"context_line":"        if context.db_connection:"},{"line_number":690,"context_line":"            # We don\u0027t need to target the group object\u0027s context because it was"},{"line_number":691,"context_line":"            # retrieved with the targeted context earlier in this method."},{"line_number":692,"context_line":"            group_hosts \u003d set(group.get_hosts())"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_d258bc57","line":689,"range":{"start_line":689,"start_character":11,"end_line":689,"end_character":32},"in_reply_to":"5f7c97a3_f2461850","updated":"2018-05-03 22:10:48.000000000","message":"Yeah, good point.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8bb1eeb3bfcbf2b884f7ab747816112a7ba3169","unresolved":false,"context_lines":[{"line_number":700,"context_line":""},{"line_number":701,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":702,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":703,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":704,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":705,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":706,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b2ed0027","line":703,"range":{"start_line":703,"start_character":30,"end_line":703,"end_character":56},"updated":"2018-05-03 21:10:41.000000000","message":"Why do we need to clone the object?","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef987846e8cfa26e78b48e1fcad00522954530a9","unresolved":false,"context_lines":[{"line_number":700,"context_line":""},{"line_number":701,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":702,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":703,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":704,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":705,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":706,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b90e3be3","line":703,"range":{"start_line":703,"start_character":30,"end_line":703,"end_character":56},"in_reply_to":"5f7c97a3_9d27b5b7","updated":"2018-05-04 13:41:15.000000000","message":"Nope, you\u0027re correct.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"789aea27dcfaf15630e0128f654a3f574c356fe3","unresolved":false,"context_lines":[{"line_number":700,"context_line":""},{"line_number":701,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":702,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":703,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":704,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":705,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":706,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_9d27b5b7","line":703,"range":{"start_line":703,"start_character":30,"end_line":703,"end_character":56},"in_reply_to":"5f7c97a3_b2ed0027","updated":"2018-05-03 22:10:48.000000000","message":"I think what I was thinking here is that the obj_alternate_context is going to mutate the cell_instance_group._context and to do this in a scatter-gather, we need those to be separate object copies. Am I mistaken about it?","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b006c0c233199ab52fe0c9b0078316504d7d0f50","unresolved":false,"context_lines":[{"line_number":700,"context_line":""},{"line_number":701,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":702,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":703,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":704,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":705,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":706,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_7dd09951","line":703,"range":{"start_line":703,"start_character":30,"end_line":703,"end_character":56},"in_reply_to":"5f7c97a3_b2ed0027","updated":"2018-05-03 21:56:50.000000000","message":"Presumably it\u0027s because we are doing this in parallel and can\u0027t target the object in multiple threads at the same time.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8bb1eeb3bfcbf2b884f7ab747816112a7ba3169","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            with group.obj_alternate_context(context):"},{"line_number":736,"context_line":"                group.hosts \u003d group.get_hosts()"},{"line_number":737,"context_line":"        else:"},{"line_number":738,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    if request_spec.instance_group and request_spec.instance_group.hosts:"},{"line_number":741,"context_line":"        group_hosts \u003d request_spec.instance_group.hosts"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_52b58ced","line":738,"updated":"2018-05-03 21:10:41.000000000","message":"OK thinking out loud, if I\u0027m creating a new instance, we get here from schedule_and_build_instances in conductor before we get to the scheduler. This is going to iterate all cells looking for hosts that members of the group are already in.\n\nIf I\u0027m creating a server in an anti-affinity group, then we need to iterate all cells to find all hosts that those instances are in since my new instance can\u0027t land on one of those hosts, and it should be possible to have members of an anti-affinity group in different cells.\n\nIf I\u0027m creating a server in an affinity group, then we\u0027re still iterating all cells looking for hosts on which the group members live, but because it\u0027s an affinity policy, the members should be in the same cell (although soft-affinity policy messes this up because we could technically put instances in the same group on different hosts in different cells). So just considering the strict affinity case, if the group has at least one member in it, we should know exactly which cell the new instance needs to go in, and we don\u0027t need to iterate all cells - but maybe that\u0027s a performance optimization for later? Also note that we could be racing if we have multiple server create requests for the same affinity group and the scheduler decides to put them each in different cells - the late affinity check in the compute won\u0027t resolve that because the upcall check is targeted to the cell the compute is in, and won\u0027t see any other hosts for other members in other cells. Separate bug though...","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fa2509f7ad62198871157bc7d4194847f9b453c9","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                                                     get_hosts_in_cell)"},{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_1c405432","line":842,"range":{"start_line":842,"start_character":39,"end_line":842,"end_character":63},"updated":"2018-07-25 08:18:40.000000000","message":"This means that while a cell is temporary down we can break the affinity rule. I think we know the members of the group here and we have InstanceMapping so we can figure out if there are members of this group in the down cell. If this is a group with affinity policy and there are members of the group in a cell that is down then we can fail this boot with NoValidHost to keep the affinity policy.\nI\u0027m totally OK to fix this in a separate patch later, but I suggest to put a TODO in the code.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e1b30cdc95e2e4b31888e95cccf2e7b2f1626550","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                                                     get_hosts_in_cell)"},{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_b39cabbe","line":842,"range":{"start_line":842,"start_character":39,"end_line":842,"end_character":63},"in_reply_to":"5f7c97a3_1c405432","updated":"2018-07-27 18:55:05.000000000","message":"That\u0027s a good point. Probably should be a separate patch since it\u0027s dealing with the multi-cell resiliency/handling of a down cell aspect and could tie in with that work and blueprint.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fa2509f7ad62198871157bc7d4194847f9b453c9","unresolved":false,"context_lines":[{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"},{"line_number":846,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_9c6d44cd","line":843,"range":{"start_line":843,"start_character":39,"end_line":843,"end_character":64},"updated":"2018-07-25 08:18:40.000000000","message":"Shouldn\u0027t we need to fail the boot in this case? I feel we silently ignoring a potential error case here.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"88a31182b53cce1677e8c72006327bfe557206c7","unresolved":false,"context_lines":[{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"},{"line_number":846,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_715ad2f3","line":843,"range":{"start_line":843,"start_character":39,"end_line":843,"end_character":64},"in_reply_to":"3f79a3b5_dcf3c59d","updated":"2018-08-08 07:29:09.000000000","message":"Opening a separate bug for this is fine by me.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e1b30cdc95e2e4b31888e95cccf2e7b2f1626550","unresolved":false,"context_lines":[{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"},{"line_number":846,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_93908f98","line":843,"range":{"start_line":843,"start_character":39,"end_line":843,"end_character":64},"in_reply_to":"5f7c97a3_9c6d44cd","updated":"2018-07-27 18:55:05.000000000","message":"Hm, yeah. I think you\u0027re right. Will address it in the next PS.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6ae4009ee64c9f7ca3e1adf7e393c3510d90651","unresolved":false,"context_lines":[{"line_number":840,"context_line":"    hosts \u003d []"},{"line_number":841,"context_line":"    for result in results.values():"},{"line_number":842,"context_line":"        if result not in (nova_context.did_not_respond_sentinel,"},{"line_number":843,"context_line":"                          nova_context.raised_exception_sentinel):"},{"line_number":844,"context_line":"            hosts.extend(result)"},{"line_number":845,"context_line":"    return hosts"},{"line_number":846,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_dcf3c59d","line":843,"range":{"start_line":843,"start_character":39,"end_line":843,"end_character":64},"in_reply_to":"5f7c97a3_9c6d44cd","updated":"2018-08-07 23:04:22.000000000","message":"That would be a different bug, which we should report/track but fix separately. This change is already complicated enough as it is.","commit_id":"83058b9a5e6ef82cbeb778682390a98846a68f27"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6dfb121577c9ec7fe70e2178f51aebc3ee14cbf6","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        return"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    try:"},{"line_number":792,"context_line":"        group \u003d objects.InstanceGroup.get_by_instance_uuid(context,"},{"line_number":793,"context_line":"                                                           instance_uuid)"},{"line_number":794,"context_line":"    except exception.InstanceGroupNotFound:"},{"line_number":795,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_3f37f901","line":792,"updated":"2018-08-23 01:44:09.000000000","message":"Bug 1788527 per our discussion today (unrelated to this patch).","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e0f1ad2475b0fd145388ffb9048ebf244d88660c","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        return"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    try:"},{"line_number":792,"context_line":"        group \u003d objects.InstanceGroup.get_by_instance_uuid(context,"},{"line_number":793,"context_line":"                                                           instance_uuid)"},{"line_number":794,"context_line":"    except exception.InstanceGroupNotFound:"},{"line_number":795,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_d4cb2d50","line":792,"in_reply_to":"3f79a3b5_3f37f901","updated":"2018-08-23 21:08:30.000000000","message":"Thx.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"711829d10557d9dfa51beb73cfde943c0624ce5d","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        return"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    try:"},{"line_number":792,"context_line":"        group \u003d objects.InstanceGroup.get_by_instance_uuid(context,"},{"line_number":793,"context_line":"                                                           instance_uuid)"},{"line_number":794,"context_line":"    except exception.InstanceGroupNotFound:"},{"line_number":795,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_bd575858","line":792,"in_reply_to":"3f79a3b5_696b4a84","updated":"2018-08-24 23:10:19.000000000","message":"I assume this is part of your other comment, before you saw the proactively query to avoid a lazy-load?","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bac4b2be9444ee88098aff5334b661e0551f5265","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        return"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    try:"},{"line_number":792,"context_line":"        group \u003d objects.InstanceGroup.get_by_instance_uuid(context,"},{"line_number":793,"context_line":"                                                           instance_uuid)"},{"line_number":794,"context_line":"    except exception.InstanceGroupNotFound:"},{"line_number":795,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_b842063d","line":792,"in_reply_to":"3f79a3b5_bd575858","updated":"2018-08-24 23:43:17.000000000","message":"Yeah.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        return"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    try:"},{"line_number":792,"context_line":"        group \u003d objects.InstanceGroup.get_by_instance_uuid(context,"},{"line_number":793,"context_line":"                                                           instance_uuid)"},{"line_number":794,"context_line":"    except exception.InstanceGroupNotFound:"},{"line_number":795,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_696b4a84","line":792,"in_reply_to":"3f79a3b5_d4cb2d50","updated":"2018-08-24 19:48:09.000000000","message":"So here we turn around and load up the group and if group.hosts is called, it will lazy-load using the given context, which for a new server create is untargeted, but for a move is targeted to the cell we\u0027re moving within.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":814,"context_line":"            msg \u003d _(\"ServerGroupSoftAntiAffinityWeigher not configured\")"},{"line_number":815,"context_line":"            LOG.error(msg)"},{"line_number":816,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":817,"context_line":"        # NOTE(melwitt): If the context is already targeted to a cell (during a"},{"line_number":818,"context_line":"        # move operation), we don\u0027t need to scatter-gather."},{"line_number":819,"context_line":"        if context.db_connection:"},{"line_number":820,"context_line":"            # We don\u0027t need to target the group object\u0027s context because it was"},{"line_number":821,"context_line":"            # retrieved with the targeted context earlier in this method."},{"line_number":822,"context_line":"            group_hosts \u003d set(group.get_hosts())"},{"line_number":823,"context_line":"        else:"},{"line_number":824,"context_line":"            group_hosts \u003d set(_get_instance_group_hosts_all_cells(context,"},{"line_number":825,"context_line":"                                                                  group))"},{"line_number":826,"context_line":"        user_hosts \u003d set(user_group_hosts) if user_group_hosts else set()"},{"line_number":827,"context_line":"        return GroupDetails(hosts\u003duser_hosts | group_hosts,"},{"line_number":828,"context_line":"                            policy\u003dgroup.policy, members\u003dgroup.members)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_2930f29e","line":825,"range":{"start_line":817,"start_character":8,"end_line":825,"end_character":73},"updated":"2018-08-24 19:48:09.000000000","message":"Isn\u0027t this all totally redundant? Like, couldn\u0027t we just avoid all of this is user_group_hosts is not None?","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"711829d10557d9dfa51beb73cfde943c0624ce5d","unresolved":false,"context_lines":[{"line_number":814,"context_line":"            msg \u003d _(\"ServerGroupSoftAntiAffinityWeigher not configured\")"},{"line_number":815,"context_line":"            LOG.error(msg)"},{"line_number":816,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":817,"context_line":"        # NOTE(melwitt): If the context is already targeted to a cell (during a"},{"line_number":818,"context_line":"        # move operation), we don\u0027t need to scatter-gather."},{"line_number":819,"context_line":"        if context.db_connection:"},{"line_number":820,"context_line":"            # We don\u0027t need to target the group object\u0027s context because it was"},{"line_number":821,"context_line":"            # retrieved with the targeted context earlier in this method."},{"line_number":822,"context_line":"            group_hosts \u003d set(group.get_hosts())"},{"line_number":823,"context_line":"        else:"},{"line_number":824,"context_line":"            group_hosts \u003d set(_get_instance_group_hosts_all_cells(context,"},{"line_number":825,"context_line":"                                                                  group))"},{"line_number":826,"context_line":"        user_hosts \u003d set(user_group_hosts) if user_group_hosts else set()"},{"line_number":827,"context_line":"        return GroupDetails(hosts\u003duser_hosts | group_hosts,"},{"line_number":828,"context_line":"                            policy\u003dgroup.policy, members\u003dgroup.members)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_3d16e8a9","line":825,"range":{"start_line":817,"start_character":8,"end_line":825,"end_character":73},"in_reply_to":"3f79a3b5_2930f29e","updated":"2018-08-24 23:10:19.000000000","message":"Maybe? What I was trying to do here is keep the behavior we already have, that is, replace the old set(group.get_hosts()) with the scatter-gather if not targeted. Are you suggesting a change in behavior with this patch or am I missing something?","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bac4b2be9444ee88098aff5334b661e0551f5265","unresolved":false,"context_lines":[{"line_number":814,"context_line":"            msg \u003d _(\"ServerGroupSoftAntiAffinityWeigher not configured\")"},{"line_number":815,"context_line":"            LOG.error(msg)"},{"line_number":816,"context_line":"            raise exception.UnsupportedPolicyException(reason\u003dmsg)"},{"line_number":817,"context_line":"        # NOTE(melwitt): If the context is already targeted to a cell (during a"},{"line_number":818,"context_line":"        # move operation), we don\u0027t need to scatter-gather."},{"line_number":819,"context_line":"        if context.db_connection:"},{"line_number":820,"context_line":"            # We don\u0027t need to target the group object\u0027s context because it was"},{"line_number":821,"context_line":"            # retrieved with the targeted context earlier in this method."},{"line_number":822,"context_line":"            group_hosts \u003d set(group.get_hosts())"},{"line_number":823,"context_line":"        else:"},{"line_number":824,"context_line":"            group_hosts \u003d set(_get_instance_group_hosts_all_cells(context,"},{"line_number":825,"context_line":"                                                                  group))"},{"line_number":826,"context_line":"        user_hosts \u003d set(user_group_hosts) if user_group_hosts else set()"},{"line_number":827,"context_line":"        return GroupDetails(hosts\u003duser_hosts | group_hosts,"},{"line_number":828,"context_line":"                            policy\u003dgroup.policy, members\u003dgroup.members)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_98438a3f","line":825,"range":{"start_line":817,"start_character":8,"end_line":825,"end_character":73},"in_reply_to":"3f79a3b5_3d16e8a9","updated":"2018-08-24 23:43:17.000000000","message":"I would be OK with doing what you have here for backward compat since we\u0027ll want to backport this change, and then work on dropping this old suspiciously redundant code in Stein so we don\u0027t risk a regression in stable.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":830,"context_line":""},{"line_number":831,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":832,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":833,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":834,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":835,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":836,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_09cdf6b5","line":833,"range":{"start_line":833,"start_character":30,"end_line":833,"end_character":56},"updated":"2018-08-24 19:48:09.000000000","message":"I can\u0027t remember why you needed to clone this. Since I\u0027ve had to ask multiple times now it\u0027d probably be good to leave a comment.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b26d89542e3533c193e5e4323b2f0f931435f372","unresolved":false,"context_lines":[{"line_number":830,"context_line":""},{"line_number":831,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":832,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":833,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":834,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":835,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":836,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_89e906e4","line":833,"range":{"start_line":833,"start_character":30,"end_line":833,"end_character":56},"in_reply_to":"3f79a3b5_09cdf6b5","updated":"2018-08-24 19:49:20.000000000","message":"https://review.openstack.org/#/c/540258/8/nova/scheduler/utils.py@703","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"711829d10557d9dfa51beb73cfde943c0624ce5d","unresolved":false,"context_lines":[{"line_number":830,"context_line":""},{"line_number":831,"context_line":"def _get_instance_group_hosts_all_cells(context, instance_group):"},{"line_number":832,"context_line":"    def get_hosts_in_cell(cell_context):"},{"line_number":833,"context_line":"        cell_instance_group \u003d instance_group.obj_clone()"},{"line_number":834,"context_line":"        with cell_instance_group.obj_alternate_context(cell_context):"},{"line_number":835,"context_line":"            return cell_instance_group.get_hosts()"},{"line_number":836,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_5d1964d4","line":833,"range":{"start_line":833,"start_character":30,"end_line":833,"end_character":56},"in_reply_to":"3f79a3b5_89e906e4","updated":"2018-08-24 23:10:19.000000000","message":"Sure, I can add a comment here.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":849,"context_line":""},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"def setup_instance_group(context, request_spec):"},{"line_number":852,"context_line":"    \"\"\"Add group_hosts and group_policies fields to filter_properties dict"},{"line_number":853,"context_line":"    based on instance uuids provided in request_spec, if those instances are"},{"line_number":854,"context_line":"    belonging to a group."},{"line_number":855,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_361ccd76","line":852,"range":{"start_line":852,"start_character":52,"end_line":852,"end_character":69},"updated":"2018-08-24 19:48:09.000000000","message":"Christ this comment is old.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":867,"context_line":"        # targeted."},{"line_number":868,"context_line":"        if context.db_connection:"},{"line_number":869,"context_line":"            with group.obj_alternate_context(context):"},{"line_number":870,"context_line":"                group.hosts \u003d group.get_hosts()"},{"line_number":871,"context_line":"        else:"},{"line_number":872,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":873,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_0923b6a8","line":870,"updated":"2018-08-24 19:48:09.000000000","message":"Couldn\u0027t this just be:\n\ngroup.hosts\n\nTo trigger the lazy-load with the targeted context? It would admittedly look weird.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"711829d10557d9dfa51beb73cfde943c0624ce5d","unresolved":false,"context_lines":[{"line_number":867,"context_line":"        # targeted."},{"line_number":868,"context_line":"        if context.db_connection:"},{"line_number":869,"context_line":"            with group.obj_alternate_context(context):"},{"line_number":870,"context_line":"                group.hosts \u003d group.get_hosts()"},{"line_number":871,"context_line":"        else:"},{"line_number":872,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":873,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_fd8070c1","line":870,"in_reply_to":"3f79a3b5_0923b6a8","updated":"2018-08-24 23:10:19.000000000","message":"I guess so? I guess I\u0027d want it to be whatever reads best to code readers. If you think a plain \"group.hosts\" conveys the meaning better (force a lazy-load), then I can change it.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bac4b2be9444ee88098aff5334b661e0551f5265","unresolved":false,"context_lines":[{"line_number":867,"context_line":"        # targeted."},{"line_number":868,"context_line":"        if context.db_connection:"},{"line_number":869,"context_line":"            with group.obj_alternate_context(context):"},{"line_number":870,"context_line":"                group.hosts \u003d group.get_hosts()"},{"line_number":871,"context_line":"        else:"},{"line_number":872,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":873,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_587bb28a","line":870,"in_reply_to":"3f79a3b5_fd8070c1","updated":"2018-08-24 23:43:17.000000000","message":"No group.hosts is clearly not more obvious, and would require a comment. I\u0027ve seen it in tests for other objects which is what made me think of it, but I always have to remember about lazy-loading setting the field.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5de1e3ff4bdfec0f4401f4f868cdbfa1ecc2c1f8","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        else:"},{"line_number":872,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":873,"context_line":""},{"line_number":874,"context_line":"    if request_spec.instance_group and request_spec.instance_group.hosts:"},{"line_number":875,"context_line":"        group_hosts \u003d request_spec.instance_group.hosts"},{"line_number":876,"context_line":"    else:"},{"line_number":877,"context_line":"        group_hosts \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_e93e7a89","line":874,"range":{"start_line":874,"start_character":35,"end_line":874,"end_character":72},"updated":"2018-08-24 19:48:09.000000000","message":"So we get this set above by reference right?","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"711829d10557d9dfa51beb73cfde943c0624ce5d","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        else:"},{"line_number":872,"context_line":"            group.hosts \u003d _get_instance_group_hosts_all_cells(context, group)"},{"line_number":873,"context_line":""},{"line_number":874,"context_line":"    if request_spec.instance_group and request_spec.instance_group.hosts:"},{"line_number":875,"context_line":"        group_hosts \u003d request_spec.instance_group.hosts"},{"line_number":876,"context_line":"    else:"},{"line_number":877,"context_line":"        group_hosts \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_5d67244e","line":874,"range":{"start_line":874,"start_character":35,"end_line":874,"end_character":72},"in_reply_to":"3f79a3b5_e93e7a89","updated":"2018-08-24 23:10:19.000000000","message":"Yes, should be. I set group \u003d request_spec.instance_group and loaded \u0027hosts\u0027 to \u0027group\u0027 to make code lines shorter, but refer to the same thing. These shouldn\u0027t be just \u0027group\u0027 because \u0027group\u0027 is only added as a reference if the hosts aren\u0027t yet loaded.","commit_id":"a2e994e0526b79772375ea81ce8d63eb81412ce6"}],"nova/tests/unit/scheduler/test_scheduler_utils.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ffc71c49e2527dbf3e4cf3ae97ca6aabe7cfb4f0","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        scheduler_utils.setup_instance_group(ctxt, req_spec)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        # Verify that the \u0027hosts\u0027 field has gained the instance2 host"},{"line_number":492,"context_line":"        self.assertItemsEqual([\u0027fake-host\u0027, \u0027other-fake-host\u0027], group.hosts)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_550f4e36","line":492,"updated":"2018-02-08 22:43:04.000000000","message":"I had to change from assertEqual to assertItemsEqual so that the order of the items won\u0027t affect the comparison.","commit_id":"4813c807ea0b8a8f5cb9b9f624cab41352ae043d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8bb1eeb3bfcbf2b884f7ab747816112a7ba3169","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                          self.context, spec)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"class SchedulerUtilsMultipleCellsTestCase(test.NoDBTestCase):"},{"line_number":415,"context_line":"    USES_DB_SELF \u003d True"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_setup_instance_group(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_52cb4ca4","line":414,"updated":"2018-05-03 21:10:41.000000000","message":"I kind of wish we were using a functional test for all of this, because it\u0027s pretty complicated with multiple cells and multiple services (API, conductor, scheduler), and could be easy to mock something out that isn\u0027t realistic.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e60a51eb909b99353bacb3c5dc6679c7d16bcfb4","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                          self.context, spec)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"class SchedulerUtilsMultipleCellsTestCase(test.NoDBTestCase):"},{"line_number":415,"context_line":"    USES_DB_SELF \u003d True"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_setup_instance_group(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c86ca86c","line":414,"in_reply_to":"5f7c97a3_52cb4ca4","updated":"2018-07-10 14:57:25.000000000","message":"What about a tempest test? https://review.openstack.org/#/c/581349/ It fails now as it reproduces the problem.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cc6945ed8a820fe5b0dfc0ad13e330285d84ced","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        # Make a group with instance[0-1, 3] in it. This is to verify we don\u0027t"},{"line_number":478,"context_line":"        # look in cell0 for group members\u0027 hosts."},{"line_number":479,"context_line":"        groupA \u003d objects.InstanceGroup(context\u003dctxt, uuid\u003duuids.group,"},{"line_number":480,"context_line":"                                       members\u003d[instance0.uuid, instance1.uuid,"},{"line_number":481,"context_line":"                                                instance3.uuid])"},{"line_number":482,"context_line":"        # We\u0027ll need this for the targeted context case. setup_instance_group"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_323b3039","line":479,"range":{"start_line":479,"start_character":25,"end_line":479,"end_character":38},"updated":"2018-05-03 21:43:29.000000000","message":"nit: policies\u003d[\u0027anti-affinity\u0027] since that\u0027s the only policy that makes sense here since inst1 and inst3 are in different cells.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"789aea27dcfaf15630e0128f654a3f574c356fe3","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        # Make a group with instance[0-1, 3] in it. This is to verify we don\u0027t"},{"line_number":478,"context_line":"        # look in cell0 for group members\u0027 hosts."},{"line_number":479,"context_line":"        groupA \u003d objects.InstanceGroup(context\u003dctxt, uuid\u003duuids.group,"},{"line_number":480,"context_line":"                                       members\u003d[instance0.uuid, instance1.uuid,"},{"line_number":481,"context_line":"                                                instance3.uuid])"},{"line_number":482,"context_line":"        # We\u0027ll need this for the targeted context case. setup_instance_group"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_dd90cd98","line":479,"range":{"start_line":479,"start_character":25,"end_line":479,"end_character":38},"in_reply_to":"5f7c97a3_323b3039","updated":"2018-05-03 22:10:48.000000000","message":"Ack.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cc6945ed8a820fe5b0dfc0ad13e330285d84ced","unresolved":false,"context_lines":[{"line_number":497,"context_line":"                                       uuid\u003duuids.other_group,"},{"line_number":498,"context_line":"                                       members\u003d[instance2.uuid,"},{"line_number":499,"context_line":"                                                instance4.uuid],"},{"line_number":500,"context_line":"                                       policies\u003d[\u0027affinity\u0027])"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        # And write it to the database because _get_group_details will query it"},{"line_number":503,"context_line":"        groupB.create()"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_d2751cfc","line":500,"range":{"start_line":500,"start_character":39,"end_line":500,"end_character":60},"updated":"2018-05-03 21:43:29.000000000","message":"This doesn\u0027t really make sense because inst2 and inst4 are in different cells, which would violate a strict affinity policy because if they are in different cells they are obviously on different hosts. The only way this can happen is if you created inst2 and inst4 concurrently and the scheduler put them in different cells (as noted in the other part of this change).","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"789aea27dcfaf15630e0128f654a3f574c356fe3","unresolved":false,"context_lines":[{"line_number":497,"context_line":"                                       uuid\u003duuids.other_group,"},{"line_number":498,"context_line":"                                       members\u003d[instance2.uuid,"},{"line_number":499,"context_line":"                                                instance4.uuid],"},{"line_number":500,"context_line":"                                       policies\u003d[\u0027affinity\u0027])"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        # And write it to the database because _get_group_details will query it"},{"line_number":503,"context_line":"        groupB.create()"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_5d7d9d6c","line":500,"range":{"start_line":500,"start_character":39,"end_line":500,"end_character":60},"in_reply_to":"5f7c97a3_d2751cfc","updated":"2018-05-03 22:10:48.000000000","message":"Yeah, I think this goes back to what I mentioned on IRC about how I kept thinking \"multiple cases of affinity per cell\" which is not really a thing. Will fix.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cc6945ed8a820fe5b0dfc0ad13e330285d84ced","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        scheduler_utils.setup_instance_group(ctxt, req_spec)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        # Verify that the \u0027hosts\u0027 field has gained the instance[2, 4] hosts"},{"line_number":512,"context_line":"        self.assertItemsEqual([\u0027cell1-host\u0027, \u0027cell2-host\u0027, \u0027other-cell1-host\u0027,"},{"line_number":513,"context_line":"                               \u0027other-cell2-host\u0027], groupA.hosts)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"        # Now simulate a move operation where the context is already targeted"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_7260c833","line":512,"range":{"start_line":512,"start_character":31,"end_line":512,"end_character":57},"updated":"2018-05-03 21:43:29.000000000","message":"Why would these hosts be in here? These are for the instances in groupA.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"789aea27dcfaf15630e0128f654a3f574c356fe3","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        scheduler_utils.setup_instance_group(ctxt, req_spec)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        # Verify that the \u0027hosts\u0027 field has gained the instance[2, 4] hosts"},{"line_number":512,"context_line":"        self.assertItemsEqual([\u0027cell1-host\u0027, \u0027cell2-host\u0027, \u0027other-cell1-host\u0027,"},{"line_number":513,"context_line":"                               \u0027other-cell2-host\u0027], groupA.hosts)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"        # Now simulate a move operation where the context is already targeted"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_fd69098b","line":512,"range":{"start_line":512,"start_character":31,"end_line":512,"end_character":57},"in_reply_to":"5f7c97a3_7260c833","updated":"2018-05-03 22:10:48.000000000","message":"They were added by the first call on L488 where the scenario is, boot an instance with groupA and no policy. Then setup_instance_group is called a second time with an instance in groupB to force a lookup of groupB\u0027s hosts.\n\nI need to rework this test to make sense in the real world, I think. I was only focused on covering the code paths.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cc6945ed8a820fe5b0dfc0ad13e330285d84ced","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        req_spec.instance_uuid \u003d instance1.uuid"},{"line_number":518,"context_line":"        # Use the cloned group we made earlier."},{"line_number":519,"context_line":"        req_spec.instance_group \u003d groupA_clone"},{"line_number":520,"context_line":"        with nova_context.target_cell(ctxt, cell2) as cctxt:"},{"line_number":521,"context_line":"            scheduler_utils.setup_instance_group(cctxt, req_spec)"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"        # Verify that the \u0027hosts\u0027 field has been populated only with the"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f28e18cf","line":520,"updated":"2018-05-03 21:43:29.000000000","message":"This doesn\u0027t make sense - if we\u0027re moving inst1 and that is in cell1, we shouldn\u0027t ever be targeting cell2 here.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cc6945ed8a820fe5b0dfc0ad13e330285d84ced","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        req_spec.instance_uuid \u003d instance2.uuid"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        # Again, simulate that we\u0027re already targeted during a move operation"},{"line_number":532,"context_line":"        with nova_context.target_cell(ctxt, cell2) as cctxt:"},{"line_number":533,"context_line":"            scheduler_utils.setup_instance_group(cctxt, req_spec)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"        # Verify that the \u0027hosts\u0027 field has gained the instance4 host"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_924b2486","line":532,"updated":"2018-05-03 21:43:29.000000000","message":"Again, instance2 is in cell1 so we shouldn\u0027t ever be targeting cell2 for a move operation on instance2.","commit_id":"20c31aa7746b541c1bcd3d295591a55144057e9a"}]}
