)]}'
{"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.notifier \u003d rpc.get_notifier(\u0027scheduler\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":44,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":45,"context_line":"        \"\"\"Returns a sorted list of HostState objects that satisfy the"},{"line_number":46,"context_line":"        supplied request_spec."},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_0e488d59","line":44,"updated":"2017-07-18 10:36:11.000000000","message":"something is a bit worrying me about that interface which is a bit redundant. Let me explain : we previously had an interface for verifying the scheduler that was only accepting a request object. That was clear. In the same cycle, we added 3 more attributes :\n- one about which instance UUIDS are requested. But why shouldn\u0027t we have this in the RequestSpec ? Of course, we know that, but how many of our community?\n- one about provider_summaries : that one is more acceptable to me, in the sense of that\u0027s not something about a request (something the user doesn\u0027t ask) but rather about the state of the Cloud (c). Okay.\n\nand now, we add a 3rd one, which is about the allocations that the scheduler could potentially make against placement. That\u0027s still a factor of what the user asked, even if that\u0027s not a RequestSpec object, I agree.\n\nWhile I don\u0027t want to block for such points (and we also agreed on not nitpicking on interfaces for Pike), I do make the hard voice that we somehow need to clarify our drivers interface very soon in Queens.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4fa5bdce8f11ff9364141abcbcf762303b395811","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.notifier \u003d rpc.get_notifier(\u0027scheduler\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":44,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":45,"context_line":"        \"\"\"Returns a sorted list of HostState objects that satisfy the"},{"line_number":46,"context_line":"        supplied request_spec."},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_4c3d68db","line":44,"in_reply_to":"1f1a1f67_0e488d59","updated":"2017-07-18 14:22:34.000000000","message":"I didn\u0027t want to add the allocation_candidates parameter. In fact, I tried *really* hard to do the claiming in the scheduler manager, but that effort fell on its face because of the coupling of the scheduler\u0027s state (HostState objects) to the internal filter scheduler logic in the _schedule() method that calls consume_for_instance() on the HostState objects.\n\nMy first attempt at doing the claiming in the scheduler manager class *above the scheduler driver* layer was here:\n\nhttps://review.openstack.org/#/c/476632/22/nova/scheduler/manager.py\n\nA later series attempted to add claim retries to that. In order to do the retries in the manager, I needed to pass back alternatives from select_destinations(), though. And passing back alternatives to the scheduler manager from the scheduler driver\u0027s select_destinations() method meant that we were introducing a potentially fatal race condition in between the scheduler driver\u0027s call to the HostState\u0027s claim_for_instance() method (on the \"chosen\" host) and the scheduler manager attempting to claim resources on an alternate. The instance group affinity/anti-affinity code would also need to be moved up into the scheduler manager because the instance group information is set on the RequestSpec object in the tight loop inside the filter scheduler driver\u0027s _schedule() method, which caused additional coupling problems. This is why I just gave up and ended up doing the claiming in the filter scheduler driver\u0027s _schedule() method.\n\nAnd in order to do claims, I need to pass the allocation_candidates parameter. Thus, the need here to pass it.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c37299dfc0e63d535d16e6e77336d7c0a8f1511","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.notifier \u003d rpc.get_notifier(\u0027scheduler\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":44,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":45,"context_line":"        \"\"\"Returns a sorted list of HostState objects that satisfy the"},{"line_number":46,"context_line":"        supplied request_spec."},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_30a6dfac","line":44,"in_reply_to":"1f1a1f67_4c3d68db","updated":"2017-07-19 08:44:51.000000000","message":"Like I said Jay, I understand your problems. I was just providing this comment now because I think we should take some time in Queens about making sure our interfaces are right. \n\nHonestly, there are 2 points that are different\n- having the scheduler manager calling placement for passing the same list of hosts to the different scheduler drivers. Very important for me, given I think the scheduler driver should be a blackbox. Cool, you just did that, we just need to have the other in-tree drivers to do this too :-)\n- having the scheduler manager calling placement for allocating the instance. Yeah, it\u0027s important but possibly something for Queens, totally agreed.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        :param provider_summaries: Dict, keyed by resource provider UUID, of"},{"line_number":57,"context_line":"                                   information that will be used by the"},{"line_number":58,"context_line":"                                   filters/weighers in selecting matching hosts"},{"line_number":59,"context_line":"                                   for a request"},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        self.notifier.info("},{"line_number":62,"context_line":"            context, \u0027scheduler.select_destinations.start\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_8e6dbdcd","line":59,"updated":"2017-07-18 10:36:11.000000000","message":"at least, thanks for the docstring, it helps.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2340760fce62e65abb0d4ef4127b30705932870","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        :param spec_obj: The RequestSpec object"},{"line_number":50,"context_line":"        :param instance_uuids: List of UUIDs, one for each value of the spec"},{"line_number":51,"context_line":"                               object\u0027s num_instances attribute"},{"line_number":52,"context_line":"        :param alloc_reqs_by_rp_uuid: Optional dict, keyed by resource provider"},{"line_number":53,"context_line":"                                      UUID, of the allocation requests that may"},{"line_number":54,"context_line":"                                      be used to claim resources against"},{"line_number":55,"context_line":"                                      matched hosts. If None, indicates either"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_54336fab","line":52,"range":{"start_line":52,"start_character":38,"end_line":52,"end_character":51},"updated":"2017-07-20 02:09:45.000000000","message":"nit: for later cleanup, seems we should make this and provider_summaries kwargs that default to None if they are optional.","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"}],"nova/scheduler/manager.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"01f9cf345581f531d0d972dc858381637797bc2a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, p_sums \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, p_sums \u003d res"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_5a98ecbe","line":113,"range":{"start_line":113,"start_character":31,"end_line":113,"end_character":37},"updated":"2017-07-13 22:17:53.000000000","message":"Please use a different name that isn\u0027t misleading to someone new to the code. This sounds like the sum of things beginning with the letter \u0027p\u0027.","commit_id":"62f82bcbf490a8f2b4165520d970f0bb0e827c3a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1052d882911ff69b84b47cb146c9f95ea39c124b","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, p_sums \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, p_sums \u003d res"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_2e36fb53","line":113,"range":{"start_line":113,"start_character":31,"end_line":113,"end_character":37},"in_reply_to":"1f1a1f67_5a98ecbe","updated":"2017-07-14 15:15:55.000000000","message":"ack. will change.","commit_id":"62f82bcbf490a8f2b4165520d970f0bb0e827c3a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"890e0da58fa8b1c624c5a3a37e06db8e2cc96231","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_ad232805","line":113,"range":{"start_line":113,"start_character":31,"end_line":113,"end_character":49},"updated":"2017-07-14 21:14:03.000000000","message":"Thanks for changing this!","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_eee0b128","line":113,"updated":"2017-07-18 10:36:11.000000000","message":"I\u0027m not sure I like alloc_reqs_by_rp_uuid to be an empty dict by default. If the scheduler driver doesn\u0027t support calling placement, it should just get a None attribute exactly like we have for provider_summaries.\n\nTBC, here is what I see as a flag :\n- if the value is None, that\u0027s because the driver doesn\u0027t support placement. Fair enough.\n- if the value is an empty dict, that means that the driver supports placement but didn\u0027t got allocation requests because the request is not acceptable.\n\nSee, I think it\u0027s less error-prone.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c37299dfc0e63d535d16e6e77336d7c0a8f1511","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_f0e2a7d4","line":113,"in_reply_to":"1f1a1f67_872ebb8f","updated":"2017-07-19 08:44:51.000000000","message":"Sure and I know that. I just feel it would be far better if we could have different values for the above. For example, https://bugs.launchpad.net/nova/+bug/1705141 could have be avoided if we explicitly say that if None, that\u0027s because placement doesn\u0027t work for us.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ac3232c9a9608b6676cdddb603b91ea9f6effcdb","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_24b4527f","line":113,"in_reply_to":"1f1a1f67_c448feb3","updated":"2017-07-19 17:30:35.000000000","message":"Sorry, not yet in master. Will rebase off the patch above to keep this going since who knows how many rechecks will be necessary to merge it. :(","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4fa5bdce8f11ff9364141abcbcf762303b395811","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_872ebb8f","line":113,"in_reply_to":"1f1a1f67_eee0b128","updated":"2017-07-18 14:22:34.000000000","message":"Matt asked me to add the driver\u0027s USES_ALLOCATION_CANDIDATES attribute to indicate that a driver used or didn\u0027t use the allocation candidates information.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b17346cf0a0cffb2f6cc9f16c534b0e5437c3f1d","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                           request_spec,"},{"line_number":111,"context_line":"                                                           filter_properties)"},{"line_number":112,"context_line":"        resources \u003d utils.resources_from_request_spec(spec_obj)"},{"line_number":113,"context_line":"        alloc_reqs_by_rp_uuid, provider_summaries \u003d {}, None"},{"line_number":114,"context_line":"        if self.driver.USES_ALLOCATION_CANDIDATES:"},{"line_number":115,"context_line":"            res \u003d self.placement_client.get_allocation_candidates(resources)"},{"line_number":116,"context_line":"            alloc_reqs, provider_summaries \u003d res"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_c448feb3","line":113,"in_reply_to":"1f1a1f67_f0e2a7d4","updated":"2017-07-19 17:27:46.000000000","message":"Fair enough. Rebased on master (which contains the above fix from mriedem and converted this to passing None)","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"48e38305beb84ab8fc11708cb9158828bf694f2e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                # provider UUID, so that when we attempt to claim resources for"},{"line_number":132,"context_line":"                # a host, we can grab an allocation request easily"},{"line_number":133,"context_line":"                alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list)"},{"line_number":134,"context_line":"                if alloc_reqs is not None:"},{"line_number":135,"context_line":"                    for ar in alloc_reqs:"},{"line_number":136,"context_line":"                        for rr in ar[\u0027allocations\u0027]:"},{"line_number":137,"context_line":"                            rp_uuid \u003d rr[\u0027resource_provider\u0027][\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_486214b0","line":134,"updated":"2017-07-17 17:55:59.000000000","message":"I think you could move the defaultdict init to L113 and then make this clause \"elif alloc_reqs is not None\" to drop the indent level here a bit.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4fa5bdce8f11ff9364141abcbcf762303b395811","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                # provider UUID, so that when we attempt to claim resources for"},{"line_number":132,"context_line":"                # a host, we can grab an allocation request easily"},{"line_number":133,"context_line":"                alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list)"},{"line_number":134,"context_line":"                if alloc_reqs is not None:"},{"line_number":135,"context_line":"                    for ar in alloc_reqs:"},{"line_number":136,"context_line":"                        for rr in ar[\u0027allocations\u0027]:"},{"line_number":137,"context_line":"                            rp_uuid \u003d rr[\u0027resource_provider\u0027][\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_676ddfca","line":134,"in_reply_to":"1f1a1f67_486214b0","updated":"2017-07-18 14:22:34.000000000","message":"hmm, good point. will do.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"eab0fbb82a07b449e8113532f37ca917c1736e14","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                # provider UUID, so that when we attempt to claim resources for"},{"line_number":132,"context_line":"                # a host, we can grab an allocation request easily"},{"line_number":133,"context_line":"                alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list)"},{"line_number":134,"context_line":"                if alloc_reqs is not None:"},{"line_number":135,"context_line":"                    for ar in alloc_reqs:"},{"line_number":136,"context_line":"                        for rr in ar[\u0027allocations\u0027]:"},{"line_number":137,"context_line":"                            rp_uuid \u003d rr[\u0027resource_provider\u0027][\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_8730c857","line":134,"in_reply_to":"1f1a1f67_676ddfca","updated":"2017-07-19 17:51:06.000000000","message":"Because of bauzas\u0027 request above, I wasn\u0027t able to move the alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list) call to line 113, but I was able to remove the redundant if statement on line 134.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12a3fbec1e3fa307af9792d84605bd54450cd571","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                        alloc_reqs_by_rp_uuid[rp_uuid].append(ar)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        dests \u003d self.driver.select_destinations(ctxt, spec_obj, instance_uuids,"},{"line_number":146,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries)"},{"line_number":147,"context_line":"        dest_dicts \u003d [_host_state_obj_to_dict(d) for d in dests]"},{"line_number":148,"context_line":"        return jsonutils.to_primitive(dest_dicts)"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_3217d954","line":146,"range":{"start_line":146,"start_character":12,"end_line":146,"end_character":33},"updated":"2017-07-20 10:31:20.000000000","message":"This will be None when placement returns no candidates as there is no resources left (i.e. res \u003d  ([],{})). Then the filter scheduler wants to iterate alloc_reqs_by_rp_uuid and fails with a stack trace:\n\nERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 153, in _process_incoming\nERROR oslo_messaging.rpc.server     res \u003d self.dispatcher.dispatch(message)\nERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 213, in dispatch\nERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)\nERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 183, in _do_dispatch\nERROR oslo_messaging.rpc.server     result \u003d func(ctxt, **new_args)\nERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 225, in inner\nERROR oslo_messaging.rpc.server     return func(*args, **kwargs)\nERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/manager.py\", line 148, in select_destinations\nERROR oslo_messaging.rpc.server     dests \u003d self.driver.select_destinations(ctxt, spec_obj, instance_uuids,\nERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 84, in select_destinations\nERROR oslo_messaging.rpc.server     alloc_reqs_by_rp_uuid, provider_summaries)\nERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 191, in _schedule\nERROR oslo_messaging.rpc.server     if cn_uuid not in alloc_reqs_by_rp_uuid:\nERROR oslo_messaging.rpc.server TypeError: argument of type \u0027NoneType\u0027 is not iterable","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"}],"nova/tests/unit/scheduler/fakes.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"890e0da58fa8b1c624c5a3a37e06db8e2cc96231","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    \u0027VCPU\u0027: 1,"},{"line_number":139,"context_line":"                    \u0027MEMORY_MB\u0027: 512,"},{"line_number":140,"context_line":"                    \u0027DISK_GB\u0027: 512,"},{"line_number":141,"context_line":"                },"},{"line_number":142,"context_line":"            },"},{"line_number":143,"context_line":"        ]"},{"line_number":144,"context_line":"    } for cn in COMPUTE_NODES"},{"line_number":145,"context_line":"]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"RESOURCE_PROVIDERS \u003d ["},{"line_number":148,"context_line":"    dict("}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_8d2f4ca0","line":145,"range":{"start_line":141,"start_character":0,"end_line":145,"end_character":1},"updated":"2017-07-14 21:14:03.000000000","message":"Oh, Jay - spreading four word out over 5 lines.","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8aeb79c5ad1c88cf381a5890750906b2188dafa1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    \u0027VCPU\u0027: 1,"},{"line_number":139,"context_line":"                    \u0027MEMORY_MB\u0027: 512,"},{"line_number":140,"context_line":"                    \u0027DISK_GB\u0027: 512,"},{"line_number":141,"context_line":"                },"},{"line_number":142,"context_line":"            },"},{"line_number":143,"context_line":"        ]"},{"line_number":144,"context_line":"    } for cn in COMPUTE_NODES"},{"line_number":145,"context_line":"]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"RESOURCE_PROVIDERS \u003d ["},{"line_number":148,"context_line":"    dict("}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_301d23bd","line":145,"range":{"start_line":141,"start_character":0,"end_line":145,"end_character":1},"in_reply_to":"1f1a1f67_8d2f4ca0","updated":"2017-07-15 15:22:21.000000000","message":"LOL, you\u0027d think I was being paid per line of code, right? ;)","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"}],"nova/tests/unit/scheduler/test_caching_scheduler.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"890e0da58fa8b1c624c5a3a37e06db8e2cc96231","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                p_sums[hs.uuid] \u003d hs"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        return self.driver.select_destinations("},{"line_number":112,"context_line":"                self.context, spec_obj, [spec_obj.instance_uuid], {}, p_sums)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_fake_request_spec(self):"},{"line_number":115,"context_line":"        # NOTE(sbauza): Prevent to stub the Flavor.get_by_id call just by"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_0d157c4a","line":112,"range":{"start_line":112,"start_character":70,"end_line":112,"end_character":76},"updated":"2017-07-14 21:14:03.000000000","message":"I know that they existed in the prior version of the code, but could we clean up \u0027p_sums\u0027 in the tests, too? Kthx","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8aeb79c5ad1c88cf381a5890750906b2188dafa1","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                p_sums[hs.uuid] \u003d hs"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        return self.driver.select_destinations("},{"line_number":112,"context_line":"                self.context, spec_obj, [spec_obj.instance_uuid], {}, p_sums)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_fake_request_spec(self):"},{"line_number":115,"context_line":"        # NOTE(sbauza): Prevent to stub the Flavor.get_by_id call just by"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_5022df01","line":112,"range":{"start_line":112,"start_character":70,"end_line":112,"end_character":76},"in_reply_to":"1f1a1f67_0d157c4a","updated":"2017-07-15 15:22:21.000000000","message":"sorry! forgot about these... will fix.","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f66f6534cbbe022b6719d6943f730673d40caa4c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                p_sums[hs.uuid] \u003d hs"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        return self.driver.select_destinations("},{"line_number":112,"context_line":"                self.context, spec_obj, [spec_obj.instance_uuid], {}, p_sums)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_fake_request_spec(self):"},{"line_number":115,"context_line":"        # NOTE(sbauza): Prevent to stub the Flavor.get_by_id call just by"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_cf863314","line":112,"range":{"start_line":112,"start_character":70,"end_line":112,"end_character":76},"in_reply_to":"1f1a1f67_5022df01","updated":"2017-07-17 14:09:41.000000000","message":"Done","commit_id":"9147ba09a3759eaed8a74a4c0e5f762be9d33cb2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.assertEqual(result[0].host, fake_host.host)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_select_destinations(self, spec_obj):"},{"line_number":106,"context_line":"        provider_summaries \u003d {}"},{"line_number":107,"context_line":"        for cell_hosts in self.driver.all_host_states.values():"},{"line_number":108,"context_line":"            for hs in cell_hosts:"},{"line_number":109,"context_line":"                provider_summaries[hs.uuid] \u003d hs"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_0e61add3","line":106,"updated":"2017-07-18 10:36:11.000000000","message":"all those variable renames in that module are not needed for that change, right?","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4fa5bdce8f11ff9364141abcbcf762303b395811","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.assertEqual(result[0].host, fake_host.host)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_select_destinations(self, spec_obj):"},{"line_number":106,"context_line":"        provider_summaries \u003d {}"},{"line_number":107,"context_line":"        for cell_hosts in self.driver.all_host_states.values():"},{"line_number":108,"context_line":"            for hs in cell_hosts:"},{"line_number":109,"context_line":"                provider_summaries[hs.uuid] \u003d hs"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_27b00743","line":106,"in_reply_to":"1f1a1f67_0e61add3","updated":"2017-07-18 14:22:34.000000000","message":"edleafe asked me to change p_sums to provider_summaries.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c37299dfc0e63d535d16e6e77336d7c0a8f1511","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.assertEqual(result[0].host, fake_host.host)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _test_select_destinations(self, spec_obj):"},{"line_number":106,"context_line":"        provider_summaries \u003d {}"},{"line_number":107,"context_line":"        for cell_hosts in self.driver.all_host_states.values():"},{"line_number":108,"context_line":"            for hs in cell_hosts:"},{"line_number":109,"context_line":"                provider_summaries[hs.uuid] \u003d hs"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_f00bc78a","line":106,"in_reply_to":"1f1a1f67_27b00743","updated":"2017-07-19 08:44:51.000000000","message":"Well, sure, that\u0027s just a review concern, but it helps, I agree.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2340760fce62e65abb0d4ef4127b30705932870","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertRaises(exception.NoValidHost,"},{"line_number":88,"context_line":"                self.driver.select_destinations,"},{"line_number":89,"context_line":"                self.context, spec_obj, [spec_obj.instance_uuid],"},{"line_number":90,"context_line":"                {}, {})"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @mock.patch(\u0027nova.db.instance_extra_get_by_instance_uuid\u0027,"},{"line_number":93,"context_line":"                return_value\u003d{\u0027numa_topology\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_b4c76364","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":22},"updated":"2017-07-20 02:09:45.000000000","message":"Shouldn\u0027t these be None since the caching scheduler doesn\u0027t use placement?","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b6fd7bef760b8daec78e036ac3154bb0c15d8267","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertRaises(exception.NoValidHost,"},{"line_number":88,"context_line":"                self.driver.select_destinations,"},{"line_number":89,"context_line":"                self.context, spec_obj, [spec_obj.instance_uuid],"},{"line_number":90,"context_line":"                {}, {})"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @mock.patch(\u0027nova.db.instance_extra_get_by_instance_uuid\u0027,"},{"line_number":93,"context_line":"                return_value\u003d{\u0027numa_topology\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_0775c6cc","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":22},"in_reply_to":"1f1a1f67_b4c76364","updated":"2017-07-20 07:25:57.000000000","message":"Yup, weirdo...","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"}],"nova/tests/unit/scheduler/test_chance_scheduler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        spec_obj \u003d objects.RequestSpec(num_instances\u003d2, ignore_hosts\u003dNone)"},{"line_number":66,"context_line":"        dests \u003d self.driver.select_destinations(self.context, spec_obj,"},{"line_number":67,"context_line":"                [uuids.instance1, uuids.instance2], {},"},{"line_number":68,"context_line":"                mock.sentinel.p_sums)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        self.assertEqual(2, len(dests))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_6ea7010d","line":67,"updated":"2017-07-18 10:36:11.000000000","message":"like I said earlier, I\u0027d rather prefer to see a None attribute by default like we did for provider_summaries.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2340760fce62e65abb0d4ef4127b30705932870","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        spec_obj \u003d objects.RequestSpec(num_instances\u003d2, ignore_hosts\u003dNone)"},{"line_number":66,"context_line":"        dests \u003d self.driver.select_destinations(self.context, spec_obj,"},{"line_number":67,"context_line":"                [uuids.instance1, uuids.instance2], {},"},{"line_number":68,"context_line":"                mock.sentinel.p_sums)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        self.assertEqual(2, len(dests))"},{"line_number":71,"context_line":"        (host, node) \u003d (dests[0].host, dests[0].nodename)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_b49c036a","line":68,"range":{"start_line":67,"start_character":52,"end_line":68,"end_character":36},"updated":"2017-07-20 02:09:45.000000000","message":"same as in the caching scheduler tests, shouldn\u0027t these be None since the chance scheduler doesn\u0027t use placement?","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2340760fce62e65abb0d4ef4127b30705932870","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        spec_obj.instance_uuid \u003d uuids.instance"},{"line_number":96,"context_line":"        self.assertRaises(exception.NoValidHost,"},{"line_number":97,"context_line":"                          self.driver.select_destinations, self.context,"},{"line_number":98,"context_line":"                          spec_obj, [spec_obj.instance_uuid], {},"},{"line_number":99,"context_line":"                          mock.sentinel.p_sums)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_748c2b35","line":99,"range":{"start_line":98,"start_character":62,"end_line":99,"end_character":47},"updated":"2017-07-20 02:09:45.000000000","message":"same","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"}],"nova/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e6dc404401f5cae35b9568bf0733948e7b88b503","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.manager.select_destinations(None, spec_obj\u003dfake_spec,"},{"line_number":130,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":131,"context_line":"            select_destinations.assert_called_once_with(None, fake_spec,"},{"line_number":132,"context_line":"                    [fake_spec.instance_uuid], {}, None)"},{"line_number":133,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_6edf013a","line":132,"updated":"2017-07-18 10:36:11.000000000","message":"See, here I\u0027d prefer to see None instead of {} like I said, because the scheduler driver doesn\u0027t support placement queries.\n\nAnd since test_select_destination_no_candidates would pass {} instead, it would be clearer that it\u0027s because we don\u0027t have allocation candidates returned by placement.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8de00558a8d30d27c8ce0bfc6bd8de27de5806d6","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.manager.select_destinations(None, spec_obj\u003dfake_spec,"},{"line_number":130,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":131,"context_line":"            select_destinations.assert_called_once_with(None, fake_spec,"},{"line_number":132,"context_line":"                    [fake_spec.instance_uuid], {}, None)"},{"line_number":133,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_04015638","line":132,"in_reply_to":"1f1a1f67_50471bbd","updated":"2017-07-19 17:28:45.000000000","message":"The caching and chance scheduler drivers are never going to use placement. At least, that\u0027s according to what my last conversation with John G was.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4fa5bdce8f11ff9364141abcbcf762303b395811","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.manager.select_destinations(None, spec_obj\u003dfake_spec,"},{"line_number":130,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":131,"context_line":"            select_destinations.assert_called_once_with(None, fake_spec,"},{"line_number":132,"context_line":"                    [fake_spec.instance_uuid], {}, None)"},{"line_number":133,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_e78e8f77","line":132,"in_reply_to":"1f1a1f67_6edf013a","updated":"2017-07-18 14:22:34.000000000","message":"That\u0027s what the USES_ALLOCATION_CANDIDATES driver attribute is for, though.","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c37299dfc0e63d535d16e6e77336d7c0a8f1511","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            self.manager.select_destinations(None, spec_obj\u003dfake_spec,"},{"line_number":130,"context_line":"                    instance_uuids\u003d[fake_spec.instance_uuid])"},{"line_number":131,"context_line":"            select_destinations.assert_called_once_with(None, fake_spec,"},{"line_number":132,"context_line":"                    [fake_spec.instance_uuid], {}, None)"},{"line_number":133,"context_line":"            mock_get_ac.assert_called_once_with(mock_rfrs.return_value)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch(\u0027nova.scheduler.utils.resources_from_request_spec\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_50471bbd","line":132,"in_reply_to":"1f1a1f67_e78e8f77","updated":"2017-07-19 08:44:51.000000000","message":"Again, I know. TBH, I\u0027d love to see *all* the drivers calling placement for getting a list of hosts to check. When it is merged, then the USES_ALLOCATION_CANDIDATES driver attribute could be unset, right?","commit_id":"446abe8259dbd9a84f255d06f745047c232aaaba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2340760fce62e65abb0d4ef4127b30705932870","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":116,"context_line":"                \u0027get_allocation_candidates\u0027)"},{"line_number":117,"context_line":"    def test_select_destination_old_placement(self, mock_get_ac, mock_rfrs):"},{"line_number":118,"context_line":"        \"\"\"Tests that we will pass None for the provider_summaries parameter to"},{"line_number":119,"context_line":"        the scheduler driver select_destinations() method when the scheduler"},{"line_number":120,"context_line":"        report client\u0027s get_allocation_candidates() returns None, None as it"},{"line_number":121,"context_line":"        would if placement service hasn\u0027t been upgraded before scheduler."}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_3497d33c","line":118,"range":{"start_line":118,"start_character":48,"end_line":118,"end_character":66},"updated":"2017-07-20 02:09:45.000000000","message":"and that other parameter - but yuck you\u0027d have to update that here and elsewhere :( this is what you get when you bow to pressure for renames mixed in with a functional change :)","commit_id":"e041fddeb027f909547ec46cb198262d410f7df7"}]}
