)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9855726a9aa9e930f2455de02142a865b69e25a2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the conductor; that will be done in the next patch in the series, as"},{"line_number":13,"context_line":"that will require an RPC change."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Blueprint: placement-allocation-requests"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I9f864455c69e1355a3cf06d7ba8b98fa3bcf619c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f515b1d_d5a9a6dd","line":15,"updated":"2017-10-03 16:33:30.000000000","message":"This is the wrong blueprint now, you should be using blueprint return-alternate-hosts, so please rev the commit messages and topic branch for this series.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"}],"nova/objects/request_spec.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"44e7820baee09c6464e14860a9bf6813672864af","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        spec.force_nodes \u003d filter_properties.get(\u0027force_nodes\u0027)"},{"line_number":260,"context_line":"        retry \u003d filter_properties.get(\u0027retry\u0027, {})"},{"line_number":261,"context_line":"        spec._from_retry(retry)"},{"line_number":262,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {}) or {}"},{"line_number":263,"context_line":"        spec._from_limits(limits)"},{"line_number":264,"context_line":"        spec._populate_group_info(filter_properties)"},{"line_number":265,"context_line":"        scheduler_hints \u003d filter_properties.get(\u0027scheduler_hints\u0027, {})"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f4e5783_d459258e","line":262,"updated":"2017-10-13 19:13:17.000000000","message":"This feels like it deserves a comment. I guess the value of limits can be set as None and we want to transform that to {}?\n\nThat seems sufficiently blink-making","commit_id":"7295ba4b7ccbeb1c12aa0e4dcf854c1fe1fcf8db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"630aa3ce61d4869e8a3e135739ddd1ef416ee732","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        spec.force_nodes \u003d filter_properties.get(\u0027force_nodes\u0027)"},{"line_number":260,"context_line":"        retry \u003d filter_properties.get(\u0027retry\u0027, {})"},{"line_number":261,"context_line":"        spec._from_retry(retry)"},{"line_number":262,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {}) or {}"},{"line_number":263,"context_line":"        spec._from_limits(limits)"},{"line_number":264,"context_line":"        spec._populate_group_info(filter_properties)"},{"line_number":265,"context_line":"        scheduler_hints \u003d filter_properties.get(\u0027scheduler_hints\u0027, {})"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_ab904096","line":262,"updated":"2017-10-17 12:11:55.000000000","message":"duplicating my coment from the earlier patchset:\n\nThis feels like it deserves a comment. I guess the value of limits can be set as None and we want to transform that to {}?\nThat seems sufficiently blink-making","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8a76e2e01933cc80fbae9d0327175022849a85d3","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        spec.force_nodes \u003d filter_properties.get(\u0027force_nodes\u0027)"},{"line_number":260,"context_line":"        retry \u003d filter_properties.get(\u0027retry\u0027, {})"},{"line_number":261,"context_line":"        spec._from_retry(retry)"},{"line_number":262,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {}) or {}"},{"line_number":263,"context_line":"        spec._from_limits(limits)"},{"line_number":264,"context_line":"        spec._populate_group_info(filter_properties)"},{"line_number":265,"context_line":"        scheduler_hints \u003d filter_properties.get(\u0027scheduler_hints\u0027, {})"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_5a3993d4","line":262,"in_reply_to":"5f4e5783_747468cf","updated":"2017-10-17 15:09:13.000000000","message":"Yes it\u0027s idiomatic for Python. What\u0027s not idiomatic is that \u0027limits\u0027 has a value which can be None (rather than not set), when it\u0027s \"type\" is a dict.","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9c434835824431bb9af1733e38aeea42a3c1d689","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        spec.force_nodes \u003d filter_properties.get(\u0027force_nodes\u0027)"},{"line_number":260,"context_line":"        retry \u003d filter_properties.get(\u0027retry\u0027, {})"},{"line_number":261,"context_line":"        spec._from_retry(retry)"},{"line_number":262,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {}) or {}"},{"line_number":263,"context_line":"        spec._from_limits(limits)"},{"line_number":264,"context_line":"        spec._populate_group_info(filter_properties)"},{"line_number":265,"context_line":"        scheduler_hints \u003d filter_properties.get(\u0027scheduler_hints\u0027, {})"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_747468cf","line":262,"in_reply_to":"5f4e5783_ab904096","updated":"2017-10-17 14:46:39.000000000","message":"OK, it\u0027s kind of a standard Python idiom, but I can add a comment for those unfamiliar with it.","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"}],"nova/scheduler/chance.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cc6cf8cfd32d2994087767d50ff6c97debbb5c3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # We need to return a list of lists for matching allocations, but since"},{"line_number":88,"context_line":"        # this driver doesn\u0027t use allocations, return an empty list of lists to"},{"line_number":89,"context_line":"        # match the count of hosts."},{"line_number":90,"context_line":"        allocs \u003d [[[]] * alts_per_instance] * num_instances"},{"line_number":91,"context_line":"        return (selected_host_lists, allocs)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_859f0d5e","line":90,"range":{"start_line":90,"start_character":17,"end_line":90,"end_character":22},"updated":"2017-08-25 10:57:06.000000000","message":"guh... :)","commit_id":"4899535a5c3f75a815d8a10df7a3c9a4ed7379c1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # We need to return a list of lists for matching allocations, but since"},{"line_number":87,"context_line":"        # this driver doesn\u0027t use allocations, return an empty list of lists to"},{"line_number":88,"context_line":"        # match the count of hosts."},{"line_number":89,"context_line":"        allocs \u003d [[[]] * alts_per_instance] * num_instances"},{"line_number":90,"context_line":"        return (selected_host_lists, allocs)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_3ff469f0","line":88,"updated":"2017-10-02 23:05:31.000000000","message":"LOL, when can we just get rid of the chance scheduler again? :)","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return hosts"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _schedule(self, context, topic, spec_obj, instance_uuids,"},{"line_number":55,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":56,"context_line":"        \"\"\"Picks a host that is up at random.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        elevated \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_b53d83de","line":55,"range":{"start_line":55,"start_character":12,"end_line":55,"end_character":43},"updated":"2017-11-15 20:09:36.000000000","message":"This isn\u0027t used so why pass it in? We don\u0027t care about passing alloc_reqs_by_rp_uuid, provider_summaries through to this method. Seems it would be a better comment to move the \"# Note that we don\u0027t claim in the chance scheduler\" comment to the select_destinations method as a reason why those parameters aren\u0027t passed through to _schedule.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return hosts"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _schedule(self, context, topic, spec_obj, instance_uuids,"},{"line_number":55,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":56,"context_line":"        \"\"\"Picks a host that is up at random.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        elevated \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_26396ba3","line":55,"range":{"start_line":55,"start_character":12,"end_line":55,"end_character":43},"in_reply_to":"1f485f77_b53d83de","updated":"2017-11-15 21:09:40.000000000","message":"Done","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":81,"context_line":"        # item per instance, and that item will be a list of Selection objects"},{"line_number":82,"context_line":"        # representing the selected host and zero or more alternates from the"},{"line_number":83,"context_line":"        # same cell."},{"line_number":84,"context_line":"        selections_to_return \u003d []"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # We can\u0027t return dupes as alternates, since alternates are used when"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_f07b0978","line":83,"range":{"start_line":82,"start_character":69,"end_line":83,"end_character":20},"updated":"2017-11-15 20:09:36.000000000","message":"We aren\u0027t actually restricting the alternates by cell in here, right? I assume this comment was copied from the FilterScheduler?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":107,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":108,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":109,"context_line":"        \"\"\"Selects random destinations. Returns a list of HostState objects.\"\"\""},{"line_number":110,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":111,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":112,"context_line":"        # and limiting the destination scope to a single requested cell"}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_fab7bb85","line":109,"range":{"start_line":109,"start_character":58,"end_line":109,"end_character":67},"updated":"2017-12-04 17:33:34.000000000","message":"Selection","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":107,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":108,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":109,"context_line":"        \"\"\"Selects random destinations. Returns a list of HostState objects.\"\"\""},{"line_number":110,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":111,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":112,"context_line":"        # and limiting the destination scope to a single requested cell"}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_1abdbf64","line":109,"range":{"start_line":109,"start_character":50,"end_line":109,"end_character":54},"updated":"2017-12-04 17:33:34.000000000","message":"list of lists of Selection objects","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"44e7820baee09c6464e14860a9bf6813672864af","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @safe_connect"},{"line_number":330,"context_line":"    def get_allocation_candidates(self, resources):"},{"line_number":331,"context_line":"        \"\"\"Returns a tuple of (allocation_requests, provider_summariesi,"},{"line_number":332,"context_line":"        version)."},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        The allocation requests are a collection of potential JSON objects that"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f4e5783_34df59d7","line":331,"range":{"start_line":331,"start_character":70,"end_line":331,"end_character":71},"updated":"2017-10-13 19:13:17.000000000","message":"vim wart","commit_id":"7295ba4b7ccbeb1c12aa0e4dcf854c1fe1fcf8db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"44e7820baee09c6464e14860a9bf6813672864af","unresolved":false,"context_lines":[{"line_number":355,"context_line":"            \u0027resources\u0027: resource_query,"},{"line_number":356,"context_line":"        }"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        version \u003d \u00271.10\u0027"},{"line_number":359,"context_line":"        url \u003d \"/allocation_candidates?%s\" % parse.urlencode(qs_params)"},{"line_number":360,"context_line":"        resp \u003d self.get(url, version\u003dversion)"},{"line_number":361,"context_line":"        if resp.status_code \u003d\u003d 200:"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f4e5783_d706c71c","line":358,"updated":"2017-10-13 19:13:17.000000000","message":"I guess some day we will have version discovery and this will be a bit more dynamic, but this\nis\nnot\nthat\nday","commit_id":"7295ba4b7ccbeb1c12aa0e4dcf854c1fe1fcf8db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"630aa3ce61d4869e8a3e135739ddd1ef416ee732","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @safe_connect"},{"line_number":330,"context_line":"    def get_allocation_candidates(self, resources):"},{"line_number":331,"context_line":"        \"\"\"Returns a tuple of (allocation_requests, provider_summariesi,"},{"line_number":332,"context_line":"        version)."},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        The allocation requests are a collection of potential JSON objects that"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_4bef8c1d","line":331,"updated":"2017-10-17 12:11:55.000000000","message":"vim wart","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9c434835824431bb9af1733e38aeea42a3c1d689","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @safe_connect"},{"line_number":330,"context_line":"    def get_allocation_candidates(self, resources):"},{"line_number":331,"context_line":"        \"\"\"Returns a tuple of (allocation_requests, provider_summariesi,"},{"line_number":332,"context_line":"        version)."},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        The allocation requests are a collection of potential JSON objects that"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_df045517","line":331,"in_reply_to":"5f4e5783_4bef8c1d","updated":"2017-10-17 14:46:39.000000000","message":"Done","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @safe_connect"},{"line_number":315,"context_line":"    def get_allocation_candidates(self, resources):"},{"line_number":316,"context_line":"        \"\"\"Returns a tuple of (allocation_requests, provider_summaries,"},{"line_number":317,"context_line":"        allocation_request_version)."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        The allocation_requests are a collection of potential JSON objects that"},{"line_number":320,"context_line":"        can be passed to the PUT /allocations/{consumer_uuid} Placement REST"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_508c1d7e","line":317,"range":{"start_line":316,"start_character":11,"end_line":317,"end_character":35},"updated":"2017-11-15 20:09:36.000000000","message":"nit: at this point I\u0027d just remove this sentence and leave this to the :returns: doc string.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":994,"context_line":"    @safe_connect"},{"line_number":995,"context_line":"    @retries"},{"line_number":996,"context_line":"    def claim_resources(self, consumer_uuid, alloc_request, project_id,"},{"line_number":997,"context_line":"                        user_id, attempt\u003d0, allocation_request_version\u003dNone):"},{"line_number":998,"context_line":"        \"\"\"Creates allocation records for the supplied instance UUID against"},{"line_number":999,"context_line":"        the supplied resource providers."},{"line_number":1000,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_d0436d12","line":997,"range":{"start_line":997,"start_character":33,"end_line":997,"end_character":42},"updated":"2017-11-15 20:09:36.000000000","message":"This isn\u0027t used.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"                              placement\u0027s PUT /allocations API"},{"line_number":1015,"context_line":"        :param project_id: The project_id associated with the allocations."},{"line_number":1016,"context_line":"        :param user_id: The user_id associated with the allocations."},{"line_number":1017,"context_line":"        :param attempt: The attempt at claiming this allocation_request (used"},{"line_number":1018,"context_line":"                        in recursive retries)"},{"line_number":1019,"context_line":"        :param allocation_request_version: The microversion used to request the"},{"line_number":1020,"context_line":"                                           allocations."},{"line_number":1021,"context_line":"        :returns: True if the allocations were created, False otherwise."}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_b04c7142","line":1018,"range":{"start_line":1017,"start_character":8,"end_line":1018,"end_character":45},"updated":"2017-11-15 20:09:36.000000000","message":"There is no recursion in this method. The @retries decorator handles this - I\u0027m assuming this is a rebase failure?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07d068f75e7f5d2f7d6bbdb20034ad06fc1a3770","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @safe_connect"},{"line_number":315,"context_line":"    def get_allocation_candidates(self, resources):"},{"line_number":316,"context_line":"        \"\"\"Returns a tuple of (allocation_requests, provider_summaries,"},{"line_number":317,"context_line":"        allocation_request_version)."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        The allocation_requests are a collection of potential JSON objects that"},{"line_number":320,"context_line":"        can be passed to the PUT /allocations/{consumer_uuid} Placement REST"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_89d36fd5","line":317,"range":{"start_line":316,"start_character":11,"end_line":317,"end_character":36},"updated":"2017-11-16 19:29:29.000000000","message":"Same comment from PS28 applies, I\u0027d just remove this line. It\u0027s covered in the :returns: section of the docstring.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"}],"nova/scheduler/driver.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"46f92a68236d0930b2bf98fd5f57d57a05d1ef10","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @abc.abstractmethod"},{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            provider_summaries):"},{"line_number":66,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":67,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":68,"context_line":"        (spec_obj.num_instances)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f4b6375_385518c7","side":"PARENT","line":65,"updated":"2017-10-23 16:57:38.000000000","message":"This is after the fact, but why do we have provider_summaries here and not also allocation_requests? You can\u0027t have one without the other can you?","commit_id":"01bca737c326c56680c657010a1e6d39d975ed6f"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c10d71980d3679620d95501636879078bfba184f","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @abc.abstractmethod"},{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            provider_summaries):"},{"line_number":66,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":67,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":68,"context_line":"        (spec_obj.num_instances)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f4b6375_dc3db8c4","side":"PARENT","line":65,"in_reply_to":"3f4b6375_385518c7","updated":"2017-10-24 15:35:58.000000000","message":"Looks like Jay didn\u0027t update the abstract implementation when he changed the signature for select_destinations to add the alloc_reqs_by_rp_uuid parameter. I\u0027ll add it, along with a note.","commit_id":"01bca737c326c56680c657010a1e6d39d975ed6f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7d5a1b47348251dcc2e2475e7cf640527396c7e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @abc.abstractmethod"},{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":66,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":67,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":68,"context_line":"        (spec_obj.num_instances)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_9d0b708c","line":65,"range":{"start_line":65,"start_character":55,"end_line":65,"end_character":67},"updated":"2017-10-26 21:38:21.000000000","message":"how about we call the kwarg \"allocation_candidate_api_version\", \"allocation_api_version\" or \"candidate_api_version\" so that it is clear what this refers to?","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bb05a68061a69c68afb10539eeccda67083f77d","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @abc.abstractmethod"},{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":66,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":67,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":68,"context_line":"        (spec_obj.num_instances)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_03fcaf6d","line":65,"range":{"start_line":65,"start_character":55,"end_line":65,"end_character":67},"in_reply_to":"3f4b6375_63948337","updated":"2017-10-27 14:17:25.000000000","message":"cool, that works for me.","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ca1876f0bba34ae5d0c9dbaeb004078a0cde248f","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @abc.abstractmethod"},{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries, version\u003dNone):"},{"line_number":66,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":67,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":68,"context_line":"        (spec_obj.num_instances)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_63948337","line":65,"range":{"start_line":65,"start_character":55,"end_line":65,"end_character":67},"in_reply_to":"3f4b6375_9d0b708c","updated":"2017-10-27 14:13:44.000000000","message":"I changed them all to \"allocation_request_version\" to match the name in the Selection object.","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":66,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":68,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":69,"context_line":"        (spec_obj.num_instances)"},{"line_number":70,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_9072957a","line":67,"range":{"start_line":67,"start_character":29,"end_line":67,"end_character":38},"updated":"2017-11-15 20:09:36.000000000","message":"Do we change this to a list of Selection objects? What does the SchedulerManager.select_destinations method expect from the scheduler driver at this point? And note that you can currently load up an out of tree scheduler driver via the \"nova.scheduler.driver\" entry point so we should be clear about expectations of this interface with the SchedulerManager.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":66,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Returns a list of HostState objects that have been chosen by the"},{"line_number":68,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":69,"context_line":"        (spec_obj.num_instances)"},{"line_number":70,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_86937f5b","line":67,"range":{"start_line":67,"start_character":29,"end_line":67,"end_character":38},"in_reply_to":"1f485f77_9072957a","updated":"2017-11-15 21:09:40.000000000","message":"Done","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":65,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":66,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":67,"context_line":"        \"\"\"Returns a list of Selection objects that have been chosen by the"},{"line_number":68,"context_line":"        scheduler driver, one for each requested instance"},{"line_number":69,"context_line":"        (spec_obj.num_instances)"},{"line_number":70,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_7aabab1c","line":67,"range":{"start_line":67,"start_character":21,"end_line":67,"end_character":25},"updated":"2017-12-04 17:33:34.000000000","message":"list of lists of Selection objects","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b69ea83186f5c6db5dc552ca2cfc91484d24bdaf","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        objects (1 for each instance) that satisfy the supplied request_spec,"},{"line_number":50,"context_line":"        along with a corresponding list of lists of matching"},{"line_number":51,"context_line":"        allocation_requests if available. The first element of the tuple"},{"line_number":52,"context_line":"        contains one list for each requested instnace, and each of those lists"},{"line_number":53,"context_line":"        consist of [chosen_host, alternate1, ..., alternateN], where the"},{"line_number":54,"context_line":"        \u0027chosen_host\u0027 has already had its resources claimed in Placement,"},{"line_number":55,"context_line":"        followed by zero or more alternates. The alternates are hosts that can"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_75ff68aa","line":52,"updated":"2017-08-23 20:17:08.000000000","message":"instance","commit_id":"7dcccc12f9f88bb58d183b8cae8da0b099cf3ef5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"530a2cf4591388f772cd444a8862491cad96a9cb","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        objects (1 for each instance) that satisfy the supplied request_spec,"},{"line_number":50,"context_line":"        along with a corresponding list of lists of matching"},{"line_number":51,"context_line":"        allocation_requests if available. The first element of the tuple"},{"line_number":52,"context_line":"        contains one list for each requested instnace, and each of those lists"},{"line_number":53,"context_line":"        consist of [chosen_host, alternate1, ..., alternateN], where the"},{"line_number":54,"context_line":"        \u0027chosen_host\u0027 has already had its resources claimed in Placement,"},{"line_number":55,"context_line":"        followed by zero or more alternates. The alternates are hosts that can"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_742bc781","line":52,"in_reply_to":"7f287b81_75ff68aa","updated":"2017-08-24 19:43:24.000000000","message":"Done","commit_id":"7dcccc12f9f88bb58d183b8cae8da0b099cf3ef5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b69ea83186f5c6db5dc552ca2cfc91484d24bdaf","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                for host in host_list:"},{"line_number":293,"context_line":"                    alloc_reqs \u003d alloc_reqs_by_rp_uuid[host.uuid]"},{"line_number":294,"context_line":"                    alloc_list.append(alloc_reqs[0])"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                # No allocations available, so create a list of empty lists"},{"line_number":297,"context_line":"                alloc_list \u003d [[]] * len(host_list)"},{"line_number":298,"context_line":"            selected_allocs.append(alloc_list)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_d594dc46","line":295,"updated":"2017-08-23 20:17:08.000000000","message":"Once we are in queens, it is a fault for allocations_available to be False if we are in the filter scheduler isn\u0027t it? We expect all the computed nodes to at least be pike?\n\nSo this branch is only the case when we\u0027re in the chance scheduler, yeah?","commit_id":"7dcccc12f9f88bb58d183b8cae8da0b099cf3ef5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"530a2cf4591388f772cd444a8862491cad96a9cb","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                for host in host_list:"},{"line_number":293,"context_line":"                    alloc_reqs \u003d alloc_reqs_by_rp_uuid[host.uuid]"},{"line_number":294,"context_line":"                    alloc_list.append(alloc_reqs[0])"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                # No allocations available, so create a list of empty lists"},{"line_number":297,"context_line":"                alloc_list \u003d [[]] * len(host_list)"},{"line_number":298,"context_line":"            selected_allocs.append(alloc_list)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_d4639bdb","line":295,"in_reply_to":"7f287b81_d594dc46","updated":"2017-08-24 19:43:24.000000000","message":"No, because it also covers the cases where alloc_reqs_by_rp_uuid is None. I am not certain that that will never be the case.","commit_id":"7dcccc12f9f88bb58d183b8cae8da0b099cf3ef5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cc6cf8cfd32d2994087767d50ff6c97debbb5c3","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":47,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":48,"context_line":"        \"\"\"Returns a 2-tuple, consisting of a list of sorted lists of HostState"},{"line_number":49,"context_line":"        objects (1 for each instance) that satisfy the supplied request_spec,"},{"line_number":50,"context_line":"        along with a corresponding list of lists of matching"},{"line_number":51,"context_line":"        allocation_requests if available. The first element of the tuple"},{"line_number":52,"context_line":"        contains one list for each requested instance, and each of those lists"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_a579e92f","line":49,"range":{"start_line":49,"start_character":17,"end_line":49,"end_character":19},"updated":"2017-08-25 10:57:06.000000000","message":"saying \"1 sorted list for each instance in the request)\" might be a little clearer.","commit_id":"4899535a5c3f75a815d8a10df7a3c9a4ed7379c1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def _schedule(self, context, spec_obj, instance_uuids,"},{"line_number":107,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":108,"context_line":"        \"\"\"Returns a list of lists of Selection objects."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        :param context: The RequestContext object"},{"line_number":111,"context_line":"        :param spec_obj: The RequestSpec object"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_ffd93182","line":108,"range":{"start_line":108,"start_character":26,"end_line":108,"end_character":34},"updated":"2017-10-02 23:05:31.000000000","message":"s/of lists//","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"834eae16cdbb5b52da04afcdcb61afe421ab1999","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            instance_uuid \u003d instance_uuids[num]"},{"line_number":199,"context_line":"            # Attempt to claim the resources against one or more resource"},{"line_number":200,"context_line":"            # providers, looping over the sorted list of possible hosts"},{"line_number":201,"context_line":"            # looking for an allocation request that contains that host\u0027s"},{"line_number":202,"context_line":"            # resource provider UUID"},{"line_number":203,"context_line":"            claimed_host \u003d None"},{"line_number":204,"context_line":"            for host in hosts:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_28f2039b","line":201,"updated":"2017-10-01 19:39:12.000000000","message":"Now we\u0027re going the other way, which is it?","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"834eae16cdbb5b52da04afcdcb61afe421ab1999","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":206,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":207,"context_line":"                    LOG.debug(\"Found host state %s that wasn\u0027t in \""},{"line_number":208,"context_line":"                              \"allocation requests. Skipping.\", cn_uuid)"},{"line_number":209,"context_line":"                    continue"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"                alloc_req \u003d alloc_reqs_by_rp_uuid[cn_uuid]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_08ed07b6","line":208,"updated":"2017-10-01 19:39:12.000000000","message":"ditto","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"834eae16cdbb5b52da04afcdcb61afe421ab1999","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"                alloc_req \u003d alloc_reqs_by_rp_uuid[cn_uuid]"},{"line_number":212,"context_line":"                if self._claim_resources(elevated, spec_obj, instance_uuid,"},{"line_number":213,"context_line":"                        alloc_req):"},{"line_number":214,"context_line":"                    claimed_host \u003d host"},{"line_number":215,"context_line":"                    break"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_e82d0bfe","line":213,"updated":"2017-10-01 19:39:12.000000000","message":"Is this part of this change, something you saw along the way, or rebase weird?","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"                alloc_req \u003d alloc_reqs_by_rp_uuid[cn_uuid]"},{"line_number":212,"context_line":"                if self._claim_resources(elevated, spec_obj, instance_uuid,"},{"line_number":213,"context_line":"                        alloc_req):"},{"line_number":214,"context_line":"                    claimed_host \u003d host"},{"line_number":215,"context_line":"                    break"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_5fca85a0","line":213,"in_reply_to":"7f515b1d_e82d0bfe","updated":"2017-10-02 23:05:31.000000000","message":"Yeah, this should be alloc_reqs, not alloc_req, since we\u0027re passing self._claim_resources() a *list* of allocation requests.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"834eae16cdbb5b52da04afcdcb61afe421ab1999","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # We weren\u0027t able to claim resources in the placement API"},{"line_number":219,"context_line":"                # for any of the sorted hosts identified. So, clean up any"},{"line_number":220,"context_line":"                # successfully-claimed resources for prior instances in"},{"line_number":221,"context_line":"                # this request and return an empty list which will cause"},{"line_number":222,"context_line":"                # select_destinations() to raise NoValidHost"},{"line_number":223,"context_line":"                LOG.debug(\"Unable to successfully claim against any host.\")"},{"line_number":224,"context_line":"                self._cleanup_allocations(claimed_instance_uuids)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_c8300f59","line":221,"updated":"2017-10-01 19:39:12.000000000","message":"comment doesn\u0027t matter return value","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                # select_destinations() to raise NoValidHost"},{"line_number":223,"context_line":"                LOG.debug(\"Unable to successfully claim against any host.\")"},{"line_number":224,"context_line":"                self._cleanup_allocations(claimed_instance_uuids)"},{"line_number":225,"context_line":"                return ([], [])"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            claimed_instance_uuids.append(instance_uuid)"},{"line_number":228,"context_line":"            claimed_hosts.append(claimed_host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_ffc25184","line":225,"updated":"2017-10-02 23:05:31.000000000","message":"Looks like possibly a rebase issue? This should still be:\n\n return []","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                                  \"allocation requests. Skipping.\", alt_uuid)"},{"line_number":266,"context_line":"                        continue"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"                    alloc_req \u003d alloc_reqs_by_rp_uuid[alt_uuid]"},{"line_number":269,"context_line":"                    alt_selection \u003d utils.create_selection_object(host,"},{"line_number":270,"context_line":"                            alloc_req)"},{"line_number":271,"context_line":"                    claimed_plus_alts.append(alt_selection)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_7f3301ac","line":268,"range":{"start_line":268,"start_character":20,"end_line":268,"end_character":30},"updated":"2017-10-02 23:05:31.000000000","message":"Should be alloc_reqs.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"643a520861f27000fce87415f8166ddd034fb6c0","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                              \"allocation requests. Skipping.\", cn_uuid)"},{"line_number":213,"context_line":"                    continue"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"                alloc_req \u003d alloc_reqs_by_rp_uuid[cn_uuid]"},{"line_number":216,"context_line":"                if self._claim_resources(elevated, spec_obj, instance_uuid,"},{"line_number":217,"context_line":"                        alloc_req):"},{"line_number":218,"context_line":"                    claimed_host \u003d host"},{"line_number":219,"context_line":"                    break"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_69409636","line":217,"range":{"start_line":215,"start_character":16,"end_line":217,"end_character":35},"updated":"2017-10-05 16:08:01.000000000","message":"Hmm, why are you changing this to the singular? The method name implies multiple reqs returned.","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"056a9b996be3d17316d64c25a96d6117932f040c","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                              \"allocation requests. Skipping.\", cn_uuid)"},{"line_number":213,"context_line":"                    continue"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"                alloc_req \u003d alloc_reqs_by_rp_uuid[cn_uuid]"},{"line_number":216,"context_line":"                if self._claim_resources(elevated, spec_obj, instance_uuid,"},{"line_number":217,"context_line":"                        alloc_req):"},{"line_number":218,"context_line":"                    claimed_host \u003d host"},{"line_number":219,"context_line":"                    break"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_5f734c81","line":217,"range":{"start_line":215,"start_character":16,"end_line":217,"end_character":35},"in_reply_to":"7f515b1d_69409636","updated":"2017-10-05 17:25:00.000000000","message":"Dunno - since it can be more than one, I\u0027ll change it back.","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"643a520861f27000fce87415f8166ddd034fb6c0","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # representing the selected host and zero or more alternates from the"},{"line_number":249,"context_line":"        # same cell."},{"line_number":250,"context_line":"        selections_to_return \u003d []"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        for claimed_host in claimed_hosts:"},{"line_number":253,"context_line":"            # This is the list of hosts for one particular instance."},{"line_number":254,"context_line":"            selection \u003d utils.create_selection_object(claimed_host, alloc_req)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_8972b2ac","line":251,"updated":"2017-10-05 16:08:01.000000000","message":"Whitespace damage","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"056a9b996be3d17316d64c25a96d6117932f040c","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # representing the selected host and zero or more alternates from the"},{"line_number":249,"context_line":"        # same cell."},{"line_number":250,"context_line":"        selections_to_return \u003d []"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        for claimed_host in claimed_hosts:"},{"line_number":253,"context_line":"            # This is the list of hosts for one particular instance."},{"line_number":254,"context_line":"            selection \u003d utils.create_selection_object(claimed_host, alloc_req)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_dfd29c34","line":251,"in_reply_to":"7f515b1d_8972b2ac","updated":"2017-10-05 17:25:00.000000000","message":"Done","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"643a520861f27000fce87415f8166ddd034fb6c0","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        for claimed_host in claimed_hosts:"},{"line_number":253,"context_line":"            # This is the list of hosts for one particular instance."},{"line_number":254,"context_line":"            selection \u003d utils.create_selection_object(claimed_host, alloc_req)"},{"line_number":255,"context_line":"            # Remove the allocation_request, to mark the resources as already"},{"line_number":256,"context_line":"            # claimed, by replacing it with the JSON-ified empty string."},{"line_number":257,"context_line":"            selection.allocation_request \u003d \u0027\"\"\u0027"},{"line_number":258,"context_line":"            claimed_plus_alts \u003d [selection]"},{"line_number":259,"context_line":"            cell_uuid \u003d claimed_host.cell_uuid"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_a9a44e09","line":257,"range":{"start_line":254,"start_character":12,"end_line":257,"end_character":47},"updated":"2017-10-05 16:08:01.000000000","message":"Um, WAT.\n\nIs this because we don\u0027t need to save the allocation request for the primary since it\u0027s already been claimed? If so, something other than this hacky \"set it to an empty json string\" thing would be better. Also, probably means that the allocation_request field in the object should be nullable so you can set it to None right? That\u0027d be cleaner I think.\n\nMaybe also a kwarg to the utility method that flags whether or not to actually set that field instead of setting it and then unsetting it here?","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"056a9b996be3d17316d64c25a96d6117932f040c","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        for claimed_host in claimed_hosts:"},{"line_number":253,"context_line":"            # This is the list of hosts for one particular instance."},{"line_number":254,"context_line":"            selection \u003d utils.create_selection_object(claimed_host, alloc_req)"},{"line_number":255,"context_line":"            # Remove the allocation_request, to mark the resources as already"},{"line_number":256,"context_line":"            # claimed, by replacing it with the JSON-ified empty string."},{"line_number":257,"context_line":"            selection.allocation_request \u003d \u0027\"\"\u0027"},{"line_number":258,"context_line":"            claimed_plus_alts \u003d [selection]"},{"line_number":259,"context_line":"            cell_uuid \u003d claimed_host.cell_uuid"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_5f3eac29","line":257,"range":{"start_line":254,"start_character":12,"end_line":257,"end_character":47},"in_reply_to":"7f515b1d_a9a44e09","updated":"2017-10-05 17:25:00.000000000","message":"I\u0027ve moved the utils method into a classmethod on the Selection object, making all the params except host_state optional. The alloc is now simply omitted.\n\nWe need the alloc to be empty because a) it\u0027s already been claimed, and b) we can\u0027t distinguish between when the build is the original attempt from superconductor or a retry from cell conductor. The absence of an allocation tells the conductor not to bother attempting a claim.","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"643a520861f27000fce87415f8166ddd034fb6c0","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            selection.allocation_request \u003d \u0027\"\"\u0027"},{"line_number":258,"context_line":"            claimed_plus_alts \u003d [selection]"},{"line_number":259,"context_line":"            cell_uuid \u003d claimed_host.cell_uuid"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"            # This will populate the alternates with many of the same unclaimed"},{"line_number":262,"context_line":"            # hosts. This is OK, as it should be rare for a build to fail. And"},{"line_number":263,"context_line":"            # if there are not enough hosts to fully populate the alternates,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_4964bae5","line":260,"updated":"2017-10-05 16:08:01.000000000","message":"Also here","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"643a520861f27000fce87415f8166ddd034fb6c0","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    alt_uuid \u003d host.uuid"},{"line_number":270,"context_line":"                    if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":271,"context_line":"                        LOG.debug(\"Found host state %s that wasn\u0027t in \""},{"line_number":272,"context_line":"                                  \"allocation requests. Skipping.\", alt_uuid)"},{"line_number":273,"context_line":"                        continue"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"                    alloc_req \u003d alloc_reqs_by_rp_uuid[alt_uuid]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_29029eb5","line":272,"updated":"2017-10-05 16:08:01.000000000","message":"This debug message isn\u0027t very meaningful to me, even with having half of this context in my head. I expect later it will mean even less to someone debugging an issue. Can you make it a little more descriptive? Could also use a comment above this about what you\u0027re handling here.","commit_id":"8c8ab126878034c71f12a2cd9e4be59843dbd962"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e45888a27283ee533c6d9a0cccfd1a2c0a0f38","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    alt_uuid \u003d host.uuid"},{"line_number":271,"context_line":"                    if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":272,"context_line":"                        msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not \""},{"line_number":273,"context_line":"                              \"have a matching allocation_request was \""},{"line_number":274,"context_line":"                              \"encountered while attempting to claim \""},{"line_number":275,"context_line":"                              \"resources for an instance. This host was \""},{"line_number":276,"context_line":"                              \"skipped.\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_5b28f232","line":273,"updated":"2017-10-21 03:45:04.000000000","message":"indent","commit_id":"bd29047453253707fe2fea6d7fdec040bd8577ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e45888a27283ee533c6d9a0cccfd1a2c0a0f38","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                              \"encountered while attempting to claim \""},{"line_number":275,"context_line":"                              \"resources for an instance. This host was \""},{"line_number":276,"context_line":"                              \"skipped.\")"},{"line_number":277,"context_line":"                        LOG.debug(msg, cn_uuid)"},{"line_number":278,"context_line":"                        continue"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"                    alloc_req \u003d alloc_reqs_by_rp_uuid[alt_uuid]"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_7b316ea2","line":277,"range":{"start_line":277,"start_character":39,"end_line":277,"end_character":46},"updated":"2017-10-21 03:45:04.000000000","message":"alt_uuid","commit_id":"bd29047453253707fe2fea6d7fdec040bd8577ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7d5a1b47348251dcc2e2475e7cf640527396c7e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            # refreshed according to database in next schedule, and release"},{"line_number":98,"context_line":"            # the resource consumed by instance in the process of selecting"},{"line_number":99,"context_line":"            # host."},{"line_number":100,"context_line":"            for host_list in selected_host_lists:"},{"line_number":101,"context_line":"                host_list[0].updated \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            # Log the details but don\u0027t put those into the reason since"},{"line_number":104,"context_line":"            # we don\u0027t want to give away too much information about our"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_fd74a4ff","side":"PARENT","line":101,"range":{"start_line":100,"start_character":12,"end_line":101,"end_character":43},"updated":"2017-10-26 21:38:21.000000000","message":"did you mean to remove this?","commit_id":"42e0ae0ab41da642b1a11c6d8b9ff7e3c621109c"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"91847f4f342dd973b2b219fc9c7ef0bce152c3ba","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            # refreshed according to database in next schedule, and release"},{"line_number":98,"context_line":"            # the resource consumed by instance in the process of selecting"},{"line_number":99,"context_line":"            # host."},{"line_number":100,"context_line":"            for host_list in selected_host_lists:"},{"line_number":101,"context_line":"                host_list[0].updated \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            # Log the details but don\u0027t put those into the reason since"},{"line_number":104,"context_line":"            # we don\u0027t want to give away too much information about our"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_837bfff2","side":"PARENT","line":101,"range":{"start_line":100,"start_character":12,"end_line":101,"end_character":43},"in_reply_to":"3f4b6375_4333c762","updated":"2017-10-27 14:19:04.000000000","message":"This one. Just running tests...","commit_id":"42e0ae0ab41da642b1a11c6d8b9ff7e3c621109c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bb05a68061a69c68afb10539eeccda67083f77d","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            # refreshed according to database in next schedule, and release"},{"line_number":98,"context_line":"            # the resource consumed by instance in the process of selecting"},{"line_number":99,"context_line":"            # host."},{"line_number":100,"context_line":"            for host_list in selected_host_lists:"},{"line_number":101,"context_line":"                host_list[0].updated \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            # Log the details but don\u0027t put those into the reason since"},{"line_number":104,"context_line":"            # we don\u0027t want to give away too much information about our"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_4333c762","side":"PARENT","line":101,"range":{"start_line":100,"start_character":12,"end_line":101,"end_character":43},"in_reply_to":"3f4b6375_83badfbd","updated":"2017-10-27 14:17:25.000000000","message":"k. makes sense. are you going to do that work in this patch? or a different patch?","commit_id":"42e0ae0ab41da642b1a11c6d8b9ff7e3c621109c"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ca1876f0bba34ae5d0c9dbaeb004078a0cde248f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            # refreshed according to database in next schedule, and release"},{"line_number":98,"context_line":"            # the resource consumed by instance in the process of selecting"},{"line_number":99,"context_line":"            # host."},{"line_number":100,"context_line":"            for host_list in selected_host_lists:"},{"line_number":101,"context_line":"                host_list[0].updated \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            # Log the details but don\u0027t put those into the reason since"},{"line_number":104,"context_line":"            # we don\u0027t want to give away too much information about our"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_83badfbd","side":"PARENT","line":101,"range":{"start_line":100,"start_character":12,"end_line":101,"end_character":43},"in_reply_to":"3f4b6375_fd74a4ff","updated":"2017-10-27 14:13:44.000000000","message":"It was supposed to have been moved to the _schedule() method, since we don\u0027t have HostState objects anymore at this point. The NoValidHost exception also has to be moved.","commit_id":"42e0ae0ab41da642b1a11c6d8b9ff7e3c621109c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7d5a1b47348251dcc2e2475e7cf640527396c7e","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":213,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":214,"context_line":"                          \"attempting to claim resources for an instance. \""},{"line_number":215,"context_line":"                          \"This host was skipped.\")"},{"line_number":216,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":217,"context_line":"                    continue"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_bd64ec4a","line":215,"updated":"2017-10-26 21:38:21.000000000","message":"++ nice improvement to the message.","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7d5a1b47348251dcc2e2475e7cf640527396c7e","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                # select_destinations() to raise NoValidHost"},{"line_number":231,"context_line":"                LOG.debug(\"Unable to successfully claim against any host.\")"},{"line_number":232,"context_line":"                self._cleanup_allocations(claimed_instance_uuids)"},{"line_number":233,"context_line":"                return ([[]])"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            claimed_instance_uuids.append(instance_uuid)"},{"line_number":236,"context_line":"            claimed_hosts.append(claimed_host)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_7dcf9428","line":233,"updated":"2017-10-26 21:38:21.000000000","message":"the outer parens aren\u0027t necessary and actually just make the above harder to read than just \"return [[]]\"","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ca1876f0bba34ae5d0c9dbaeb004078a0cde248f","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                # select_destinations() to raise NoValidHost"},{"line_number":231,"context_line":"                LOG.debug(\"Unable to successfully claim against any host.\")"},{"line_number":232,"context_line":"                self._cleanup_allocations(claimed_instance_uuids)"},{"line_number":233,"context_line":"                return ([[]])"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            claimed_instance_uuids.append(instance_uuid)"},{"line_number":236,"context_line":"            claimed_hosts.append(claimed_host)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_e3c87355","line":233,"in_reply_to":"3f4b6375_7dcf9428","updated":"2017-10-27 14:13:44.000000000","message":"Done","commit_id":"57e8a233dd1ca43634ae083d672fbb988224fa1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries):"},{"line_number":48,"context_line":"        \"\"\"Returns a list of sorted lists of HostState objects (1 for each"},{"line_number":49,"context_line":"        instance) that would satisfy the supplied request_spec. Each of those"},{"line_number":50,"context_line":"        lists consist of [chosen_host, alternate1, ..., alternateN], where the"},{"line_number":51,"context_line":"        \u0027chosen_host\u0027 has already had its resources claimed in Placement,"},{"line_number":52,"context_line":"        followed by zero or more alternates. The alternates are hosts that can"},{"line_number":53,"context_line":"        satisfy the request, and are included so that if the build for the"},{"line_number":54,"context_line":"        chosen host fails, the cell conductor can retry."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :param context: The RequestContext object"},{"line_number":57,"context_line":"        :param spec_obj: The RequestSpec object"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_102105b1","side":"PARENT","line":54,"range":{"start_line":50,"start_character":69,"end_line":54,"end_character":56},"updated":"2017-11-15 20:09:36.000000000","message":"This is still useful information, why did you remove it?","commit_id":"80921d5207df82655059756a033c5e8fbbcea819"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        selected_host_lists \u003d self._schedule(context, spec_obj, instance_uuids,"},{"line_number":91,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # Couldn\u0027t fulfill the request_spec"},{"line_number":94,"context_line":"        if len(selected_host_lists) \u003c num_instances:"},{"line_number":95,"context_line":"            # NOTE(Rui Chen): If multiple creates failed, set the updated time"},{"line_number":96,"context_line":"            # of selected HostState to None so that these HostStates are"},{"line_number":97,"context_line":"            # refreshed according to database in next schedule, and release"},{"line_number":98,"context_line":"            # the resource consumed by instance in the process of selecting"},{"line_number":99,"context_line":"            # host."},{"line_number":100,"context_line":"            for host_list in selected_host_lists:"},{"line_number":101,"context_line":"                host_list[0].updated \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            # Log the details but don\u0027t put those into the reason since"},{"line_number":104,"context_line":"            # we don\u0027t want to give away too much information about our"},{"line_number":105,"context_line":"            # actual environment."},{"line_number":106,"context_line":"            LOG.debug(\u0027There are %(hosts)d hosts available but \u0027"},{"line_number":107,"context_line":"                      \u0027%(num_instances)d instances requested to build.\u0027,"},{"line_number":108,"context_line":"                      {\u0027hosts\u0027: len(selected_host_lists),"},{"line_number":109,"context_line":"                       \u0027num_instances\u0027: num_instances})"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            reason \u003d _(\u0027There are not enough hosts available.\u0027)"},{"line_number":112,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        self.notifier.info("},{"line_number":115,"context_line":"            context, \u0027scheduler.select_destinations.end\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_eb1f9c58","side":"PARENT","line":112,"range":{"start_line":93,"start_character":8,"end_line":112,"end_character":54},"updated":"2017-11-15 20:09:36.000000000","message":"Why did this all need to be refactored in this patch? I thought this change was just changing the driver to return Selection objects instead of HostState objects, similar to the simpler change in the chance filter?","commit_id":"80921d5207df82655059756a033c5e8fbbcea819"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":48,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":49,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":50,"context_line":"        \"\"\"Returns a list of Selection objects, which represent the selected"},{"line_number":51,"context_line":"        hosts and alternates for each instance."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        :param context: The RequestContext object"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_2b013406","line":50,"range":{"start_line":50,"start_character":21,"end_line":50,"end_character":25},"updated":"2017-11-15 20:09:36.000000000","message":"Isn\u0027t this a list of lists of Selection objects?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def select_destinations(self, context, spec_obj, instance_uuids,"},{"line_number":48,"context_line":"            alloc_reqs_by_rp_uuid, provider_summaries,"},{"line_number":49,"context_line":"            allocation_request_version\u003dNone):"},{"line_number":50,"context_line":"        \"\"\"Returns a list of Selection objects, which represent the selected"},{"line_number":51,"context_line":"        hosts and alternates for each instance."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        :param context: The RequestContext object"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_268ccb34","line":50,"range":{"start_line":50,"start_character":21,"end_line":50,"end_character":25},"in_reply_to":"1f485f77_2b013406","updated":"2017-11-15 21:09:40.000000000","message":"Done","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if not hosts:"},{"line_number":182,"context_line":"                # NOTE(jaypipes): If we get here, that means not all instances"},{"line_number":183,"context_line":"                # in instance_uuids were able to be matched to a selected host."},{"line_number":184,"context_line":"                # Any allocations will be cleaned up in the"},{"line_number":185,"context_line":"                # _ensure_sufficient_hosts() call."},{"line_number":186,"context_line":"                break"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            instance_uuid \u003d instance_uuids[num]"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_8b3f08b3","line":185,"range":{"start_line":184,"start_character":16,"end_line":185,"end_character":50},"updated":"2017-11-15 20:09:36.000000000","message":"Why does this need to change in this patch?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            for host in hosts:"},{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"attempting to claim resources for an instance. \""},{"line_number":200,"context_line":"                          \"This host was skipped.\")"},{"line_number":201,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":202,"context_line":"                    continue"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"                alloc_reqs \u003d alloc_reqs_by_rp_uuid[cn_uuid]"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_8b6828b9","line":201,"range":{"start_line":197,"start_character":20,"end_line":201,"end_character":43},"updated":"2017-11-15 20:09:36.000000000","message":"Why does this need to change in this patch? Seriously, the amount of unrelated change in this patch is really frustrating and it slows down review on not only this patch but the rest of the series.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            for host in hosts:"},{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"attempting to claim resources for an instance. \""},{"line_number":200,"context_line":"                          \"This host was skipped.\")"},{"line_number":201,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":202,"context_line":"                    continue"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"                alloc_reqs \u003d alloc_reqs_by_rp_uuid[cn_uuid]"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_e1545d00","line":201,"range":{"start_line":197,"start_character":20,"end_line":201,"end_character":43},"in_reply_to":"1f485f77_8b6828b9","updated":"2017-11-15 21:09:40.000000000","message":"I\u0027ll move it into a patch before this one.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            alloc_reqs_by_rp_uuid, allocation_request_version)"},{"line_number":237,"context_line":"        return selections_to_return"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def _ensure_sufficient_hosts(self, hosts, required_count,"},{"line_number":240,"context_line":"            claimed_uuids\u003dNone):"},{"line_number":241,"context_line":"        \"\"\"Checks that we have selected a host for each requested instance. If"},{"line_number":242,"context_line":"        not, log this failure, remove allocations for any claimed instances,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_4bb3504e","line":239,"range":{"start_line":239,"start_character":8,"end_line":239,"end_character":32},"updated":"2017-11-15 20:09:36.000000000","message":"Please leave this refactor for another separate patch, it doesn\u0027t belong in this change which should just be about having the drivers return Selection objects instead of HostState objects.\n\nIf this is needed for some reason, like we have to do this separately before we convert HostState to Selection objects, then let\u0027s separate this into a patch below this change so it\u0027s clear about what the purpose is and to make sure we aren\u0027t regressing something.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e72d44a60045831f3d67c1018ba87d45a2b2d7f4","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        not, log this failure, remove allocations for any claimed instances,"},{"line_number":243,"context_line":"        and raise a NoValidHost exception."},{"line_number":244,"context_line":"        \"\"\""},{"line_number":245,"context_line":"        if len(hosts) \u003d\u003d required_count:"},{"line_number":246,"context_line":"            # We have enough hosts."},{"line_number":247,"context_line":"            return"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_c637374d","line":245,"range":{"start_line":245,"start_character":22,"end_line":245,"end_character":24},"updated":"2017-11-15 20:52:50.000000000","message":"\u003c ?\n\nThe original check in select_destinations is using \u003c. I\u0027m not sure if we could have \u003e\u003d but it seems best to use the same logic we\u0027ve always had.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        selections_to_return \u003d []"},{"line_number":386,"context_line":"        for selected_host in selected_hosts:"},{"line_number":387,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":388,"context_line":"            # first host has already had resources claimed, do not include that"},{"line_number":389,"context_line":"            # in the Selection object, so that the conductor will know not to"},{"line_number":390,"context_line":"            # attempt to re-allocate."},{"line_number":391,"context_line":"            selection \u003d objects.Selection.create_from_host_state(selected_host)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_0b967840","line":388,"range":{"start_line":388,"start_character":75,"end_line":388,"end_character":79},"updated":"2017-11-15 20:09:36.000000000","message":"include what? The allocation_request and allocation_request_version?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        selections_to_return \u003d []"},{"line_number":386,"context_line":"        for selected_host in selected_hosts:"},{"line_number":387,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":388,"context_line":"            # first host has already had resources claimed, do not include that"},{"line_number":389,"context_line":"            # in the Selection object, so that the conductor will know not to"},{"line_number":390,"context_line":"            # attempt to re-allocate."},{"line_number":391,"context_line":"            selection \u003d objects.Selection.create_from_host_state(selected_host)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_2633ab16","line":388,"range":{"start_line":388,"start_character":75,"end_line":388,"end_character":79},"in_reply_to":"1f485f77_0b967840","updated":"2017-11-15 21:09:40.000000000","message":"It\u0027s only the allocation_request that matters. I\u0027ve changed the wording.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":408,"context_line":"                            msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did \""},{"line_number":409,"context_line":"                                   \"not have a matching allocation_request \""},{"line_number":410,"context_line":"                                   \"was encountered while attempting to claim \""},{"line_number":411,"context_line":"                                   \"resources for an instance. This host was \""},{"line_number":412,"context_line":"                                   \"skipped.\")"},{"line_number":413,"context_line":"                            LOG.debug(msg, alt_uuid)"},{"line_number":414,"context_line":"                            continue"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_cb862014","line":411,"range":{"start_line":410,"start_character":52,"end_line":411,"end_character":61},"updated":"2017-11-15 20:09:36.000000000","message":"This is copied from above but incorrect - we\u0027re not actually attempting to claim resources on the alternates.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":408,"context_line":"                            msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did \""},{"line_number":409,"context_line":"                                   \"not have a matching allocation_request \""},{"line_number":410,"context_line":"                                   \"was encountered while attempting to claim \""},{"line_number":411,"context_line":"                                   \"resources for an instance. This host was \""},{"line_number":412,"context_line":"                                   \"skipped.\")"},{"line_number":413,"context_line":"                            LOG.debug(msg, alt_uuid)"},{"line_number":414,"context_line":"                            continue"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_467b47bd","line":411,"range":{"start_line":410,"start_character":52,"end_line":411,"end_character":61},"in_reply_to":"1f485f77_cb862014","updated":"2017-11-15 21:09:40.000000000","message":"Done","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b4a5308832396bb18d95aa5831dc1c48cde299c0","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                        alt_uuid \u003d host.uuid"},{"line_number":406,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":407,"context_line":"                            msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did \""},{"line_number":408,"context_line":"                            \"not have a matching allocation_request was \""},{"line_number":409,"context_line":"                            \"encountered while scheduling. This host was \""},{"line_number":410,"context_line":"                            \"skipped.\")"},{"line_number":411,"context_line":"                            LOG.debug(msg, alt_uuid)"},{"line_number":412,"context_line":"                            continue"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_d93c9a30","line":410,"range":{"start_line":408,"start_character":28,"end_line":410,"end_character":39},"updated":"2017-11-16 16:12:19.000000000","message":"femto-nit: indentation...","commit_id":"c86ba5681668a29afb3139e1fa79a094647d44c2"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"69637ce3d5375f29cd973373e2716ae6d6b64bfd","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                        alt_uuid \u003d host.uuid"},{"line_number":406,"context_line":"                        if alt_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":407,"context_line":"                            msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did \""},{"line_number":408,"context_line":"                            \"not have a matching allocation_request was \""},{"line_number":409,"context_line":"                            \"encountered while scheduling. This host was \""},{"line_number":410,"context_line":"                            \"skipped.\")"},{"line_number":411,"context_line":"                            LOG.debug(msg, alt_uuid)"},{"line_number":412,"context_line":"                            continue"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_cf8e0c78","line":410,"range":{"start_line":408,"start_character":28,"end_line":410,"end_character":39},"in_reply_to":"1f485f77_d93c9a30","updated":"2017-11-16 16:56:47.000000000","message":"Done","commit_id":"c86ba5681668a29afb3139e1fa79a094647d44c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07d068f75e7f5d2f7d6bbdb20034ad06fc1a3770","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            for host in hosts:"},{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"scheduling. This host was skipped.\")"},{"line_number":200,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_89ec8f8f","line":199,"range":{"start_line":197,"start_character":20,"end_line":199,"end_character":63},"updated":"2017-11-16 19:29:29.000000000","message":"This doesn\u0027t need to change in this patch.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"85693e808fddc33f56f5584cc4e3f4ed9b8cdce7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            for host in hosts:"},{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"scheduling. This host was skipped.\")"},{"line_number":200,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_721013a9","line":199,"range":{"start_line":197,"start_character":20,"end_line":199,"end_character":63},"in_reply_to":"1f485f77_1299e477","updated":"2017-11-19 21:58:22.000000000","message":"OK, well, (1) alignment and (2) this could have a subtle difference in saying it wasn\u0027t found while claiming, but that\u0027s up to you.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            for host in hosts:"},{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"scheduling. This host was skipped.\")"},{"line_number":200,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_1299e477","line":199,"range":{"start_line":197,"start_character":20,"end_line":199,"end_character":63},"in_reply_to":"1f485f77_89ec8f8f","updated":"2017-11-16 21:27:56.000000000","message":"Well, it seemed inconsistent to have two very different error messages for the exact same failure. See L405. Also, Jay already agreed to this change back in https://review.openstack.org/#/c/495854/20/nova/scheduler/filter_scheduler.py@215","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9308bb3485507e2efb73c5cc4d201203aba04378","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        selections_to_return \u003d []"},{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_8c85bdd1","line":388,"range":{"start_line":387,"start_character":60,"end_line":388,"end_character":62},"updated":"2017-11-16 19:56:00.000000000","message":"Do you assert this in any of the tests? i.e. that the first Selection object doesn\u0027t have these fields set, but the alternates do?","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        selections_to_return \u003d []"},{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_72237857","line":388,"range":{"start_line":387,"start_character":60,"end_line":388,"end_character":62},"in_reply_to":"1f485f77_8c85bdd1","updated":"2017-11-16 21:27:56.000000000","message":"No, not completely. The test at https://review.openstack.org/#/c/495854/31/nova/tests/unit/scheduler/test_filter_scheduler.py@205 tests that the first is empty, but it only returns one. I can update that to return more than one, and test that the others are not empty.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07d068f75e7f5d2f7d6bbdb20034ad06fc1a3770","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"},{"line_number":392,"context_line":"            cell_uuid \u003d selected_host.cell_uuid"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_697833c3","line":389,"range":{"start_line":388,"start_character":64,"end_line":389,"end_character":64},"updated":"2017-11-16 19:29:29.000000000","message":"I can\u0027t say I like the assumed tight-coupling between scheduler behavior and conductor here.\n\nFor the originally selected host, conductor is not going to attempt a claim on it during schedule_and_build_instances, it\u0027s just going to use it to create the instance mapping in the cell, create the instance in that cell and cast to the compute host in that cell.\n\nThe reschedules are what\u0027s going to involve claims on the alternates, and that will happen in the conductor build_instances method, right? And, I haven\u0027t gotten there yet, but I assume we\u0027ll have logic that removes any entries from the Selection objects list for hosts that we\u0027ve already tried, similar to what we put into the RequestSpec.retry.hosts field.\n\nWhether we include the allocation_request in the chosen host on the first go-around might not make any difference in the end, but I just get a bit queasy putting comments in the scheduler code about how the conductor is going to work based on what we\u0027re doing here.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"876188558f955db4edd0cf99ccb526c4f03e8eca","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"},{"line_number":392,"context_line":"            cell_uuid \u003d selected_host.cell_uuid"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_ef00a303","line":389,"range":{"start_line":388,"start_character":64,"end_line":389,"end_character":64},"in_reply_to":"1f485f77_697833c3","updated":"2017-11-16 20:03:17.000000000","message":"What about if Selection had a allocated\u003d(True|False) flag in it so conductor could just do the (de-)allocation based on that without the implied \"if N\u003e1, do allocation tweakage\" behavior?","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"},{"line_number":392,"context_line":"            cell_uuid \u003d selected_host.cell_uuid"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_12e1e42a","line":389,"range":{"start_line":388,"start_character":64,"end_line":389,"end_character":64},"in_reply_to":"1f485f77_afc98bac","updated":"2017-11-16 21:27:56.000000000","message":"This was the design we had discussed at the PTG. I don\u0027t remember exactly sure who \"we\" were, but this was the consensus then.\n\nAny time a build fails, compute will delete the allocations for the instance - it doesn\u0027t rely on the info in Selection for that.\n\nI put the comments in there to make it clearer for the reviewers, frankly, and would be happy to change/remove the references to the conductor. I don\u0027t understand the ickiness of including ARs in a selection object if there is a possibility that they be used. The selected host\u0027s Selection object will *never* need its AR, so why include it?\n\nIn any case, I can determine whether we need to claim in the conductor using another method. So if we no longer rely on this being empty to make that determination, there\u0027s still no reason to include it, is there?","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"65b3ed8881cc6768b62b0ef78ab6150a5b23722f","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        for selected_host in selected_hosts:"},{"line_number":386,"context_line":"            # This is the list of hosts for one particular instance. Since the"},{"line_number":387,"context_line":"            # first host has already had resources claimed, do not include its"},{"line_number":388,"context_line":"            # allocation_request value in the Selection object, so that the"},{"line_number":389,"context_line":"            # conductor will know not to attempt to re-allocate."},{"line_number":390,"context_line":"            selection \u003d objects.Selection.from_host_state(selected_host)"},{"line_number":391,"context_line":"            selected_plus_alts \u003d [selection]"},{"line_number":392,"context_line":"            cell_uuid \u003d selected_host.cell_uuid"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_afc98bac","line":389,"range":{"start_line":388,"start_character":64,"end_line":389,"end_character":64},"in_reply_to":"1f485f77_ef00a303","updated":"2017-11-16 20:11:21.000000000","message":"Hmm, I guess you are keying off this in conductor:\n\nhttps://review.openstack.org/#/c/511358/24/nova/conductor/manager.py@582\n\nI was expecting you to just skip hosts that have already been processed, which would be in RequestSpec.retry.hosts (and filter_properties if we don\u0027t have a request_spec in build_instance - which we don\u0027t I guess: https://review.openstack.org/#/c/515495/ ) - still seems icky, we can determine from Selection.service_host if we\u0027re already tried a given host by using filter_properties[\u0027retry\u0027][\u0027hosts\u0027].\n\nOr go with Dan\u0027s idea an add a flag in the Selection object to say if it\u0027s allocations have been claimed so we can key off that.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50a6341d7506d98fd3e243315e9b507e4a673a8a","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                cn_uuid \u003d host.uuid"},{"line_number":196,"context_line":"                if cn_uuid not in alloc_reqs_by_rp_uuid:"},{"line_number":197,"context_line":"                    msg \u003d (\"A host state with uuid \u003d \u0027%s\u0027 that did not have a \""},{"line_number":198,"context_line":"                          \"matching allocation_request was encountered while \""},{"line_number":199,"context_line":"                          \"scheduling. This host was skipped.\")"},{"line_number":200,"context_line":"                    LOG.debug(msg, cn_uuid)"},{"line_number":201,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":34,"id":"1f485f77_82e8b8b2","line":198,"updated":"2017-11-19 15:37:17.000000000","message":"femto: indentation.","commit_id":"288cba29ec8a78adf430d36ae2736537568f5e86"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":160,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":161,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":162,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":163,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":164,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":165,"context_line":"            # clean up once we no longer have to worry about older conductors."}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_fae9fb7f","line":162,"range":{"start_line":162,"start_character":18,"end_line":162,"end_character":39},"updated":"2017-12-04 17:33:34.000000000","message":"This actually happens higher in the stack now.","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":161,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":162,"context_line":"            # the older-style HostState objects without alternates."},{"line_number":163,"context_line":"            # NOTE(edleafe): moving this logic into a separate method, as this"},{"line_number":164,"context_line":"            # method is already way too long. It will also make it easier to"},{"line_number":165,"context_line":"            # clean up once we no longer have to worry about older conductors."},{"line_number":166,"context_line":"            include_alternates \u003d (instance_uuids is not None)"},{"line_number":167,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"},{"line_number":168,"context_line":"                    num_to_return, include_alternates)"}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_ba037342","line":165,"range":{"start_line":163,"start_character":12,"end_line":165,"end_character":78},"updated":"2017-12-04 17:33:34.000000000","message":"This is already done with _legacy_find_hosts yes?","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        selected_hosts \u003d []"},{"line_number":331,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":332,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":333,"context_line":"        # will be a list of HostState objects representing the selected host"},{"line_number":334,"context_line":"        # along with alternates from the same cell. When \u0027include_alternates\u0027"},{"line_number":335,"context_line":"        # is False, the return value will be a list of HostState objects, with"},{"line_number":336,"context_line":"        # one per requested instance."}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_5a9a6714","line":333,"range":{"start_line":333,"start_character":28,"end_line":333,"end_character":37},"updated":"2017-12-04 17:33:34.000000000","message":"Selection","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":333,"context_line":"        # will be a list of HostState objects representing the selected host"},{"line_number":334,"context_line":"        # along with alternates from the same cell. When \u0027include_alternates\u0027"},{"line_number":335,"context_line":"        # is False, the return value will be a list of HostState objects, with"},{"line_number":336,"context_line":"        # one per requested instance."},{"line_number":337,"context_line":"        selections_to_return \u003d []"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_ba8853c6","line":335,"range":{"start_line":335,"start_character":55,"end_line":335,"end_character":64},"updated":"2017-12-04 17:33:34.000000000","message":"Selection","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b101b920d84f111960e4d60bc786206850b560e1","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":379,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":380,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":381,"context_line":"        # item per instance, and that item will be a list of HostState objects"},{"line_number":382,"context_line":"        # representing the selected host along with alternates from the same"},{"line_number":383,"context_line":"        # cell."},{"line_number":384,"context_line":"        selections_to_return \u003d []"}],"source_content_type":"text/x-python","patch_set":36,"id":"df87a7cf_7a92cbf8","line":381,"range":{"start_line":381,"start_character":61,"end_line":381,"end_character":70},"updated":"2017-12-04 17:33:34.000000000","message":"Selection","commit_id":"0a7a6961158ec2cffb45a57ef095d152e1e985ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97b0c6ad1403c9014fd404fe9b4220e3a5fe042c","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":328,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":329,"context_line":"        # will be a list of HostState objects representing the selected host"},{"line_number":330,"context_line":"        # along with alternates from the same cell. When \u0027include_alternates\u0027"},{"line_number":331,"context_line":"        # is False, the return value will be a list of HostState objects, with"},{"line_number":332,"context_line":"        # one per requested instance."},{"line_number":333,"context_line":"        selections_to_return \u003d []"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        for num in range(num_instances):"}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_d9343c4d","side":"PARENT","line":332,"range":{"start_line":330,"start_character":52,"end_line":332,"end_character":37},"updated":"2017-12-05 01:33:33.000000000","message":"Removing this comment doesn\u0027t change the fact that we\u0027re returning different things from this method, which would blow up in the scheduler manager code when converting to the old style list of dicts that get returned (and which now assumes only Selection objects are coming back from the driver - but not in this case).","commit_id":"d75240b9287150753de26a403b97eeb2796da067"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d894fa65ab909a2fd5bf5924472f67e74f6e5f8","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        selected_hosts \u003d []"},{"line_number":331,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":332,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":333,"context_line":"        # will be a list of Selection objects representing the selected host"},{"line_number":334,"context_line":"        # along with alternates from the same cell."},{"line_number":335,"context_line":"        selections_to_return \u003d []"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_d9b51cf0","line":333,"range":{"start_line":333,"start_character":28,"end_line":333,"end_character":37},"updated":"2017-12-05 01:25:33.000000000","message":"I guess this isn\u0027t true if include_alternates is False...","commit_id":"0b7742b4d009f95a58aab1ab635714e39073781d"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"96429e917664a553fa37006207f19218558a2b75","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        selected_hosts \u003d []"},{"line_number":331,"context_line":"        # This the overall list of values to be returned. There will be one"},{"line_number":332,"context_line":"        # item per instance, and when \u0027include_alternates\u0027 is True, that item"},{"line_number":333,"context_line":"        # will be a list of Selection objects representing the selected host"},{"line_number":334,"context_line":"        # along with alternates from the same cell."},{"line_number":335,"context_line":"        selections_to_return \u003d []"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_47ed9489","line":333,"range":{"start_line":333,"start_character":28,"end_line":333,"end_character":37},"in_reply_to":"df87a7cf_d9b51cf0","updated":"2017-12-05 15:35:03.000000000","message":"All of the things you are catching here are fixed in the next few patches in the series. I assume that the repeated splitting of patches resulted in this one having a mix of old and new. I\u0027ll move those changes down to this patch.","commit_id":"0b7742b4d009f95a58aab1ab635714e39073781d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d894fa65ab909a2fd5bf5924472f67e74f6e5f8","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                selected_hosts, spec_obj, hosts, num, num_to_return)"},{"line_number":354,"context_line":"            return selections_to_return"},{"line_number":355,"context_line":"        # No alternatives but we still need to return a list of lists of hosts"},{"line_number":356,"context_line":"        return [[host] for host in selected_hosts]"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @staticmethod"},{"line_number":359,"context_line":"    def _consume_selected_host(selected_host, spec_obj):"}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_39a688c3","line":356,"updated":"2017-12-05 01:25:33.000000000","message":"Don\u0027t we need to convert these to Selection objects?","commit_id":"0b7742b4d009f95a58aab1ab635714e39073781d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d894fa65ab909a2fd5bf5924472f67e74f6e5f8","unresolved":false,"context_lines":[{"line_number":376,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":377,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":378,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":379,"context_line":"        # item per instance, and that item will be a list of Selection objects"},{"line_number":380,"context_line":"        # representing the selected host along with alternates from the same"},{"line_number":381,"context_line":"        # cell."},{"line_number":382,"context_line":"        selections_to_return \u003d []"}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_d9aafc83","line":379,"range":{"start_line":379,"start_character":53,"end_line":379,"end_character":70},"updated":"2017-12-05 01:25:33.000000000","message":"list of lists of Selection objects?","commit_id":"0b7742b4d009f95a58aab1ab635714e39073781d"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"96429e917664a553fa37006207f19218558a2b75","unresolved":false,"context_lines":[{"line_number":376,"context_line":"            # hosts again to get an accurate count for alternates."},{"line_number":377,"context_line":"            hosts \u003d self._get_sorted_hosts(spec_obj, hosts, index)"},{"line_number":378,"context_line":"        # This is the overall list of values to be returned. There will be one"},{"line_number":379,"context_line":"        # item per instance, and that item will be a list of Selection objects"},{"line_number":380,"context_line":"        # representing the selected host along with alternates from the same"},{"line_number":381,"context_line":"        # cell."},{"line_number":382,"context_line":"        selections_to_return \u003d []"}],"source_content_type":"text/x-python","patch_set":37,"id":"df87a7cf_2ab615fc","line":379,"range":{"start_line":379,"start_character":53,"end_line":379,"end_character":70},"in_reply_to":"df87a7cf_d9aafc83","updated":"2017-12-05 15:35:03.000000000","message":"No, this is correct. Each item in the list is a list of Selection objects.","commit_id":"0b7742b4d009f95a58aab1ab635714e39073781d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a82339b610139c66e577776c29318bcac0c9353","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        # is based on CONF.scheduler.max_attempts; note that if there are not"},{"line_number":148,"context_line":"        # enough filtered hosts to provide the full number of alternates, the"},{"line_number":149,"context_line":"        # list of hosts may be shorter than this amount."},{"line_number":150,"context_line":"        num_alts \u003d CONF.scheduler.max_attempts"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        if (instance_uuids is None or"},{"line_number":153,"context_line":"                not self.USES_ALLOCATION_CANDIDATES or"}],"source_content_type":"text/x-python","patch_set":38,"id":"df87a7cf_957c18b6","line":150,"updated":"2017-12-06 01:56:01.000000000","message":"I don\u0027t know why this needs to be changed in this patch; the point of this patch is returning Selection objects from the driver. I know I pointed this variable naming later in the series and I thought you had changed it there when implementing the return_alternates stuff, which is a more appropriate patch to change this in IMO, but I don\u0027t want to drag this on.","commit_id":"2607251cdb85be9510fbd8d5e1148d4d3b7abbd0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a82339b610139c66e577776c29318bcac0c9353","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            # placement API, alloc_reqs_by_rp_uuid will be None, so we skip"},{"line_number":160,"context_line":"            # claiming in that case as well. In the case where instance_uuids"},{"line_number":161,"context_line":"            # is None, that indicates an older conductor, so we need to return"},{"line_number":162,"context_line":"            # the objects without alternates. They will be converted back to"},{"line_number":163,"context_line":"            # the older dict format representing HostState objects."},{"line_number":164,"context_line":"            if instance_uuids is None:"},{"line_number":165,"context_line":"                num_alts \u003d 0"},{"line_number":166,"context_line":"            return self._legacy_find_hosts(num_instances, spec_obj, hosts,"}],"source_content_type":"text/x-python","patch_set":38,"id":"df87a7cf_f546c47c","line":163,"range":{"start_line":162,"start_character":46,"end_line":163,"end_character":67},"updated":"2017-12-06 01:56:01.000000000","message":"Let\u0027s remember to remove this later when this is no longer true.","commit_id":"2607251cdb85be9510fbd8d5e1148d4d3b7abbd0"}],"nova/scheduler/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        # We don\u0027t want to change the return value in this patch, as it"},{"line_number":162,"context_line":"        # involves an RPC change. So convert the list of lists of Selection"},{"line_number":163,"context_line":"        # objects to a list of host state dicts, which is what the calling"},{"line_number":164,"context_line":"        # method expects."},{"line_number":165,"context_line":"        claimed \u003d [sel[0] for sel in selections]"},{"line_number":166,"context_line":"        selection_dicts \u003d [_selection_obj_to_dict(claim) for claim in claimed]"},{"line_number":167,"context_line":"        return jsonutils.to_primitive(selection_dicts)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_5f26056a","line":164,"updated":"2017-10-02 23:05:31.000000000","message":"ack","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"44e7820baee09c6464e14860a9bf6813672864af","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _selection_obj_to_dict(selection):"},{"line_number":66,"context_line":"    # The limits for NUMATopologyLimits have already been dict-ified"},{"line_number":67,"context_line":"    return {"},{"line_number":68,"context_line":"        \u0027uuid\u0027: selection.compute_node_uuid,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f4e5783_d7f00700","line":65,"updated":"2017-10-13 19:13:17.000000000","message":"Is this a candidate for on the object? in fact doesn\u0027t ovo provide this, including a way to ignore fields?","commit_id":"7295ba4b7ccbeb1c12aa0e4dcf854c1fe1fcf8db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"630aa3ce61d4869e8a3e135739ddd1ef416ee732","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _selection_obj_to_dict(selection):"},{"line_number":66,"context_line":"    if selection.limits is not None:"},{"line_number":67,"context_line":"        limits \u003d selection.limits.copy()"},{"line_number":68,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_abe5e039","line":65,"updated":"2017-10-17 12:11:55.000000000","message":"Is this a candidate for on the Selection object?","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8a76e2e01933cc80fbae9d0327175022849a85d3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _selection_obj_to_dict(selection):"},{"line_number":66,"context_line":"    if selection.limits is not None:"},{"line_number":67,"context_line":"        limits \u003d selection.limits.copy()"},{"line_number":68,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_da522313","line":65,"in_reply_to":"5f4e5783_5f92a558","updated":"2017-10-17 15:09:13.000000000","message":"I\u0027m asking why this isn\u0027t Selection.obj_to_old_style_dict.","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9c434835824431bb9af1733e38aeea42a3c1d689","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _selection_obj_to_dict(selection):"},{"line_number":66,"context_line":"    if selection.limits is not None:"},{"line_number":67,"context_line":"        limits \u003d selection.limits.copy()"},{"line_number":68,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_5f92a558","line":65,"in_reply_to":"5f4e5783_abe5e039","updated":"2017-10-17 14:46:39.000000000","message":"I\u0027ll assume that you were not sufficiently caffeinated when you wrote that sentence. :)\n\nIt\u0027s a conversion necessary before we change the RPC between conductor and scheduler to convert the new Selection objects back to the lists of dicts that the old RPC expects.","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"db4e83e819ee38477b88b5c5f6dc36f2aac8f0f9","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _selection_obj_to_dict(selection):"},{"line_number":66,"context_line":"    if selection.limits is not None:"},{"line_number":67,"context_line":"        limits \u003d selection.limits.copy()"},{"line_number":68,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f4e5783_1a7afbb8","line":65,"in_reply_to":"5f4e5783_da522313","updated":"2017-10-17 15:36:07.000000000","message":"As discussed on IRC, this is only used by the scheduler manager to convert Selection objects back to dicts for older RPC calls to select_destinations(). Once those older clients are not supported, this can be removed.","commit_id":"dd6c14c66809d673228ac78f3a7831b4d4c38647"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"634e2ee604fae0bac6978b691a35566adf81aa60","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    # before this hits jsonutils.to_primitive(). We only check for that known"},{"line_number":74,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":75,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":76,"context_line":"    if limits[\"numa_topology\"]:"},{"line_number":77,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":78,"context_line":"    return {"},{"line_number":79,"context_line":"        \u0027uuid\u0027: selection.compute_node_uuid,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_3ee9af7f","line":76,"range":{"start_line":76,"start_character":4,"end_line":76,"end_character":31},"updated":"2017-10-31 16:10:43.000000000","message":"TypeError: \u0027SchedulerLimits\u0027 object has no attribute \u0027__getitem__\u0027","commit_id":"d51bd6ced029554b6db85bddf69b3888b28a95cd"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1e772b6a9c9ea4e441a91ee213d3175bbb0e1021","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    # before this hits jsonutils.to_primitive(). We only check for that known"},{"line_number":74,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":75,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":76,"context_line":"    if limits[\"numa_topology\"]:"},{"line_number":77,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":78,"context_line":"    return {"},{"line_number":79,"context_line":"        \u0027uuid\u0027: selection.compute_node_uuid,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_417dae6c","line":76,"range":{"start_line":76,"start_character":4,"end_line":76,"end_character":31},"in_reply_to":"3f4b6375_3ee9af7f","updated":"2017-10-31 16:27:47.000000000","message":"Ah, the old code bites me again...","commit_id":"d51bd6ced029554b6db85bddf69b3888b28a95cd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f41e922c5fa24fa92e76412924f0db5df302cdbb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _host_state_obj_to_dict(host_state):"},{"line_number":49,"context_line":"    limits \u003d dict(host_state.limits)"},{"line_number":50,"context_line":"    # The NUMATopologyFilter can set \u0027numa_topology\u0027 in the limits dict"},{"line_number":51,"context_line":"    # to a NUMATopologyLimits object which we need to convert to a primitive"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_e8b1fde2","line":48,"updated":"2017-11-01 17:01:32.000000000","message":"Where is this still used?","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2982dbd51cae86464ad1604ce4f2d6d3150dcc0d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _host_state_obj_to_dict(host_state):"},{"line_number":49,"context_line":"    limits \u003d dict(host_state.limits)"},{"line_number":50,"context_line":"    # The NUMATopologyFilter can set \u0027numa_topology\u0027 in the limits dict"},{"line_number":51,"context_line":"    # to a NUMATopologyLimits object which we need to convert to a primitive"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_024c2d9c","line":48,"in_reply_to":"3f4b6375_e8b1fde2","updated":"2017-11-01 22:53:39.000000000","message":"Looks like nowhere, so out it goes...","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f41e922c5fa24fa92e76412924f0db5df302cdbb","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    if \u0027numa_topology\u0027 in limits:"},{"line_number":56,"context_line":"        limits[\u0027numa_topology\u0027] \u003d limits[\u0027numa_topology\u0027].obj_to_primitive()"},{"line_number":57,"context_line":"    return {"},{"line_number":58,"context_line":"        \u0027uuid\u0027: host_state.uuid,"},{"line_number":59,"context_line":"        \u0027host\u0027: host_state.host,"},{"line_number":60,"context_line":"        \u0027nodename\u0027: host_state.nodename,"},{"line_number":61,"context_line":"        \u0027limits\u0027: limits"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_08e0d9cb","line":58,"updated":"2017-11-01 17:01:32.000000000","message":"This would be modifying the RPC return structure for anything that still uses this, which isn\u0027t cool. However, isn\u0027t this dead code now?","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f41e922c5fa24fa92e76412924f0db5df302cdbb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":77,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":78,"context_line":"    return {"},{"line_number":79,"context_line":"        \u0027uuid\u0027: selection.compute_node_uuid,"},{"line_number":80,"context_line":"        \u0027host\u0027: selection.service_host,"},{"line_number":81,"context_line":"        \u0027nodename\u0027: selection.nodename,"},{"line_number":82,"context_line":"        \u0027limits\u0027: limits,"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_2806f587","line":79,"updated":"2017-11-01 17:01:32.000000000","message":"This wasn\u0027t in the old format, so this shouldn\u0027t be here, right?","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2982dbd51cae86464ad1604ce4f2d6d3150dcc0d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":77,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":78,"context_line":"    return {"},{"line_number":79,"context_line":"        \u0027uuid\u0027: selection.compute_node_uuid,"},{"line_number":80,"context_line":"        \u0027host\u0027: selection.service_host,"},{"line_number":81,"context_line":"        \u0027nodename\u0027: selection.nodename,"},{"line_number":82,"context_line":"        \u0027limits\u0027: limits,"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_825ffd3f","line":79,"in_reply_to":"3f4b6375_2806f587","updated":"2017-11-01 22:53:39.000000000","message":"There was some discussion about adding it, but that was before the Selection object was created. This is probably just leftover from that.","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f41e922c5fa24fa92e76412924f0db5df302cdbb","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                    (alloc_reqs, provider_summaries,"},{"line_number":152,"context_line":"                            allocation_request_version) \u003d res"},{"line_number":153,"context_line":"                except ValueError:"},{"line_number":154,"context_line":"                    # Old placement client that doesn\u0027t return version"},{"line_number":155,"context_line":"                    alloc_reqs, provider_summaries \u003d res"},{"line_number":156,"context_line":"                    allocation_request_version \u003d None"},{"line_number":157,"context_line":"            if not alloc_reqs:"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_68486dcb","line":154,"updated":"2017-11-01 17:01:32.000000000","message":"Um, we can\u0027t have an old placement client here, right? This is just client.reportclient, which is all part of our source tree. When can this happen?","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2982dbd51cae86464ad1604ce4f2d6d3150dcc0d","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                    (alloc_reqs, provider_summaries,"},{"line_number":152,"context_line":"                            allocation_request_version) \u003d res"},{"line_number":153,"context_line":"                except ValueError:"},{"line_number":154,"context_line":"                    # Old placement client that doesn\u0027t return version"},{"line_number":155,"context_line":"                    alloc_reqs, provider_summaries \u003d res"},{"line_number":156,"context_line":"                    allocation_request_version \u003d None"},{"line_number":157,"context_line":"            if not alloc_reqs:"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f4b6375_621f6170","line":154,"in_reply_to":"3f4b6375_68486dcb","updated":"2017-11-01 22:53:39.000000000","message":"Good point.","commit_id":"72953bd4eac413d86c444e97d4ecc7310eb60c1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":60,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_3091a148","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":58},"updated":"2017-11-15 20:09:36.000000000","message":"I don\u0027t think this isinstance check is necessary. Selection.limits is a SchedulerLimits object, and SchedulerLimits.numa_topology is a NUMATopologyLimits object, so we need to make it a primitive always.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":60,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_21015506","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":58},"in_reply_to":"1f485f77_3091a148","updated":"2017-11-15 21:09:40.000000000","message":"It could be None, so I\u0027ll change that to test against None.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":60,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"},{"line_number":63,"context_line":"        \u0027nodename\u0027: selection.nodename,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_d09b6d63","line":60,"range":{"start_line":60,"start_character":15,"end_line":60,"end_character":16},"updated":"2017-11-15 20:09:36.000000000","message":"Why do you need to change single quotas to double quotes?","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if isinstance(numa_limit, objects.NUMATopologyLimits):"},{"line_number":60,"context_line":"        limits[\"numa_topology\"] \u003d limits[\"numa_topology\"].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"},{"line_number":63,"context_line":"        \u0027nodename\u0027: selection.nodename,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_81112955","line":60,"range":{"start_line":60,"start_character":15,"end_line":60,"end_character":16},"in_reply_to":"1f485f77_d09b6d63","updated":"2017-11-15 21:09:40.000000000","message":"I actually re-typed this, and normally use double quotes. I\u0027ll change them to single.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a18470bb90cdb4dd2899f60875d950aac1ead92a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # involves an RPC change. So convert the list of lists of Selection"},{"line_number":155,"context_line":"        # objects to a list of host state dicts, which is what the calling"},{"line_number":156,"context_line":"        # method expects."},{"line_number":157,"context_line":"        claimed \u003d [sel[0] for sel in selections]"},{"line_number":158,"context_line":"        selection_dicts \u003d [_selection_obj_to_dict(claim) for claim in claimed]"},{"line_number":159,"context_line":"        return jsonutils.to_primitive(selection_dicts)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_f080a9c1","line":157,"range":{"start_line":157,"start_character":8,"end_line":157,"end_character":15},"updated":"2017-11-15 20:09:36.000000000","message":"nit: this could be confusing. I see you care about proper variable names here, so this should probably be \"selected\" or something, because not all drivers do claims, like chance and caching.","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c3048a046231fb6487ddd96fd45151551879bf9a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # involves an RPC change. So convert the list of lists of Selection"},{"line_number":155,"context_line":"        # objects to a list of host state dicts, which is what the calling"},{"line_number":156,"context_line":"        # method expects."},{"line_number":157,"context_line":"        claimed \u003d [sel[0] for sel in selections]"},{"line_number":158,"context_line":"        selection_dicts \u003d [_selection_obj_to_dict(claim) for claim in claimed]"},{"line_number":159,"context_line":"        return jsonutils.to_primitive(selection_dicts)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_4130d1e8","line":157,"range":{"start_line":157,"start_character":8,"end_line":157,"end_character":15},"in_reply_to":"1f485f77_f080a9c1","updated":"2017-11-15 21:09:40.000000000","message":"Done","commit_id":"64077afff708a903ae7b41e8a740ab5804af8726"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b4a5308832396bb18d95aa5831dc1c48cde299c0","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                # We have to handle the case that we failed to connect to the"},{"line_number":127,"context_line":"                # Placement service and the safe_connect decorator on"},{"line_number":128,"context_line":"                # get_allocation_candidates returns None."},{"line_number":129,"context_line":"                alloc_reqs, provider_summaries, allocation_request_version \u003d ("},{"line_number":130,"context_line":"                        None, None, None)"},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                (alloc_reqs, provider_summaries,"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_19a11247","line":129,"range":{"start_line":129,"start_character":16,"end_line":129,"end_character":74},"updated":"2017-11-16 16:12:19.000000000","message":"see how ugly having long short-scope variable names makes the code? :)","commit_id":"c86ba5681668a29afb3139e1fa79a094647d44c2"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"69637ce3d5375f29cd973373e2716ae6d6b64bfd","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                # We have to handle the case that we failed to connect to the"},{"line_number":127,"context_line":"                # Placement service and the safe_connect decorator on"},{"line_number":128,"context_line":"                # get_allocation_candidates returns None."},{"line_number":129,"context_line":"                alloc_reqs, provider_summaries, allocation_request_version \u003d ("},{"line_number":130,"context_line":"                        None, None, None)"},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                (alloc_reqs, provider_summaries,"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_2fcec0b3","line":129,"range":{"start_line":129,"start_character":16,"end_line":129,"end_character":74},"in_reply_to":"1f485f77_19a11247","updated":"2017-11-16 16:56:47.000000000","message":"Gee, I wonder who asked for a longer name for \u0027version\u0027?\n\nhttps://review.openstack.org/#/c/495854/20/nova/scheduler/driver.py@65","commit_id":"c86ba5681668a29afb3139e1fa79a094647d44c2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6dc3c75d4fa555832e41e00aab0a63836887bc66","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                # We have to handle the case that we failed to connect to the"},{"line_number":127,"context_line":"                # Placement service and the safe_connect decorator on"},{"line_number":128,"context_line":"                # get_allocation_candidates returns None."},{"line_number":129,"context_line":"                alloc_reqs, provider_summaries, allocation_request_version \u003d ("},{"line_number":130,"context_line":"                        None, None, None)"},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                (alloc_reqs, provider_summaries,"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_6f31585a","line":129,"range":{"start_line":129,"start_character":16,"end_line":129,"end_character":74},"in_reply_to":"1f485f77_2fcec0b3","updated":"2017-11-16 17:09:59.000000000","message":"It\u0027s you who asked for long variable names for things like provider_summaries. I prefer short names for variables that are used in a small scope (thus my comment about \"short-scope variable names\" above) and long names for variables that appear in a larger scope like public API method parameters.\n\nThis is why I prefer to use small variable names like p_sums and ars etc inside short blocks of code where there are 20 or less lines of code from where the variable is defined and where its scope ends.","commit_id":"c86ba5681668a29afb3139e1fa79a094647d44c2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9308bb3485507e2efb73c5cc4d201203aba04378","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if numa_limit is not None:"},{"line_number":60,"context_line":"        limits[\u0027numa_topology\u0027] \u003d limits[\u0027numa_topology\u0027].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_ecf1d16c","line":59,"range":{"start_line":59,"start_character":18,"end_line":59,"end_character":29},"updated":"2017-11-16 19:56:00.000000000","message":"Do we have any tests where this is None?","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # case specifically as we don\u0027t care about handling out of tree filters"},{"line_number":57,"context_line":"    # or drivers injecting non-serializable things in the limits dict."},{"line_number":58,"context_line":"    numa_limit \u003d limits.get(\"numa_topology\")"},{"line_number":59,"context_line":"    if numa_limit is not None:"},{"line_number":60,"context_line":"        limits[\u0027numa_topology\u0027] \u003d limits[\u0027numa_topology\u0027].obj_to_primitive()"},{"line_number":61,"context_line":"    return {"},{"line_number":62,"context_line":"        \u0027host\u0027: selection.service_host,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_d2e34cd8","line":59,"range":{"start_line":59,"start_character":18,"end_line":59,"end_character":29},"in_reply_to":"1f485f77_ecf1d16c","updated":"2017-11-16 21:27:56.000000000","message":"No, but I can add one.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"}],"nova/scheduler/utils.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"834eae16cdbb5b52da04afcdcb61afe421ab1999","unresolved":false,"context_lines":[{"line_number":602,"context_line":"retry_select_destinations \u003d retry_on_timeout(CONF.scheduler.max_attempts - 1)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"def create_selection_object(host_state, alloc):"},{"line_number":606,"context_line":"    \"\"\"A convenience method for converting a HostState and allocation_request"},{"line_number":607,"context_line":"    into a Selection object."},{"line_number":608,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_a8339361","line":605,"updated":"2017-10-01 19:39:12.000000000","message":"Does it make any sense for this to be a class method on Selection itself?\n\nOr is the presence of jsonutils a reason to maintain a hard(er) boundary?","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":602,"context_line":"retry_select_destinations \u003d retry_on_timeout(CONF.scheduler.max_attempts - 1)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"def create_selection_object(host_state, alloc):"},{"line_number":606,"context_line":"    \"\"\"A convenience method for converting a HostState and allocation_request"},{"line_number":607,"context_line":"    into a Selection object."},{"line_number":608,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_bfe979e3","line":605,"range":{"start_line":605,"start_character":4,"end_line":605,"end_character":27},"updated":"2017-10-02 23:05:31.000000000","message":"should be create_selection_object*s*() :)\n\nThis function should return a list of Selection objects, one per allocation request passed to the function.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"056a9b996be3d17316d64c25a96d6117932f040c","unresolved":false,"context_lines":[{"line_number":602,"context_line":"retry_select_destinations \u003d retry_on_timeout(CONF.scheduler.max_attempts - 1)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"def create_selection_object(host_state, alloc):"},{"line_number":606,"context_line":"    \"\"\"A convenience method for converting a HostState and allocation_request"},{"line_number":607,"context_line":"    into a Selection object."},{"line_number":608,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_a4b593f0","line":605,"in_reply_to":"7f515b1d_a8339361","updated":"2017-10-05 17:25:00.000000000","message":"I originally had it on the Selection object. I think it does make sense to put it back there.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4562e1b00d6f8b7bc40ace95ab92e9b6e1f776c7","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"def create_selection_object(host_state, alloc):"},{"line_number":606,"context_line":"    \"\"\"A convenience method for converting a HostState and allocation_request"},{"line_number":607,"context_line":"    into a Selection object."},{"line_number":608,"context_line":"    \"\"\""},{"line_number":609,"context_line":"    limits_json \u003d jsonutils.dumps(host_state.limits)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_3f290936","line":606,"range":{"start_line":606,"start_character":59,"end_line":606,"end_character":77},"updated":"2017-10-02 23:05:31.000000000","message":"should be allocation *requests*...","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"056a9b996be3d17316d64c25a96d6117932f040c","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"def create_selection_object(host_state, alloc):"},{"line_number":606,"context_line":"    \"\"\"A convenience method for converting a HostState and allocation_request"},{"line_number":607,"context_line":"    into a Selection object."},{"line_number":608,"context_line":"    \"\"\""},{"line_number":609,"context_line":"    limits_json \u003d jsonutils.dumps(host_state.limits)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_e4d26b34","line":606,"range":{"start_line":606,"start_character":59,"end_line":606,"end_character":77},"in_reply_to":"7f515b1d_3f290936","updated":"2017-10-05 17:25:00.000000000","message":"A Selection is a single host with a single allocation_request.","commit_id":"18e69a40a90abd45bc19fc6dd96f021a0d4b0dc5"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9308bb3485507e2efb73c5cc4d201203aba04378","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"        resp_mock \u003d mock.Mock(status_code\u003d200)"},{"line_number":1174,"context_line":"        json_data \u003d {"},{"line_number":1175,"context_line":"            \u0027allocation_requests\u0027: mock.sentinel.alloc_reqs,"},{"line_number":1176,"context_line":"            \u0027provider_summaries\u0027: mock.sentinel.provider_summaries,"},{"line_number":1177,"context_line":"        }"},{"line_number":1178,"context_line":"        resources \u003d scheduler_utils.ResourceRequest.from_extra_specs({"},{"line_number":1179,"context_line":"            \u0027resources:VCPU\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_6cfba178","line":1176,"range":{"start_line":1176,"start_character":34,"end_line":1176,"end_character":66},"updated":"2017-11-16 19:56:00.000000000","message":"Why do these variables need to be renamed in this patch? This clutters up the review and makes the diff bigger for no good reason.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"        resp_mock \u003d mock.Mock(status_code\u003d200)"},{"line_number":1174,"context_line":"        json_data \u003d {"},{"line_number":1175,"context_line":"            \u0027allocation_requests\u0027: mock.sentinel.alloc_reqs,"},{"line_number":1176,"context_line":"            \u0027provider_summaries\u0027: mock.sentinel.provider_summaries,"},{"line_number":1177,"context_line":"        }"},{"line_number":1178,"context_line":"        resources \u003d scheduler_utils.ResourceRequest.from_extra_specs({"},{"line_number":1179,"context_line":"            \u0027resources:VCPU\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_b20b307b","line":1176,"range":{"start_line":1176,"start_character":34,"end_line":1176,"end_character":66},"in_reply_to":"1f485f77_6cfba178","updated":"2017-11-16 21:27:56.000000000","message":"Done","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"}],"nova/tests/unit/scheduler/test_chance_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9308bb3485507e2efb73c5cc4d201203aba04378","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    for i in range(num):"},{"line_number":31,"context_line":"        fake_host_state \u003d host_manager.HostState(\"host%s\" % i, \"fake_node\","},{"line_number":32,"context_line":"                uuids.cell)"},{"line_number":33,"context_line":"        fake_host_state.uuid \u003d uuids.host"},{"line_number":34,"context_line":"        fake_host_state.limits \u003d {}"},{"line_number":35,"context_line":"        hosts.append(fake_host_state)"},{"line_number":36,"context_line":"    return hosts"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_ac32b95c","line":33,"range":{"start_line":33,"start_character":31,"end_line":33,"end_character":41},"updated":"2017-11-16 19:56:00.000000000","message":"Shouldn\u0027t the uuid for the HostState be unique per host in the loop?","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    for i in range(num):"},{"line_number":31,"context_line":"        fake_host_state \u003d host_manager.HostState(\"host%s\" % i, \"fake_node\","},{"line_number":32,"context_line":"                uuids.cell)"},{"line_number":33,"context_line":"        fake_host_state.uuid \u003d uuids.host"},{"line_number":34,"context_line":"        fake_host_state.limits \u003d {}"},{"line_number":35,"context_line":"        hosts.append(fake_host_state)"},{"line_number":36,"context_line":"    return hosts"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_f2c88822","line":33,"range":{"start_line":33,"start_character":31,"end_line":33,"end_character":41},"in_reply_to":"1f485f77_ac32b95c","updated":"2017-11-16 21:27:56.000000000","message":"Done","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"}],"nova/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9308bb3485507e2efb73c5cc4d201203aba04378","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                nodename\u003d\"fakenode\", compute_node_uuid\u003duuids.host,"},{"line_number":281,"context_line":"                cell_uuid\u003duuids.cell, limits\u003dfake_limit_obj,"},{"line_number":282,"context_line":"                allocation_request\u003d\"fake\", allocation_request_version\u003d\"99.9\")"},{"line_number":283,"context_line":"        expected \u003d {\"host\": \"fakehost\","},{"line_number":284,"context_line":"                \"nodename\": \"fakenode\","},{"line_number":285,"context_line":"                \"limits\": {"},{"line_number":286,"context_line":"                    \u0027disk_gb\u0027: 100,"},{"line_number":287,"context_line":"                    \u0027memory_mb\u0027: 1024,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_8cd37dd5","line":284,"range":{"start_line":283,"start_character":19,"end_line":284,"end_character":39},"updated":"2017-11-16 19:56:00.000000000","message":"This alignment is weirding me out.","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8f4e7548341012e8fbb5c0213a6dff634f072918","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                nodename\u003d\"fakenode\", compute_node_uuid\u003duuids.host,"},{"line_number":281,"context_line":"                cell_uuid\u003duuids.cell, limits\u003dfake_limit_obj,"},{"line_number":282,"context_line":"                allocation_request\u003d\"fake\", allocation_request_version\u003d\"99.9\")"},{"line_number":283,"context_line":"        expected \u003d {\"host\": \"fakehost\","},{"line_number":284,"context_line":"                \"nodename\": \"fakenode\","},{"line_number":285,"context_line":"                \"limits\": {"},{"line_number":286,"context_line":"                    \u0027disk_gb\u0027: 100,"},{"line_number":287,"context_line":"                    \u0027memory_mb\u0027: 1024,"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_d2690cf9","line":284,"range":{"start_line":283,"start_character":19,"end_line":284,"end_character":39},"in_reply_to":"1f485f77_8cd37dd5","updated":"2017-11-16 21:27:56.000000000","message":"Done","commit_id":"edcb73e62ec4334f60800db6a412c41977037f66"}]}
