)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e9a381a60ecf0f7b0ed87b1b1b6dd06f5e670f61","unresolved":false,"context_lines":[{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def _get_allocations_for_instance(self, compute_node, instance):"},{"line_number":317,"context_line":"        url \u003d \u0027/resource_providers/%s/allocations\u0027 % compute_node.uuid"},{"line_number":318,"context_line":"        resp \u003d self.get(url)"},{"line_number":319,"context_line":"        if not resp:"},{"line_number":320,"context_line":"            return {}"},{"line_number":321,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_063e898b","line":318,"updated":"2016-09-07 17:22:12.000000000","message":"Do we have any need to be robust in the face of unexpected error conditions here or are they bubbling to the containing safe_connect?\n\nAnyway, I\u0027m guess that you and Jay are going to hash out how to make it so this query doesn\u0027t have to happen every time so I\u0027m not going to review too hard just yet.","commit_id":"40903ae8480fce84e217a4580a499fc425d934f2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e0d3071a5692157af93b00eb8e4b1370a42870c5","unresolved":false,"context_lines":[{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def _get_allocations_for_instance(self, compute_node, instance):"},{"line_number":317,"context_line":"        url \u003d \u0027/resource_providers/%s/allocations\u0027 % compute_node.uuid"},{"line_number":318,"context_line":"        resp \u003d self.get(url)"},{"line_number":319,"context_line":"        if not resp:"},{"line_number":320,"context_line":"            return {}"},{"line_number":321,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_a70b1223","line":318,"in_reply_to":"9a89bdaa_063e898b","updated":"2016-09-07 20:26:42.000000000","message":"Yep, they should be caught by the safe_connect on our caller, so I think this is plenty.\n\nSo I was planning to just have it make this hard call every time. It\u0027s not ideal, but I think we probably need to retool the RT a bit to make it more efficient. Doing that refactoring at this point is probably not doable, so either we do this, we add GET on /allocations, or we leave it as it is currently, IMHO.","commit_id":"40903ae8480fce84e217a4580a499fc425d934f2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"302a1b2ce09d07ab2e148daef67b6c49b08c7bd5","unresolved":false,"context_lines":[{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def _get_allocations_for_instance(self, compute_node, instance):"},{"line_number":317,"context_line":"        url \u003d \u0027/resource_providers/%s/allocations\u0027 % compute_node.uuid"},{"line_number":318,"context_line":"        resp \u003d self.get(url)"},{"line_number":319,"context_line":"        if not resp:"},{"line_number":320,"context_line":"            return {}"},{"line_number":321,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_259a836e","line":318,"in_reply_to":"9a89bdaa_a70b1223","updated":"2016-09-08 09:41:45.000000000","message":"✔","commit_id":"40903ae8480fce84e217a4580a499fc425d934f2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"302a1b2ce09d07ab2e148daef67b6c49b08c7bd5","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        if not resp:"},{"line_number":320,"context_line":"            return {}"},{"line_number":321,"context_line":"        else:"},{"line_number":322,"context_line":"            return resp.json()[\u0027allocations\u0027].get(instance.uuid, {})"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    @safe_connect"},{"line_number":325,"context_line":"    def _allocate_for_instance(self, compute_node, instance):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_45e067cd","line":322,"updated":"2016-09-08 09:41:45.000000000","message":"no-pivot-required++","commit_id":"40903ae8480fce84e217a4580a499fc425d934f2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1dc504d3d642bdfba14381d2ce37ba3f9f1a6e2a","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            allocstr \u003d \u0027,\u0027.join([\u0027%s\u003d%s\u0027 % (k, v)"},{"line_number":337,"context_line":"                                 for k, v in my_allocations.items()])"},{"line_number":338,"context_line":"            LOG.debug(\u0027Instance %(uuid)s allocations are unchanged: %(alloc)s\u0027,"},{"line_number":339,"context_line":"                      {\u0027uuid\u0027: instance.uuid, \u0027alloc\u0027: allocstr})"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        allocations \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_12199a88","line":339,"updated":"2016-09-12 14:50:49.000000000","message":"Not sure about the usefulness of this log message, even in debug mode. Generally, we want to log when things change, not when they stay the same? So, instead of this here, how about slightly changing the message to \"Instance ... allocations have changed: ...\" and put an INFO level message directly below?","commit_id":"9b4deb6e755267dcde576c406e704df6ee78de18"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7d229175d66e9dd9ad66f42a2a967e7b9207157b","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            allocstr \u003d \u0027,\u0027.join([\u0027%s\u003d%s\u0027 % (k, v)"},{"line_number":337,"context_line":"                                 for k, v in my_allocations.items()])"},{"line_number":338,"context_line":"            LOG.debug(\u0027Instance %(uuid)s allocations are unchanged: %(alloc)s\u0027,"},{"line_number":339,"context_line":"                      {\u0027uuid\u0027: instance.uuid, \u0027alloc\u0027: allocstr})"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        allocations \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_ed6fb98f","line":339,"in_reply_to":"9a89bdaa_12199a88","updated":"2016-09-13 14:01:21.000000000","message":"I do log when they have changed, below on lines 352 and 357. This was useful for me to debug the thing because if nothing has changed I get no allocation-related output during the periodic. So, I couldn\u0027t easily grep for \"allocations\" and see both changing and unchanging instance information.","commit_id":"9b4deb6e755267dcde576c406e704df6ee78de18"}]}
