)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"57d601ae7045ed7534af1dbad4240a5ae39119fe","unresolved":false,"context_lines":[{"line_number":34,"context_line":"return the weighed hosts that remain in the list of weighed hosts, if"},{"line_number":35,"context_line":"any, as alternate scheduling possibilities. This list of alternate"},{"line_number":36,"context_line":"scheduling possibilities will be passed fully back through the"},{"line_number":37,"context_line":"scheduler RPC API in following patches."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Change-Id: Iaf3f8e688432246f0ac3b95508cc216bad771e8c"},{"line_number":40,"context_line":"blueprint: placement-claims"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f1d235d_80c4c260","line":37,"updated":"2017-07-11 15:55:58.000000000","message":"Just to refresh my memory: Using these alternates will be a hopefully rare occurrence because for the common cases, the successful claim above will maintain?","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"57d601ae7045ed7534af1dbad4240a5ae39119fe","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        # Build a dict of lists of allocation requests, keyed by provider UUID,"},{"line_number":129,"context_line":"        # so that when we attempt to claim resources for a host, we can grab an"},{"line_number":130,"context_line":"        # allocation request easily"},{"line_number":131,"context_line":"        alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list)"},{"line_number":132,"context_line":"        for ar in alloc_requests:"},{"line_number":133,"context_line":"            for rr in ar[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_0049d289","line":130,"updated":"2017-07-11 15:55:58.000000000","message":"If we want to grab an allocation by just one provider then yes, it is easy, but in the case when we want to extract the allocation that represents \"this provider working in concert with these shared providers\" it\u0027s less so.\n\nThis is creating a dict keys by all resource providers. Should it maybe only key on those resource providers which are compute nodes? Would that be of any use or is it the case that we\u0027re only going to do lookups by compute node uuid anyway, and the other entries are fluff to be ignored?","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4cace3ebb68de9ec3d1f4270f5d0e6b7eb249a23","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        # Build a dict of lists of allocation requests, keyed by provider UUID,"},{"line_number":129,"context_line":"        # so that when we attempt to claim resources for a host, we can grab an"},{"line_number":130,"context_line":"        # allocation request easily"},{"line_number":131,"context_line":"        alloc_reqs_by_rp_uuid \u003d collections.defaultdict(list)"},{"line_number":132,"context_line":"        for ar in alloc_requests:"},{"line_number":133,"context_line":"            for rr in ar[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_ab5ff4e3","line":130,"in_reply_to":"3f1d235d_0049d289","updated":"2017-07-12 13:49:03.000000000","message":"Some good questions here.\n\nWith regards to the \"by just one provider\" comment, yes, this was intentional (and was asked for by mriedem/dansmith in the previous attempt that had a loop within the scheduler manager). The allocation requests are keyed by provider UUID but that doesn\u0027t mean that the allocation requests for that provider UUID contain allocation requests that *only* have that provider in them. The value of the dict is a list of allocation requests that *contain* that provider UUID. So, when we get a set of allocation requests for a compute node that uses shared storage, the list of allocation requests will include allocations against both the compute node and the shared storage provider.\n\nIn answer to your question about only keying on compute node providers, sure we can do that, but at this point, not sure it\u0027s all that necessary?","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"57d601ae7045ed7534af1dbad4240a5ae39119fe","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                        chosen_host \u003d weighed_host"},{"line_number":193,"context_line":"                        break"},{"line_number":194,"context_line":"                if chosen_host is not None:"},{"line_number":195,"context_line":"                    break"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            if chosen_host is None:"},{"line_number":198,"context_line":"                self._cleanup_allocations(claimed_instance_uuids)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_003e72d9","line":195,"updated":"2017-07-11 15:55:58.000000000","message":"this above chunk is nicely readable","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"57d601ae7045ed7534af1dbad4240a5ae39119fe","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"            num_alternates \u003d len(alternates)"},{"line_number":224,"context_line":"            LOG.debug(\"Returning %d alternate destinations \""},{"line_number":225,"context_line":"                      \"for instance %s\", num_alternates, instance_uuid)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            hosts_by_instance_uuid[instance_uuid] \u003d [chosen_host] + alternates"},{"line_number":228,"context_line":"        return hosts_by_instance_uuid"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_c33644e8","line":225,"updated":"2017-07-11 15:55:58.000000000","message":"but on this section I\u0027m vague-ing out a bit","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4cace3ebb68de9ec3d1f4270f5d0e6b7eb249a23","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"            num_alternates \u003d len(alternates)"},{"line_number":224,"context_line":"            LOG.debug(\"Returning %d alternate destinations \""},{"line_number":225,"context_line":"                      \"for instance %s\", num_alternates, instance_uuid)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            hosts_by_instance_uuid[instance_uuid] \u003d [chosen_host] + alternates"},{"line_number":228,"context_line":"        return hosts_by_instance_uuid"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_abd25433","line":225,"in_reply_to":"3f1d235d_c33644e8","updated":"2017-07-12 13:49:03.000000000","message":"Please check out the latest version. After feedback from Ed about how I was mis-using random.shuffle(), I re-worked this.","commit_id":"0a6ca9440ee4c4fa8d0569f122f209f22797307c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a81f3a7354d9a1e49531d505858701f066602c4c","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                # Try claiming against the next host in our list of weighed"},{"line_number":212,"context_line":"                # hosts"},{"line_number":213,"context_line":"                prior_host \u003d weighed_host"},{"line_number":214,"context_line":"                weighed_host \u003d weighed_hosts.pop(None)"},{"line_number":215,"context_line":"                if weighed_host is not None:"},{"line_number":216,"context_line":"                    LOG.debug(\"Host %s was not able to have resources claimed \""},{"line_number":217,"context_line":"                              \"against it. Attempting claim for next host %s.\","}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_6e88c0c5","line":214,"updated":"2017-07-12 19:17:22.000000000","message":"weighed_hosts is a list, yes? If so, value passed to pop must be an int.\n\nAre you wanted pop(0) to get and remove the first item?\n\nMissing test then?\n\nOr is weighed_hosts some bizzare thing, in case a comment on its bizarre-ness may be warranted.","commit_id":"0ff88745e156e05b141e322a0d007175b75bdd51"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f17440cf8ea0273854e02311fd9bec281bf881b4","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                # Try claiming against the next host in our list of weighed"},{"line_number":212,"context_line":"                # hosts"},{"line_number":213,"context_line":"                prior_host \u003d weighed_host"},{"line_number":214,"context_line":"                weighed_host \u003d weighed_hosts.pop(None)"},{"line_number":215,"context_line":"                if weighed_host is not None:"},{"line_number":216,"context_line":"                    LOG.debug(\"Host %s was not able to have resources claimed \""},{"line_number":217,"context_line":"                              \"against it. Attempting claim for next host %s.\","}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_91821d4f","line":214,"in_reply_to":"1f1a1f67_6e88c0c5","updated":"2017-07-12 19:23:52.000000000","message":"weighed_hosts is an iterator, but yeah, nice catch. In the unit tests, I was not checking on the order of this and I should have. Will rework the unit tests.","commit_id":"0ff88745e156e05b141e322a0d007175b75bdd51"}]}
