)]}'
{"nova/filters.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"08e41bda4ab1e7bb24eca9317ea3573cbd44d9b6","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # If we\u0027re filtering hosts to get alternates the"},{"line_number":117,"context_line":"                # spec_obj.instance_uuid is unset."},{"line_number":118,"context_line":"                inst_uuid \u003d (spec_obj.instance_uuid"},{"line_number":119,"context_line":"                             if \u0027instance_uuid\u0027 in spec_obj else \u0027n/a\u0027)"},{"line_number":120,"context_line":"            msg_dict \u003d {\"inst_uuid\": inst_uuid,"},{"line_number":121,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":122,"context_line":"                       }"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_6267e4b9","line":119,"range":{"start_line":119,"start_character":65,"end_line":119,"end_character":70},"updated":"2018-07-19 07:49:33.000000000","message":"small inconsistency. Here the code uses \u0027n\\a\u0027 for multi create alternate filtering but in the NUMATopologyFilter the codes uses None for the same situation. Both are just used for logging so not a big deal.","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf20c937b11817b1dc9303f0508c9f12a70113ca","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                # If we\u0027re filtering hosts to get alternates the"},{"line_number":117,"context_line":"                # spec_obj.instance_uuid is unset."},{"line_number":118,"context_line":"                inst_uuid \u003d (spec_obj.instance_uuid"},{"line_number":119,"context_line":"                             if \u0027instance_uuid\u0027 in spec_obj else \u0027n/a\u0027)"},{"line_number":120,"context_line":"            msg_dict \u003d {\"inst_uuid\": inst_uuid,"},{"line_number":121,"context_line":"                        \"str_results\": str(full_filter_results),"},{"line_number":122,"context_line":"                       }"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a17c10ea","line":119,"range":{"start_line":119,"start_character":65,"end_line":119,"end_character":70},"in_reply_to":"5f7c97a3_6267e4b9","updated":"2018-07-19 16:01:45.000000000","message":"This is intentional. Here we\u0027re specifically putting the inst_uuid in the message itself. In the NUMATopologyFilter it\u0027s passing it on the instance_uuid kwarg, and if that\u0027s None then oslo.log will just not add the context, but oslo.log probably doesn\u0027t like an instance_uuid\u003d\u0027n/a\u0027 kwarg value.","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"57c8ecd7f5f171d21dc4f474cbcb6d2ca60dc605","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        selections_to_return \u003d []"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        for num in range(num_instances):"},{"line_number":311,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":312,"context_line":"            if not hosts:"},{"line_number":313,"context_line":"                # No hosts left, so break here, and the"},{"line_number":314,"context_line":"                # _ensure_sufficient_hosts() call below will handle this."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_cbcabe44","line":311,"updated":"2018-07-17 20:49:52.000000000","message":"We\u0027d have to do the same here.","commit_id":"b43dd2a5f46636364c6f71fed1969679058c65c6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"57c8ecd7f5f171d21dc4f474cbcb6d2ca60dc605","unresolved":false,"context_lines":[{"line_number":356,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":357,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":358,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":359,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":360,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":361,"context_line":"        # item per instance, and each item will be a list of Selection objects"},{"line_number":362,"context_line":"        # representing the selected host along with alternates from the same"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8bd046f6","line":359,"updated":"2018-07-17 20:49:52.000000000","message":"Wouldn\u0027t we need to do the same here?","commit_id":"b43dd2a5f46636364c6f71fed1969679058c65c6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"49ea2df0492d5ec149913f3539845bbeec085160","unresolved":false,"context_lines":[{"line_number":356,"context_line":"            # The selected_hosts have all had resources \u0027claimed\u0027 via"},{"line_number":357,"context_line":"            # _consume_selected_host, so we need to filter/weigh and sort the"},{"line_number":358,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":359,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":360,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":361,"context_line":"        # item per instance, and each item will be a list of Selection objects"},{"line_number":362,"context_line":"        # representing the selected host along with alternates from the same"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_cb387e3c","line":359,"in_reply_to":"5f7c97a3_8bd046f6","updated":"2018-07-17 20:51:57.000000000","message":"Maybe this one doesn\u0027t matter because at this point we\u0027ve already gone through and \u0027claimed\u0027 all primary hosts, anything selected from here is now an alternate, and if you\u0027re hitting reschedules with alternates for an anti-affinity group, the compute is going to handle that.","commit_id":"b43dd2a5f46636364c6f71fed1969679058c65c6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"89f05353b44de7028494301900ae394da63a0948","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0c4f558c","line":199,"updated":"2018-07-18 18:08:34.000000000","message":"Agreed from the ML post that this is ... hairy. And it\u0027s especially unfortunate considering we _had_ a list of all the corresponding request specs but did _not_ pass them along for scheduling.\n\nIt seems like the correct way to fix this would be to send the list of request specs to the scheduler instead of just taking the first one, but we can\u0027t do that because it would require an RPC bump for select_destinations. Is that right?","commit_id":"951ce07601ef3a750f3f27939a78d1cf41d3f644"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3fee883d7c66fd0111b279a84d65cea9dc0e575d","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_39fdb03a","line":199,"in_reply_to":"5f7c97a3_0c4f558c","updated":"2018-07-18 21:19:37.000000000","message":"Yup. Plus, then we don\u0027t need the list of instance_uuids because each RequestSpec has an instance_uuid field in it - so we start to get into a mess about how much is too much and what\u0027s the long-term interface that we want? Because even RequestSpec.num_instances isn\u0027t needed anymore as long as instance_uuids is always passed in, and it should be since Pike.\n\nWe wouldn\u0027t need this change if we went with the alternative https://review.openstack.org/#/c/583351/ but that\u0027s got it\u0027s own issues, and I think this and that fix can co-exist. For example, I think the change to unset RequestSpec.instance_uuid when getting alternate hosts in *this* change is required regardless since it never made sense to run through the ServerGroupAntiAffinityFilter with a RequestSpec.instance_uuid set since you can\u0027t fail the selected host and hit an alternate that is the same host in an anti-affinity group.","commit_id":"951ce07601ef3a750f3f27939a78d1cf41d3f644"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"861746d111c4912e8dfd2926058c1264cb88a02e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b49c67bf","line":199,"in_reply_to":"5f7c97a3_39fdb03a","updated":"2018-07-18 21:37:17.000000000","message":"Sigh ... yeah. I understand. I\u0027d think the interface we want is for select_destinations to take a list of request specs and ditch the instance_uuids and RequestSpec.num_instances.\n\nBut I understand we\u0027re trying to just stop the bleeding for now, so in that context, this approach seems as good as any. I don\u0027t have a better idea.","commit_id":"951ce07601ef3a750f3f27939a78d1cf41d3f644"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf20c937b11817b1dc9303f0508c9f12a70113ca","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":372,"context_line":"            # We have to temporarily unset the RequestSpec.instance_uuid since"},{"line_number":373,"context_line":"            # it can mess with certain filters in a multi-create scenario."},{"line_number":374,"context_line":"            delattr(spec_obj, \u0027instance_uuid\u0027)"},{"line_number":375,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":376,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":377,"context_line":"        # This is the overall list of values to be returned. There will be one"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_c19b4c13","line":374,"updated":"2018-07-19 16:01:45.000000000","message":"Another thing I thought about with this is, as a mega hack, we could temporarily set a non-field attribute on the spec_obj while we run it through the filters again (via the call to _get_sorted_hosts) and then the ServerGroupAntiAffinityFilter would just look for that attribute and do it\u0027s thing, maybe something like:\n\nwith utils.temporary_mutation(spec_obj, getting_alternates\u003dTrue):\n    hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)\n\nThen the ServerGroupAntiAffinityFilter would just do something like:\n\ngetting_alternates \u003d spec_obj.getting_alternates if \u0027getting_alternates\u0027 in spec_obj else False\nif not getting_alternates and spec_obj.instance_uuid in host_state.instances.keys():\n    return True","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45ffb472937c971cffbdc24a43ff4e15a21cd650","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":372,"context_line":"            # We have to temporarily unset the RequestSpec.instance_uuid since"},{"line_number":373,"context_line":"            # it can mess with certain filters in a multi-create scenario."},{"line_number":374,"context_line":"            delattr(spec_obj, \u0027instance_uuid\u0027)"},{"line_number":375,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":376,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":377,"context_line":"        # This is the overall list of values to be returned. There will be one"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_64f7e68d","line":374,"in_reply_to":"5f7c97a3_c19b4c13","updated":"2018-07-19 16:26:52.000000000","message":"The main point of this is, you can\u0027t lazy-load RequestSpec.instance_uuid so any out of tree filters that are relying on it will explode like ServerGroupAntiAffinityFilter would if I hadn\u0027t added a check for it being set. Granted, any filters relying on spec_obj.instance_uuid are going to potentially be broken in a multi-create scenario as well, so maybe they should fail, but they could just be using it for logging like the NUMAToplogyFilter was.\n\nAlternatively, we could temporarily set a sentinel that\u0027s not a real instance so it would never be part of host_state.instances while filtering for alternative hosts, but that could also get logged and would be weird.","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ffb7ca625bb6bc9ff0ca5838646998b936e41e06","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            for host in hosts:"},{"line_number":402,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":403,"context_line":"                    break"},{"line_number":404,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":405,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"},{"line_number":406,"context_line":"                        alt_uuid \u003d host.uuid"},{"line_number":407,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_4a6af11a","line":404,"range":{"start_line":404,"start_character":51,"end_line":404,"end_character":77},"updated":"2018-07-19 17:52:27.000000000","message":"Hmm, now because of this I\u0027m not totally sure we need the delattr above.\n\nAssuming we have a scenario like in the gate (tempest):\n\n1. we have two hosts\n2. create 2 servers in the same anti-affinity group in the same request\n3. with the fix in this patch for the ServerGroupAntiAffinityFilter, each server should get a distinct host (and that\u0027s what we assert from the functional test)\n\nThat would mean we\u0027d have both hosts in selected_hosts, and even if we re-filter to get alternates and the ServerGroupAntiAffinityFilter returns one of those already selected hosts because of the \"if spec_obj.instance_uuid in host_state.intsances.keys(): return True\" condition, that host should get filtered out as an alternate here on L404. Which means we shouldn\u0027t have a case where an alternate for a failed host would put the instance on the other host where the other server is from the anti-affinity filter.","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2f4c9044d55bea57aa7293029589cd7f8c7b7556","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            for host in hosts:"},{"line_number":402,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":403,"context_line":"                    break"},{"line_number":404,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":405,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"},{"line_number":406,"context_line":"                        alt_uuid \u003d host.uuid"},{"line_number":407,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_7a568ccf","line":404,"range":{"start_line":404,"start_character":51,"end_line":404,"end_character":77},"in_reply_to":"5f7c97a3_4a6af11a","updated":"2018-07-20 09:58:22.000000000","message":"OK so there will be no alternate provided for the host that are already selected. And during alternate gathering the RequestSpec.instance_uuid will be the instance.uuid we are searching the alternatives for. But when we do multi create we are not searching alternates for a single instance.uuid but a set of instance.uuid but still the RequestSpec can only points to one of those instances. Fortunately every instance are the same from affinity/anti-affinity perspective in a multi create request.\n\nThis works for anti-affinity as we don\u0027t select the same host ever as multi create alternative. But I guess it is not good for multi create with affinity as in that case there will be no alternatives at all due to this check. However this is a different problem we don\u0027t have to solve it now.","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ada9b3214df7b1ebd7105160f774d916b798536e","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            for host in hosts:"},{"line_number":402,"context_line":"                if len(selected_plus_alts) \u003e\u003d num_alts + 1:"},{"line_number":403,"context_line":"                    break"},{"line_number":404,"context_line":"                if host.cell_uuid \u003d\u003d cell_uuid and host not in selected_hosts:"},{"line_number":405,"context_line":"                    if alloc_reqs_by_rp_uuid is not None:"},{"line_number":406,"context_line":"                        alt_uuid \u003d host.uuid"},{"line_number":407,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1392e358","line":404,"range":{"start_line":404,"start_character":51,"end_line":404,"end_character":77},"in_reply_to":"5f7c97a3_7a568ccf","updated":"2018-07-20 12:47:15.000000000","message":"\u003e But I guess it is not good for multi create with affinity as in that case there will be no alternatives at all due to this check. However this is a different problem we don\u0027t have to solve it now.\n\nYeah that\u0027s true we\u0027d never have alternates for an affinity group since we know the one host that must be chosen once at least one member of the group is on that host. I\u0027m not really sure if rescheduling *before* alternates in Queens would have worked all that well either, because if at least one member of the group landed on the host, and the others failed, they can\u0027t go anywhere else and they\u0027ll die with NoValidHost (same as no alternates).","commit_id":"5361ab03cd8a537a2b005d79376a57a9fd29de11"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d90a8933dad7e90297660022183a1faa0f5de350","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_f9cdbd5d","line":199,"updated":"2018-07-20 19:42:33.000000000","message":"I\u0027ve read the above comment and code probably six times now and I\u0027m still perplexed as to why this is necessary. :(\n\nWhy don\u0027t we pass the specific RequestSpec that corresponds to the *exact* server instance that we wish to place/weigh to the filters/weighers? Why are we changing the spec_obj.instance_uuid value like this I will never know...","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9dc4ffa42ffc2a7ca43d65345a462667f5382bc5","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_742e94ab","line":199,"in_reply_to":"5f7c97a3_59107158","updated":"2018-07-20 20:54:50.000000000","message":"Right the request spec in a multi-create scenario is essentially a copy for all instances except for the uuid, and since the ServerGroupAntiAffinityFilter checks that request spec instance uuid, it needs to be unique per instance per pass through the filter when we\u0027re selecting the primary host for each instance. Otherwise if we have something like instances A and B and hosts X and Y and host X was selected for instance A and we\u0027re filtering hosts for instance B, the ServerGroupAntiAffinityFilter can see \"oh A is on X so it must be a resize, sure accept that host\" for Y, which breaks anti-affinity for X and Y.\n\nAlternatively to passing the full list of request specs, in addition to the instance_uuids, we\u0027d just stop passing instance_uuids and pass the list of request specs, since the request specs each have the instance uuids so passing both would be redundant. Plus we have the RequestSpec.num_instances thing in the mix, and it just becomes a shitty interface and we should spend the time thinking about how we want to model things going forward, but we don\u0027t really have the time for that at this point in Rocky because if we change the RPC API interface we can\u0027t backport it (from stein to rocky if we waited to fix this in stein).","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3b67ac1e734b3fe6cc282e9c8f46b391962cd458","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a88a8c61","line":199,"in_reply_to":"5f7c97a3_742e94ab","updated":"2018-07-20 21:08:29.000000000","message":"Agreed that we\u0027d get rid of instance_uuids if we changed to pass a list of request specs. And clean up/remove the RequestSpec.num_instances thing.","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"20d78a8c192454c11cd99275f50eaf66089d92aa","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_59107158","line":199,"in_reply_to":"5f7c97a3_d9432196","updated":"2018-07-20 19:55:48.000000000","message":"*booting one instance OR multi-booting several instances","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"18d6e1553a1b7ceab855f3fc7df2029f0caa12c2","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # accurate."},{"line_number":197,"context_line":"            spec_obj.instance_uuid \u003d instance_uuid"},{"line_number":198,"context_line":"            # Reset the field so it\u0027s not persisted accidentally."},{"line_number":199,"context_line":"            spec_obj.obj_reset_changes([\u0027instance_uuid\u0027])"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)"},{"line_number":202,"context_line":"            if not hosts:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_d9432196","line":199,"in_reply_to":"5f7c97a3_f9cdbd5d","updated":"2018-07-20 19:54:44.000000000","message":"It\u0027s because whether we are booting one instance of multi-booting several instances, we only call conductor _schedule *once* with the first (request_specs[0]) request spec. As I mentioned in my comment from PS2, the correct thing to do is to call scheduler\u0027s select_destinations with a *list* of request specs instead of only one of them. But that would require changing the RPC interface etc.\n\nSo instead, to avoid re-working the scheduler interface in this patch, we\u0027re re-using the one request spec we have here and setting its instance_uuid manually, since we don\u0027t have the original list of request specs.","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9e729ffc0c9691f69770d482714eb5ba819bb3c1","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        # from the same cell."},{"line_number":315,"context_line":"        selections_to_return \u003d []"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        for num in range(num_instances):"},{"line_number":318,"context_line":"            instance_uuid \u003d instance_uuids[num] if instance_uuids else None"},{"line_number":319,"context_line":"            if instance_uuid:"},{"line_number":320,"context_line":"                # Update the RequestSpec.instance_uuid before sending it to"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_fa286aee","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":40},"updated":"2018-07-19 21:14:27.000000000","message":"nit for consistancy perhaps you should just use enumerate over instancec_uuids as above","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd582c87cfef851d55d3ed0e49f8b879fc8286ae","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        # from the same cell."},{"line_number":315,"context_line":"        selections_to_return \u003d []"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        for num in range(num_instances):"},{"line_number":318,"context_line":"            instance_uuid \u003d instance_uuids[num] if instance_uuids else None"},{"line_number":319,"context_line":"            if instance_uuid:"},{"line_number":320,"context_line":"                # Update the RequestSpec.instance_uuid before sending it to"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_b3669d27","line":317,"range":{"start_line":317,"start_character":12,"end_line":317,"end_character":40},"in_reply_to":"5f7c97a3_fa286aee","updated":"2018-07-19 23:33:27.000000000","message":"You can\u0027t here because instance_uuids can be None.","commit_id":"c22b53c2481bac518a6b32cdee7b7df23d91251e"}],"nova/scheduler/filters/numa_topology_filter.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08740fbc8b412d0a5dff751ce1f4389b95e7c653","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # If we\u0027re filtering hosts to get alternates the"},{"line_number":87,"context_line":"        # spec_obj.instance_uuid is unset."},{"line_number":88,"context_line":"        inst_uuid \u003d (spec_obj.instance_uuid"},{"line_number":89,"context_line":"                     if \u0027instance_uuid\u0027 in spec_obj else \u0027n/a\u0027)"},{"line_number":90,"context_line":"        if requested_topology and host_topology:"},{"line_number":91,"context_line":"            limits \u003d objects.NUMATopologyLimits("},{"line_number":92,"context_line":"                cpu_allocation_ratio\u003dcpu_ratio,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_34bff7fc","line":89,"range":{"start_line":89,"start_character":57,"end_line":89,"end_character":62},"updated":"2018-07-18 21:39:29.000000000","message":"Should probably be None, instance_uuid probably expects a UUID.","commit_id":"bb6208021002dfa0985283501bd163d694e16a3f"}],"nova/tests/unit/scheduler/test_filter_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5f6e589643a5de5eca387b6f141b219140c16c4","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                                  swap\u003d0,"},{"line_number":86,"context_line":"                                  vcpus\u003d1),"},{"line_number":87,"context_line":"            project_id\u003duuids.project_id,"},{"line_number":88,"context_line":"            instance_group\u003dNone)"},{"line_number":89,"context_line":"        # Reset the RequestSpec changes so they don\u0027t interfere with the"},{"line_number":90,"context_line":"        # assertion at the end of the test."},{"line_number":91,"context_line":"        spec_obj.obj_reset_changes(recursive\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_4139afa0","line":88,"updated":"2018-07-17 22:07:34.000000000","message":"We should be setting instance_uuid\u003duuids.instance on the RequestSpec. It doesn\u0027t really matter much, but it\u0027s what would really happen in a real scheduling scenario.","commit_id":"951ce07601ef3a750f3f27939a78d1cf41d3f644"}]}
