)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd63cadd39c3f5499e6c9220306ab9a3aea31462","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Are there other places where this change should happen that I missed?"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Is the new method too specific? Should it be more generic about"},{"line_number":27,"context_line":"assembling aribtrary allocations that it is given?"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I88aa32a95ea64ab7a9214772fd6e2a80c185d0cd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf8cb3f7_3a7d516e","line":27,"range":{"start_line":26,"start_character":0,"end_line":27,"end_character":50},"updated":"2017-12-20 16:46:31.000000000","message":"As this patch already gives us the wanted atomicity I\u0027m OK to have this merged and maybe later generalized further","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5216d704f057cb6bbbf59df880cbc6ad6b8ee6e4","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"    @safe_connect"},{"line_number":1212,"context_line":"    @retries"},{"line_number":1213,"context_line":"    def set_and_clear_allocations(self, rp_uuid, consumer_uuid, alloc_data,"},{"line_number":1214,"context_line":"                                  project_id, user_id,"},{"line_number":1215,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1216,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_02b3084f","line":1213,"range":{"start_line":1213,"start_character":8,"end_line":1213,"end_character":33},"updated":"2017-12-14 21:31:50.000000000","message":"Why don\u0027t we just call this post_allocations?","commit_id":"24a15886c6850b0ebf8649ed52a0e579a3940afc"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"027d8bc9ceaedc91b0c8b52934dda5bbb4247153","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"    @safe_connect"},{"line_number":1212,"context_line":"    @retries"},{"line_number":1213,"context_line":"    def set_and_clear_allocations(self, rp_uuid, consumer_uuid, alloc_data,"},{"line_number":1214,"context_line":"                                  project_id, user_id,"},{"line_number":1215,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1216,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_c26200ae","line":1213,"range":{"start_line":1213,"start_character":8,"end_line":1213,"end_character":33},"in_reply_to":"df87a7cf_02b3084f","updated":"2017-12-14 21:36:32.000000000","message":"Because, as written, it\u0027s not that generic; it\u0027s purpose built to satisfy the stuff that dan\u0027s calling code wanted:\n\n* set some allocs for a consumer_uuid, on one rp\n* clear allocs for another consumer (the migration, usually, but not always)\n\nI considered doing something a bit more generic (as well as asked about it in the commit message) but figured I\u0027d start with this.\n\nIf we do make a post_allocations, it might make sense to make this method call it, after constructing the expected allocations.","commit_id":"24a15886c6850b0ebf8649ed52a0e579a3940afc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5216d704f057cb6bbbf59df880cbc6ad6b8ee6e4","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"            }"},{"line_number":1257,"context_line":"        r \u003d self.post(\u0027/allocations\u0027, payload,"},{"line_number":1258,"context_line":"                      version\u003dPOST_ALLOCATIONS_API_VERSION)"},{"line_number":1259,"context_line":"        if r.status_code \u003d\u003d 406:"},{"line_number":1260,"context_line":"            # Required microversion not available so fall back to the earlier"},{"line_number":1261,"context_line":"            # way of removing allocations."},{"line_number":1262,"context_line":"            put_result \u003d self.put_allocations(rp_uuid, consumer_uuid,"},{"line_number":1263,"context_line":"                                              alloc_data, project_id, user_id)"},{"line_number":1264,"context_line":"            if consumer_to_clear:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_e2b7043a","line":1261,"range":{"start_line":1259,"start_character":8,"end_line":1261,"end_character":42},"updated":"2017-12-14 21:31:50.000000000","message":"I\u0027m not sure how much of this dance we need to do. It\u0027s correct, but we already added in the minimum requirement on 1.14 when creating a resource provider, so I think the ship has kind of sailed unless we change that one. Granted, that is only used by the nova-compute service and this is used by conductor, but assuming placement is global, if you have to upgrade it to make compute happy then you get the milk for free for conductor.","commit_id":"24a15886c6850b0ebf8649ed52a0e579a3940afc"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"027d8bc9ceaedc91b0c8b52934dda5bbb4247153","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"            }"},{"line_number":1257,"context_line":"        r \u003d self.post(\u0027/allocations\u0027, payload,"},{"line_number":1258,"context_line":"                      version\u003dPOST_ALLOCATIONS_API_VERSION)"},{"line_number":1259,"context_line":"        if r.status_code \u003d\u003d 406:"},{"line_number":1260,"context_line":"            # Required microversion not available so fall back to the earlier"},{"line_number":1261,"context_line":"            # way of removing allocations."},{"line_number":1262,"context_line":"            put_result \u003d self.put_allocations(rp_uuid, consumer_uuid,"},{"line_number":1263,"context_line":"                                              alloc_data, project_id, user_id)"},{"line_number":1264,"context_line":"            if consumer_to_clear:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_c20760c9","line":1261,"range":{"start_line":1259,"start_character":8,"end_line":1261,"end_character":42},"in_reply_to":"df87a7cf_e2b7043a","updated":"2017-12-14 21:36:32.000000000","message":"Yeah, I wasn\u0027t sure either.\n\nIf we\u0027re setting min_placement to 1.14, then I guess this is useless.","commit_id":"24a15886c6850b0ebf8649ed52a0e579a3940afc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd63cadd39c3f5499e6c9220306ab9a3aea31462","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    def set_and_clear_allocations(self, rp_uuid, consumer_uuid, alloc_data,"},{"line_number":1248,"context_line":"                                  project_id, user_id,"},{"line_number":1249,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1250,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"},{"line_number":1251,"context_line":"        simultaneously clearing any allocations identified by the uuid"},{"line_number":1252,"context_line":"        in consumer_to_clear, often a migration uuid. This is for"},{"line_number":1253,"context_line":"        atomically managing so-called \"doubled\" migration records."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_74a0d0a6","line":1250,"range":{"start_line":1250,"start_character":54,"end_line":1250,"end_character":62},"updated":"2017-12-20 16:46:31.000000000","message":"isn\u0027t it just a consumer UUID?","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5a94c74a849d7d4f13357a8788ff26bac28fde6b","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    def set_and_clear_allocations(self, rp_uuid, consumer_uuid, alloc_data,"},{"line_number":1248,"context_line":"                                  project_id, user_id,"},{"line_number":1249,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1250,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"},{"line_number":1251,"context_line":"        simultaneously clearing any allocations identified by the uuid"},{"line_number":1252,"context_line":"        in consumer_to_clear, often a migration uuid. This is for"},{"line_number":1253,"context_line":"        atomically managing so-called \"doubled\" migration records."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_dac5455d","line":1250,"range":{"start_line":1250,"start_character":54,"end_line":1250,"end_character":62},"in_reply_to":"bf8cb3f7_74a0d0a6","updated":"2017-12-20 16:55:39.000000000","message":"It is, but in the callers the pattern is that it is the instance uuid, and see the note below about the shared providers.\n\nAlso, this is copied from the docstring  on put_allocations.\n\nI\u0027m undecided about how much, in the report client, we want to be generic about the consumer uuid being able to be anything. It might be that was we want to explicitly say it is an instance_uuid and that it happens to be a consumer_uuid on the placement side is really only relevant over that. Not sure.","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d5949c6b1c7e7c5481213ffb492464d1e3192ce6","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    def set_and_clear_allocations(self, rp_uuid, consumer_uuid, alloc_data,"},{"line_number":1248,"context_line":"                                  project_id, user_id,"},{"line_number":1249,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1250,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"},{"line_number":1251,"context_line":"        simultaneously clearing any allocations identified by the uuid"},{"line_number":1252,"context_line":"        in consumer_to_clear, often a migration uuid. This is for"},{"line_number":1253,"context_line":"        atomically managing so-called \"doubled\" migration records."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_3d7d486e","line":1250,"range":{"start_line":1250,"start_character":54,"end_line":1250,"end_character":62},"in_reply_to":"bf8cb3f7_dac5455d","updated":"2017-12-20 19:18:40.000000000","message":"Originally everything was an instance, so that\u0027s why a lot of the parameters and docstrings are talking about an instance, but in reality we have non-instance consumers, so I think it\u0027s better to be generic unless we know we\u0027re specifically dealing with an instance in some case. Here I think consumer is better, but it could be cleaned up separately, and globally like in put_allocations as mentioned.","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d5949c6b1c7e7c5481213ffb492464d1e3192ce6","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                                  consumer_to_clear\u003dNone):"},{"line_number":1250,"context_line":"        \"\"\"Create allocation records for the supplied instance UUID while"},{"line_number":1251,"context_line":"        simultaneously clearing any allocations identified by the uuid"},{"line_number":1252,"context_line":"        in consumer_to_clear, often a migration uuid. This is for"},{"line_number":1253,"context_line":"        atomically managing so-called \"doubled\" migration records."},{"line_number":1254,"context_line":""},{"line_number":1255,"context_line":"        :note Currently we only allocate against a single resource provider."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_bd907897","line":1252,"range":{"start_line":1252,"start_character":30,"end_line":1252,"end_character":52},"updated":"2017-12-20 19:18:40.000000000","message":"well, or vice-versa\n\nrather than \u0027often\u0027 I\u0027d say, \"e.g. a migration uuid when moving an instance to another host\".","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd63cadd39c3f5499e6c9220306ab9a3aea31462","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"              reality, this will change to allocate against multiple providers."},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"        :param rp_uuid: The UUID of the resource provider to allocate against."},{"line_number":1260,"context_line":"        :param consumer_uuid: The instance\u0027s UUID."},{"line_number":1261,"context_line":"        :param alloc_data: Dict, keyed by resource class, of amounts to"},{"line_number":1262,"context_line":"                           consume."},{"line_number":1263,"context_line":"        :param project_id: The project_id associated with the allocations."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_f4cf0055","line":1260,"range":{"start_line":1260,"start_character":34,"end_line":1260,"end_character":42},"updated":"2017-12-20 16:46:31.000000000","message":"nit: we can be generic here and say that it is the consumer UUID we will allocate resource to","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d5949c6b1c7e7c5481213ffb492464d1e3192ce6","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"        :param project_id: The project_id associated with the allocations."},{"line_number":1264,"context_line":"        :param user_id: The user_id associated with the allocations."},{"line_number":1265,"context_line":"        :param consumer_to_clear: A UUID identifying allocations for a"},{"line_number":1266,"context_line":"                                  consumer that should be cleared. This"},{"line_number":1267,"context_line":"                                  is usually a migration uuid."},{"line_number":1268,"context_line":"        :returns: True if the allocations were created, False otherwise."},{"line_number":1269,"context_line":"        :raises: Retry if the operation should be retried due to a concurrent"},{"line_number":1270,"context_line":"                 update."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_7dd19057","line":1267,"range":{"start_line":1266,"start_character":67,"end_line":1267,"end_character":62},"updated":"2017-12-20 19:18:40.000000000","message":"I\u0027d remove this, it\u0027s wrong in the case of reverting a resize.","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"}],"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":"d5949c6b1c7e7c5481213ffb492464d1e3192ce6","unresolved":false,"context_lines":[{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"        self.assertFalse(resp)"},{"line_number":1171,"context_line":"        # Post was attempted three times."},{"line_number":1172,"context_line":"        self.assertEqual(3, len(self.mock_post.call_args_list))"},{"line_number":1173,"context_line":""},{"line_number":1174,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.LOG.warning\u0027)"},{"line_number":1175,"context_line":"    def test_not_409_failure(self, mock_log):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_7da0b0a6","line":1172,"range":{"start_line":1172,"start_character":28,"end_line":1172,"end_character":62},"updated":"2017-12-20 19:18:40.000000000","message":"Easier to just do self.mock_post.call_count","commit_id":"c65c25cdf634a0a39dc8a0cf186871fdb0afee2c"}]}
