)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"37f284928ae4959995fb62d5753cb3aed3932926","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the migration record to the instance so that the instance"},{"line_number":16,"context_line":"consumer holds the same source node allocations as before"},{"line_number":17,"context_line":"the resize, and the allocations against the destination"},{"line_number":18,"context_line":"compute node are dropped."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depending on the order of calls to do this revert/move,"},{"line_number":21,"context_line":"the allocations may have already been moved so the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_8ebde103","line":18,"updated":"2019-02-21 23:38:31.000000000","message":"so the allocation are intially atomicaly swaped to the migration\nrecord by the conductor. Then in the next paragrap you say that\ndependign on the order of calls, (in the failure case?) allocation may have already been moved from the migration to the instnace.\n\nthis implies in the failure case there ware 2 entities that are trying\nto manage the allocation. are they the conductor and compute node or\nis this a race between a revert from a user via the api that races with an automatic\nrevert due to the failed migration?\n\nlater: ah i see  in the comment below this is a double revert of the allocation becase the compute service is doing the moved in the failure case.\ni wonder if we should elemiate the moves of the allocation by the compute service at somepoint so only the conductor will handel this.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e54d5f550ddde70c1d8b7f0f4b4e00750a9bd18","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the migration record to the instance so that the instance"},{"line_number":16,"context_line":"consumer holds the same source node allocations as before"},{"line_number":17,"context_line":"the resize, and the allocations against the destination"},{"line_number":18,"context_line":"compute node are dropped."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depending on the order of calls to do this revert/move,"},{"line_number":21,"context_line":"the allocations may have already been moved so the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_f858e1fa","line":18,"in_reply_to":"9fdfeff1_8ebde103","updated":"2019-02-22 17:04:01.000000000","message":"\u003e later: ah i see in the comment below this is a double revert of the allocation becase the compute service is doing the moved in the failure case. i wonder if we should elemiate the moves of the allocation by the compute service at somepoint so only the conductor will handel this.\n\nWell, as noted it\u0027s not an issue for traditional resize today because if something fails in conductor we revert allocations there, and if something fails in compute, compute does the revert and we never get back to conductor because conductor RPC cast to compute (prep_resize in that case).\n\nWith the cross-cell resize flow, conductor is RPC calling compute, so if compute reverts the allocation and then conductor tries to roll it back as well (because it doesn\u0027t know how far it got and if compute cleaned up already), then it tries to rollback as well and can fail if the source consumer allocations are already gone. I would rather just have graceful code than worry about the tight coupling of which actor in the story is doing what at any given time.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"9e692f742f13090c55e406b69a0276b1619c8b0f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"the resize, and the allocations against the destination"},{"line_number":18,"context_line":"compute node are dropped."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depending on the order of calls to do this revert/move,"},{"line_number":21,"context_line":"the allocations may have already been moved so the"},{"line_number":22,"context_line":"source node consumer (the migration record in this case)"},{"line_number":23,"context_line":"will not have any allocations and if the target consumer"},{"line_number":24,"context_line":"(the instance in this case) has allocations, we should"},{"line_number":25,"context_line":"assume there is nothing to do and just return True."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I483750462b80aac609f0c2deb783b389ff5156c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_bec5295e","line":25,"range":{"start_line":20,"start_character":0,"end_line":25,"end_character":51},"updated":"2019-02-13 06:58:03.000000000","message":"hmm, didn\u0027t quite get what the situation is here...couldn\u0027t we just don\u0027t call move_allocations twice?","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"528ca1ebdae36ed7ffdbf86b5237106fd43c916a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"the resize, and the allocations against the destination"},{"line_number":18,"context_line":"compute node are dropped."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Depending on the order of calls to do this revert/move,"},{"line_number":21,"context_line":"the allocations may have already been moved so the"},{"line_number":22,"context_line":"source node consumer (the migration record in this case)"},{"line_number":23,"context_line":"will not have any allocations and if the target consumer"},{"line_number":24,"context_line":"(the instance in this case) has allocations, we should"},{"line_number":25,"context_line":"assume there is nothing to do and just return True."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I483750462b80aac609f0c2deb783b389ff5156c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_84049316","line":25,"range":{"start_line":20,"start_character":0,"end_line":25,"end_character":51},"in_reply_to":"9fdfeff1_bec5295e","updated":"2019-02-13 13:25:55.000000000","message":"No because you\u0027ll get a KeyError here:\n\nhttps://review.openstack.org/#/c/636412/1/nova/scheduler/client/report.py@1773\n\nBecause the allocations dict is empty for the source consumer since the allocations were already moved. In the case of cross-cell resize, they are moved by the compute service when something fails, like here:\n\nhttps://review.openstack.org/#/c/634832/7/nova/compute/manager.py@4505\n\nAnd because that\u0027s a synchronous call from conductor, and the rollbacks in the conductor tasks are run in a queue, eventually conductor tries to revert the allocations again here:\n\nhttps://github.com/openstack/nova/blob/104d79d8dd05fc49c4160b759d43291b874c5d28/nova/conductor/tasks/migrate.py#L321\n\nAnd that\u0027s when you hit the KeyError.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"50dacf66c7c1c137afb68a3938e4b7d0950a9dee","unresolved":false,"context_lines":[{"line_number":23,"context_line":"will not have any allocations and if the target consumer"},{"line_number":24,"context_line":"(the instance in this case) has allocations, we should"},{"line_number":25,"context_line":"assume there is nothing to do and just return True."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I483750462b80aac609f0c2deb783b389ff5156c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_5a8a001b","line":26,"updated":"2019-02-13 14:57:54.000000000","message":"Don\u0027t we have a bug for this? (I spect we should)","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"44cb35624cff6de8b1b42d362a2babdbbd6e64b4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"will not have any allocations and if the target consumer"},{"line_number":24,"context_line":"(the instance in this case) has allocations, we should"},{"line_number":25,"context_line":"assume there is nothing to do and just return True."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I483750462b80aac609f0c2deb783b389ff5156c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_89e264d4","line":26,"in_reply_to":"9fdfeff1_5a8a001b","updated":"2019-02-13 17:45:26.000000000","message":"No because I\u0027m not aware of any existing code that would hit this. I teased this out when hitting issues in my functional testing patch at the end of this series and was seeing the rollback fail since the allocations were already moved.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e7373b3d57354f99582c563ae395c3f32c89dd6","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"                                     allocations are moving"},{"line_number":1742,"context_line":"        :param target_consumer_uuid: the UUID of the target consumer for the"},{"line_number":1743,"context_line":"                                     allocations"},{"line_number":1744,"context_line":"        :returns: True if the move was successful (or already done),"},{"line_number":1745,"context_line":"                  False otherwise."},{"line_number":1746,"context_line":"        :raises AllocationMoveFailed: If the source or the target consumer has"},{"line_number":1747,"context_line":"                                      been modified while this call tries to"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_801e4d5d","line":1744,"updated":"2019-03-04 12:42:48.000000000","message":"idempotency for the win","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"37f284928ae4959995fb62d5753cb3aed3932926","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        :param target_consumer_uuid: the UUID of the target consumer for the"},{"line_number":1743,"context_line":"                                     allocations"},{"line_number":1744,"context_line":"        :returns: True if the move was successful (or already done),"},{"line_number":1745,"context_line":"                  False otherwise."},{"line_number":1746,"context_line":"        :raises AllocationMoveFailed: If the source or the target consumer has"},{"line_number":1747,"context_line":"                                      been modified while this call tries to"},{"line_number":1748,"context_line":"                                      move allocations."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_aeb8e510","line":1745,"updated":"2019-02-21 23:38:31.000000000","message":"ok so the new post condtion is that when this is called if it returns true then the souce has no allocation and that target has allocation and there is nolonger a precondition that the source node had alloctions.\n\nif neither the source or target intially had allcoation do we expect this function to return True False or rasie a AllocationMoveFailed exception?\n\ni mean i would also be fine with saying a precondtion of calling move_allocations is that allocation must exist to be moved but just taught i would ask.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e54d5f550ddde70c1d8b7f0f4b4e00750a9bd18","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        :param target_consumer_uuid: the UUID of the target consumer for the"},{"line_number":1743,"context_line":"                                     allocations"},{"line_number":1744,"context_line":"        :returns: True if the move was successful (or already done),"},{"line_number":1745,"context_line":"                  False otherwise."},{"line_number":1746,"context_line":"        :raises AllocationMoveFailed: If the source or the target consumer has"},{"line_number":1747,"context_line":"                                      been modified while this call tries to"},{"line_number":1748,"context_line":"                                      move allocations."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_58300d9f","line":1745,"in_reply_to":"9fdfeff1_aeb8e510","updated":"2019-02-22 17:04:01.000000000","message":"\u003e if neither the source or target intially had allcoation do we expect this function to return True False or rasie a AllocationMoveFailed exception?\n\nIn the case of the target, it doesn\u0027t matter what it\u0027s allocations are because we\u0027re going to overwrite them if the source has allocations.\n\n\u003e i mean i would also be fine with saying a precondtion of calling move_allocations is that allocation must exist to be moved but just taught i would ask.\n\nBut then the caller has to do the check up front to see if the source consumer has allocations to move, which is kind of clunky. I mean, we could do that, or write a new graceful_move_allocations method which wraps this one, checks the source consumer allocs and if they don\u0027t exist, just don\u0027t call this method. Then the new cross-cell resize stuff calls the graceful method and the traditional resize stuff (both conductor and compute) continues to call this method.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"32bba7b1aebcf3090d7d4e76aa9b585604ff8c7a","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        if target_alloc and target_alloc[\u0027allocations\u0027]:"},{"line_number":1756,"context_line":"            # Check to see if the source allocations still exist because if"},{"line_number":1757,"context_line":"            # they don\u0027t they might have already been moved to the target."},{"line_number":1758,"context_line":"            if not (source_alloc and source_alloc[\u0027allocations\u0027]):"},{"line_number":1759,"context_line":"                LOG.info(\u0027Allocations not found for consumer %s; assuming \u0027"},{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_b948688a","line":1758,"updated":"2019-03-04 15:36:57.000000000","message":"This seems like good behavior, but why aren\u0027t we actually looking at them? For really any operation, if we grew a new allocation for the instance, maybe due to external influences like a new volume or network allocation, this could potentially be fooled, right?","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e14dc3f5871e7f164ac3ecc087d066bf81577e8f","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        if target_alloc and target_alloc[\u0027allocations\u0027]:"},{"line_number":1756,"context_line":"            # Check to see if the source allocations still exist because if"},{"line_number":1757,"context_line":"            # they don\u0027t they might have already been moved to the target."},{"line_number":1758,"context_line":"            if not (source_alloc and source_alloc[\u0027allocations\u0027]):"},{"line_number":1759,"context_line":"                LOG.info(\u0027Allocations not found for consumer %s; assuming \u0027"},{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_34a9da7b","line":1758,"in_reply_to":"9fdfeff1_2eed0bf0","updated":"2019-03-04 18:59:23.000000000","message":"Well, with what you have here, you couldn\u0027t I guess, but if you had some extra information passed in about what they should be then, obviously, you could.\n\nBut, going on that assertion, should you add \"and not source_alloc\" into  your decision? Or rather, maybe, make sure they don\u0027t overlap at all? It just seems like \"meh, there\u0027s some allocation for the instance, so we must have done what we need\" is way too simplistic of a metric.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af439eca577a65cde4f5a910f9a0237967264167","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        if target_alloc and target_alloc[\u0027allocations\u0027]:"},{"line_number":1756,"context_line":"            # Check to see if the source allocations still exist because if"},{"line_number":1757,"context_line":"            # they don\u0027t they might have already been moved to the target."},{"line_number":1758,"context_line":"            if not (source_alloc and source_alloc[\u0027allocations\u0027]):"},{"line_number":1759,"context_line":"                LOG.info(\u0027Allocations not found for consumer %s; assuming \u0027"},{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_b4b4ea83","line":1758,"in_reply_to":"9fdfeff1_34a9da7b","updated":"2019-03-04 19:19:15.000000000","message":"\u003e But, going on that assertion, should you add \"and not source_alloc\" into your decision?\n\nThat\u0027s in here.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"84678621f4cb58485f18d8dd883511bfb0d61e75","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        if target_alloc and target_alloc[\u0027allocations\u0027]:"},{"line_number":1756,"context_line":"            # Check to see if the source allocations still exist because if"},{"line_number":1757,"context_line":"            # they don\u0027t they might have already been moved to the target."},{"line_number":1758,"context_line":"            if not (source_alloc and source_alloc[\u0027allocations\u0027]):"},{"line_number":1759,"context_line":"                LOG.info(\u0027Allocations not found for consumer %s; assuming \u0027"},{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_b4370aff","line":1758,"in_reply_to":"9fdfeff1_b4b4ea83","updated":"2019-03-04 19:23:12.000000000","message":"Okay, sorry, I was focusing on what was in green, and actually thinking about what was in white. So, ack, this is tighter of a check than I thought. It still seems to be overly specific to the case of wholesale replacement of one set of allocations with another, which I expect will be a bug in the future when it\u0027s more than just nova holding these allocations. But, we have that in lots of places.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4163c5d0bc9ef56454564f526a37cbb75d1655e6","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        if target_alloc and target_alloc[\u0027allocations\u0027]:"},{"line_number":1756,"context_line":"            # Check to see if the source allocations still exist because if"},{"line_number":1757,"context_line":"            # they don\u0027t they might have already been moved to the target."},{"line_number":1758,"context_line":"            if not (source_alloc and source_alloc[\u0027allocations\u0027]):"},{"line_number":1759,"context_line":"                LOG.info(\u0027Allocations not found for consumer %s; assuming \u0027"},{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_2eed0bf0","line":1758,"in_reply_to":"9fdfeff1_b948688a","updated":"2019-03-04 17:23:30.000000000","message":"\u003e This seems like good behavior, but why aren\u0027t we actually looking at them?\n\nHow would I look in target_allocs for the stuff that *was* in source_allocs but is no more?","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"50dacf66c7c1c137afb68a3938e4b7d0950a9dee","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"},{"line_number":1762,"context_line":"                return True"},{"line_number":1763,"context_line":"            LOG.warning(\u0027Overwriting current allocation %(allocation)s on \u0027"},{"line_number":1764,"context_line":"                        \u0027consumer %(consumer)s\u0027,"},{"line_number":1765,"context_line":"                        {\u0027allocation\u0027: target_alloc,"},{"line_number":1766,"context_line":"                         \u0027consumer\u0027: target_consumer_uuid})"},{"line_number":1767,"context_line":""},{"line_number":1768,"context_line":"        new_allocs \u003d {"},{"line_number":1769,"context_line":"            source_consumer_uuid: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_facc148a","line":1766,"range":{"start_line":1763,"start_character":0,"end_line":1766,"end_character":59},"updated":"2019-02-13 14:57:54.000000000","message":"I\u0027m curious whether we ever hit this part now. Under what circumstances would target allocations exist, where it would be okay to overwrite them? I.e. I\u0027m wondering if we should make this an exception now (possibly in a separate patch).","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"44cb35624cff6de8b1b42d362a2babdbbd6e64b4","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"                         \u0027they were already moved to consumer %s\u0027,"},{"line_number":1761,"context_line":"                         source_consumer_uuid, target_consumer_uuid)"},{"line_number":1762,"context_line":"                return True"},{"line_number":1763,"context_line":"            LOG.warning(\u0027Overwriting current allocation %(allocation)s on \u0027"},{"line_number":1764,"context_line":"                        \u0027consumer %(consumer)s\u0027,"},{"line_number":1765,"context_line":"                        {\u0027allocation\u0027: target_alloc,"},{"line_number":1766,"context_line":"                         \u0027consumer\u0027: target_consumer_uuid})"},{"line_number":1767,"context_line":""},{"line_number":1768,"context_line":"        new_allocs \u003d {"},{"line_number":1769,"context_line":"            source_consumer_uuid: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_09f7548d","line":1766,"range":{"start_line":1763,"start_character":0,"end_line":1766,"end_character":59},"in_reply_to":"9fdfeff1_facc148a","updated":"2019-02-13 17:45:26.000000000","message":"Yes of course [1][2] and this probably shouldn\u0027t be a warning, more like info. As noted in the commit message, the allocations from the instance on the source node are moved to the migration record, and the scheduler creates allocations for the instance on the target node. So when we revert (on rollback) both consumers have allocations:\n\n1. migration consumer -\u003e source compute node provider\n2. instance consumer -\u003e target compute node provider\n\nThis method is used to move the source node allocations back to the target consumer and drop the target compute node provider allocations since we didn\u0027t actually migrate the instance there.\n\n[1] http://logstash.openstack.org/#dashboard/file/logstash.json?query\u003dmessage%3A%5C%22Overwriting%20current%20allocation%5C%22\u0026from\u003d7d\n[2] http://logs.openstack.org/71/633871/8/check/tempest-full/619b984/controller/logs/screen-n-cpu.txt?level\u003dTRACE#_Feb_13_13_06_51_309806","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"37f284928ae4959995fb62d5753cb3aed3932926","unresolved":false,"context_lines":[{"line_number":1774,"context_line":"                \u0027user_id\u0027: source_alloc[\u0027user_id\u0027],"},{"line_number":1775,"context_line":"                \u0027consumer_generation\u0027: source_alloc[\u0027consumer_generation\u0027]},"},{"line_number":1776,"context_line":"            target_consumer_uuid: {"},{"line_number":1777,"context_line":"                \u0027allocations\u0027: source_alloc[\u0027allocations\u0027],"},{"line_number":1778,"context_line":"                # NOTE(gibi): Is there any case when we need to keep the"},{"line_number":1779,"context_line":"                # project_id and user_id of the target allocation that we are"},{"line_number":1780,"context_line":"                # about to overwrite?"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_4e35b9a7","line":1777,"updated":"2019-02-21 23:38:31.000000000","message":"i think this might still raise a key error of the post on line 1786 below\nmay fail. should we add another if on line 1767 and bail out early if neitehr the source or target consumer have allocations\ne.g.\nif not ((source_alloc and source_alloc[\u0027allocations\u0027]) or ( target_alloc and target_alloc[\u0027allocations\u0027])):\n    return False","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e54d5f550ddde70c1d8b7f0f4b4e00750a9bd18","unresolved":false,"context_lines":[{"line_number":1774,"context_line":"                \u0027user_id\u0027: source_alloc[\u0027user_id\u0027],"},{"line_number":1775,"context_line":"                \u0027consumer_generation\u0027: source_alloc[\u0027consumer_generation\u0027]},"},{"line_number":1776,"context_line":"            target_consumer_uuid: {"},{"line_number":1777,"context_line":"                \u0027allocations\u0027: source_alloc[\u0027allocations\u0027],"},{"line_number":1778,"context_line":"                # NOTE(gibi): Is there any case when we need to keep the"},{"line_number":1779,"context_line":"                # project_id and user_id of the target allocation that we are"},{"line_number":1780,"context_line":"                # about to overwrite?"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_f8db014c","line":1777,"in_reply_to":"9fdfeff1_4e35b9a7","updated":"2019-02-22 17:04:01.000000000","message":"As I said above, we don\u0027t care if the target has allocations since we\u0027re going to overwrite them.","commit_id":"55f455262144ab319a9ff480850aeece88b1dedb"}]}
