)]}'
{"nova/api/openstack/placement/errors.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9f6a8fd7_da10e152","line":44,"updated":"2018-04-26 11:14:39.000000000","message":"Is \"inventory\" redundant here? \n\nthis shed is blue!\n\nlater: oh i see, you mean \"one or both\" not \"allocations of inventory\"","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"}],"nova/api/openstack/placement/handlers/allocation.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5c5829ecc5663775f0fb8dc753e7d99880ef3733","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        # This will be a string with either a numeric value, None, or \u0027None\u0027"},{"line_number":267,"context_line":"        try:"},{"line_number":268,"context_line":"            consumer_generation \u003d int(cg)"},{"line_number":269,"context_line":"        except (ValueError, TypeError):"},{"line_number":270,"context_line":"            consumer_generation \u003d None"},{"line_number":271,"context_line":"    else:"},{"line_number":272,"context_line":"        consumer_generation \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_da6ff4f9","line":269,"updated":"2018-04-20 13:44:26.000000000","message":"Might want to expand your comment a bit so it says that schema will enforce the values you\u0027ve stated above. In which case, do we need this trap? If the schema is only allowing null or an integer then you have three ways to happen here:\n\n* the input is a real integer, in which case we don\u0027t want to int it\n* the input was a json null, which pything will call None\n* the data.get above will never fail over to the default None, because of the schema\n\nSo the only possible values are the values we want to store, yes?\n\nIf that\u0027s not true, then something about the comment needs to explain why.","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4e20c680cfb3851602f091f55d1535c6cb3be275","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        # This will be a string with either a numeric value, None, or \u0027None\u0027"},{"line_number":267,"context_line":"        try:"},{"line_number":268,"context_line":"            consumer_generation \u003d int(cg)"},{"line_number":269,"context_line":"        except (ValueError, TypeError):"},{"line_number":270,"context_line":"            consumer_generation \u003d None"},{"line_number":271,"context_line":"    else:"},{"line_number":272,"context_line":"        consumer_generation \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_ee86b513","line":269,"in_reply_to":"9f6a8fd7_da6ff4f9","updated":"2018-04-20 19:23:36.000000000","message":"I had gotten None, \"None\", 0, and \"0\" at various points in testing. I will remove this, and then go back to see if those values are still received.","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5c5829ecc5663775f0fb8dc753e7d99880ef3733","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    except exception.ConcurrentUpdateDetected as exc:"},{"line_number":315,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":316,"context_line":"            _(\u0027Inventory and/or allocations changed while attempting to \u0027"},{"line_number":317,"context_line":"              \u0027allocate: %(error)s\u0027) % {\u0027error\u0027: exc})"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    req.response.status \u003d 204"},{"line_number":320,"context_line":"    req.response.content_type \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_9a0c1c42","line":317,"updated":"2018-04-20 13:44:26.000000000","message":"Since we\u0027ve got the error code stuff merged now, there might be a chance to use it here.","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4e20c680cfb3851602f091f55d1535c6cb3be275","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    except exception.ConcurrentUpdateDetected as exc:"},{"line_number":315,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":316,"context_line":"            _(\u0027Inventory and/or allocations changed while attempting to \u0027"},{"line_number":317,"context_line":"              \u0027allocate: %(error)s\u0027) % {\u0027error\u0027: exc})"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    req.response.status \u003d 204"},{"line_number":320,"context_line":"    req.response.content_type \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_8eb37998","line":317,"in_reply_to":"9f6a8fd7_9a0c1c42","updated":"2018-04-20 19:23:36.000000000","message":"Sounds good. Done","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5c5829ecc5663775f0fb8dc753e7d99880ef3733","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        consumer_generation \u003d util.wsgi_path_item(req.environ,"},{"line_number":428,"context_line":"                \"consumer_generation\")"},{"line_number":429,"context_line":"    else:"},{"line_number":430,"context_line":"        consumer_generation \u003d None"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    allocations \u003d rp_obj.AllocationList.get_all_by_consumer_id(context,"},{"line_number":433,"context_line":"            consumer_uuid, consumer_generation\u003dconsumer_generation)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_b506d31b","line":430,"updated":"2018-04-20 13:44:26.000000000","message":"These changes can go away","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4e20c680cfb3851602f091f55d1535c6cb3be275","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        consumer_generation \u003d util.wsgi_path_item(req.environ,"},{"line_number":428,"context_line":"                \"consumer_generation\")"},{"line_number":429,"context_line":"    else:"},{"line_number":430,"context_line":"        consumer_generation \u003d None"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    allocations \u003d rp_obj.AllocationList.get_all_by_consumer_id(context,"},{"line_number":433,"context_line":"            consumer_uuid, consumer_generation\u003dconsumer_generation)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_e23a49ca","line":430,"in_reply_to":"9f6a8fd7_b506d31b","updated":"2018-04-20 19:23:36.000000000","message":"Done","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            consumer_generation \u003d cg"},{"line_number":268,"context_line":"        else:"},{"line_number":269,"context_line":"            # Depending on the JSON deserialization, this could be either the"},{"line_number":270,"context_line":"            # string \"None\" or the value None. Either way..."},{"line_number":271,"context_line":"            consumer_generation \u003d None"},{"line_number":272,"context_line":"        if not data[\"allocations\"]:"},{"line_number":273,"context_line":"            # This is the newer way to delete allocations for a consumer, by"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_ba45ed45","line":270,"updated":"2018-04-26 11:14:39.000000000","message":"this isn\u0027t true. The json shoud never be the string \"None\" if it is has passed the shema properly.","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            # then check the generation to detect races. If such a race is"},{"line_number":276,"context_line":"            # found, a ConcurrentUpdateDetected exception will be raised."},{"line_number":277,"context_line":"            rp_obj.delete_allocations_for_consumer(context,"},{"line_number":278,"context_line":"                    data[\"consumer_id\"], consumer_generation)"},{"line_number":279,"context_line":"            return"},{"line_number":280,"context_line":"    else:"},{"line_number":281,"context_line":"        consumer_generation \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_7a799591","line":278,"updated":"2018-04-26 11:14:39.000000000","message":"I can\u0027t tell, is the caller catching that ConcurrentUpdateDetected?","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"}],"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":1764,"context_line":"    _delete_allocations_for_consumer(ctx, consumer_id)"},{"line_number":1765,"context_line":"    consumer \u003d Consumer.get_or_create(ctx, consumer_id, project_id\u003dNone,"},{"line_number":1766,"context_line":"            user_id\u003dNone, request_generation\u003dconsumer_generation,"},{"line_number":1767,"context_line":"            enforce_generation\u003dTrue)"},{"line_number":1768,"context_line":"    consumer.increment_generation()"},{"line_number":1769,"context_line":"    consumer.save(ctx)"},{"line_number":1770,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_7a9e75b9","line":1767,"updated":"2018-04-26 11:14:39.000000000","message":"This is getting and creating an object for a situation where we don\u0027t need any of the information that that object provides for the action we want to take.","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"            user_id\u003dNone, request_generation\u003dconsumer_generation,"},{"line_number":1767,"context_line":"            enforce_generation\u003dTrue)"},{"line_number":1768,"context_line":"    consumer.increment_generation()"},{"line_number":1769,"context_line":"    consumer.save(ctx)"},{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":""},{"line_number":1772,"context_line":"def _check_capacity_exceeded(ctx, allocs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_ba8c0d80","line":1769,"updated":"2018-04-26 11:14:39.000000000","message":"especially since we want the increment to be happening in the same sql statement that saves the generation. Otherwise the generation is not operating properly as a compare and swap as described in jay\u0027s blog posting: http://www.joinfu.com/2015/01/understanding-reservations-concurrency-locking-in-nova/","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":2164,"context_line":"            # requested generation does not match the database value for"},{"line_number":2165,"context_line":"            # requests at microversion \u003e\u003d 1.99."},{"line_number":2166,"context_line":"            consumer.increment_generation()"},{"line_number":2167,"context_line":"            consumer.save(context)"},{"line_number":2168,"context_line":""},{"line_number":2169,"context_line":"    @classmethod"},{"line_number":2170,"context_line":"    def get_all_by_resource_provider(cls, context, rp):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_3acf9db1","line":2167,"updated":"2018-04-26 11:14:39.000000000","message":"see above. I\u0027m not positive about it, but I\u0027m pretty sure that the update  is not sufficient without also checking the generation with a where in the update.","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"}],"nova/api/openstack/placement/schemas/allocation.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        \"allocations\": {"},{"line_number":140,"context_line":"            \"type\": \"object\","},{"line_number":141,"context_line":"            \"minProperties\": 0,"},{"line_number":142,"context_line":"            \"maxProperties\": 0"},{"line_number":143,"context_line":"        },"},{"line_number":144,"context_line":"        \"consumer_id\": {"},{"line_number":145,"context_line":"            \"type\": \"string\","}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_da71c179","line":142,"updated":"2018-04-26 11:14:39.000000000","message":"Is it redundant to have both?","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    \"minProperties\": 1,"},{"line_number":192,"context_line":"    \"additionalProperties\": False,"},{"line_number":193,"context_line":"    \"patternProperties\": {"},{"line_number":194,"context_line":"        \"^[0-9a-fA-F-]{36}$\": ALLOC_PUT_DELETE_SCHEMA_V1_99"},{"line_number":195,"context_line":"    }"},{"line_number":196,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_3a5d5de9","line":194,"updated":"2018-04-26 11:14:39.000000000","message":"You want ALLOCATION_SCHEMA_V1_99 here?","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"}],"nova/compute/api.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3606f423724c09331a3f2c0d49b6ca6e71282feb","unresolved":false,"context_lines":[{"line_number":2056,"context_line":"            self._local_cleanup_bdm_volumes(bdms, instance, context)"},{"line_number":2057,"context_line":"            # Cleanup allocations in Placement since we can\u0027t do it from the"},{"line_number":2058,"context_line":"            # compute service."},{"line_number":2059,"context_line":"            self.placementclient.delete_allocation_for_instance(context,"},{"line_number":2060,"context_line":"                    instance.uuid, force\u003dTrue)"},{"line_number":2061,"context_line":"            cb(context, instance, bdms, local\u003dTrue)"},{"line_number":2062,"context_line":"            instance.destroy()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_5a2cd149","line":2059,"updated":"2018-04-26 11:14:39.000000000","message":"I saw your abandoned patch on doing this separately, but I\u0027m not clear on why it is necessary. Doesn\u0027t microversions mean that you can do this at any point after the the new microversion is present?","commit_id":"f205dac3c0caf722b9e4de6184f732bfaea1c91d"}],"releasenotes/notes/consumer_generation-f576ac2594b24e2e.yaml":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"5c5829ecc5663775f0fb8dc753e7d99880ef3733","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    addition to the allocations, the current value of the generation value for"},{"line_number":15,"context_line":"    that consumer. The calling process should then combine the existing"},{"line_number":16,"context_line":"    allocations with the ones it is trying to post, and re-submit with the"},{"line_number":17,"context_line":"    current consumer_generation."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9f6a8fd7_3548835a","line":17,"updated":"2018-04-20 13:44:26.000000000","message":"✔","commit_id":"86963bceb886a0bdb62f8e822951e9f395ffe6f5"}]}
