)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"55fd12054bcd84f63f561ce3078f8c822afb0498","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations when it is re-allocated"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If instance has been moved to another host, delete allocations that remained for this instance against this compute host"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ie07eb67f90ae0ec5701a04820967d789be5292b4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_f65450ff","line":9,"updated":"2018-07-17 12:42:52.000000000","message":"please line wrap after \"that\"","commit_id":"b946119603d88bf9315079c6150be4a03c668073"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34c74ba2359bb358866bb748a9bdc806e1f63621","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     fpxie \u003cfpxie@fiberhome.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-20 13:47:06 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations when it is re-allocated"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If instance has been moved to another host, delete allocations that"},{"line_number":10,"context_line":"remained for this instance against this compute host"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_9cced0b2","line":7,"updated":"2018-08-29 14:17:12.000000000","message":"This needs to be a lot more descriptive. Something like:\n\n Delete allocations for instances that have been moved to another compute","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34c74ba2359bb358866bb748a9bdc806e1f63621","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Delete allocations when it is re-allocated"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If instance has been moved to another host, delete allocations that"},{"line_number":10,"context_line":"remained for this instance against this compute host"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie07eb67f90ae0ec5701a04820967d789be5292b4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_7cc974aa","line":10,"updated":"2018-08-29 14:17:12.000000000","message":"This also needs to describe that this is related to cleaning up stale allocations that an instance has against a host it was previously running on.\n\nI think this also needs a bug with some good descriptive language and supporting logs about what situation can cause this to happen. In recent releases, an instance being moved by nova should not retain any allocations against the source host almost immediately after the migration has begun.","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f602affdae92b042866b821029ab4dcae4088701","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     fpxie \u003cfpxie@fiberhome.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-23 08:41:49 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations when it is re-allocated"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If instance has been moved to another host, delete allocations that"},{"line_number":10,"context_line":"remained for this instance against this compute host"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_1e3151a3","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":42},"updated":"2018-08-29 17:43:16.000000000","message":"I think you mean \"Delete orphan allocation records when finished resizing\"","commit_id":"2864359164232cc3978982890f66b9d16d83530d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-09-06 09:22:13 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations for instances that have been moved to another node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1790569"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ie07eb67f90ae0ec5701a04820967d789be5292b4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3f79a3b5_412c2898","line":8,"updated":"2018-09-06 13:55:17.000000000","message":"We need more details in the commit message. I know at the time of the Pike GA we had a lot of side paths through the code that didn\u0027t properly cleanup allocations, but I thought we had taken care of all of those. If we missed something, it should be clearly explained what the bug is in the commit message and how this patch fixes it.\n\nSee:\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"ad23e17af8c4e7826cddcbc12041c07409705cf9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations for instances that is not in this node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If an user create a VM, failed because rabbitMQ exception after the"},{"line_number":10,"context_line":"resource was allocated. In this case, the resource allocated in"},{"line_number":11,"context_line":"placement can not be clean. So clean these resource allocations"},{"line_number":12,"context_line":"in periodic_task."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1790569"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"3f79a3b5_3de8f3b1","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":17},"updated":"2018-09-10 10:30:27.000000000","message":"If rabbitmq is down after resource is claimed and before the allocation result gets back to conductor, the instance can go into error state, and when you delete it the allocation should be gone.\nSo I think many of us are still a little bit confused about what the issue really is. Could you please help provide additional necessary info so that reviewers can catch up what we are dealing with here? For example, you may want to:\n1 show how to reproduce the issue (including expected/actual results)\n2 analyze the possible root cause\n3 explain how you are going to fix it","commit_id":"e11167f1a33daab89d5afa32b06519d50207b858"},{"author":{"_account_id":25284,"name":"fupingxie","email":"xiefp88@sina.com","username":"fpxie"},"change_message_id":"2207baa0ef2b15f598918c147c3493a59790f43d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete allocations for instances that is not in this node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If an user create a VM, failed because rabbitMQ exception after the"},{"line_number":10,"context_line":"resource was allocated. In this case, the resource allocated in"},{"line_number":11,"context_line":"placement can not be clean. So clean these resource allocations"},{"line_number":12,"context_line":"in periodic_task."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1790569"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"3f79a3b5_6421cbb5","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":17},"in_reply_to":"3f79a3b5_3de8f3b1","updated":"2018-09-12 13:28:35.000000000","message":"Did you read the bug 1790569?","commit_id":"e11167f1a33daab89d5afa32b06519d50207b858"}],"nova/compute/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f602affdae92b042866b821029ab4dcae4088701","unresolved":false,"context_lines":[{"line_number":4071,"context_line":"        orig_alloc \u003d orig_alloc[cn_uuid].get(\u0027resources\u0027, {})"},{"line_number":4072,"context_line":""},{"line_number":4073,"context_line":"        # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":4074,"context_line":"        # against only one provider. So, this may overwrite allocations against"},{"line_number":4075,"context_line":"        # a shared provider, if we had one."},{"line_number":4076,"context_line":"        LOG.info(\u0027Swapping old allocation on %(node)s held by migration \u0027"},{"line_number":4077,"context_line":"                 \u0027%(mig)s for instance\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_1e3ab197","line":4074,"updated":"2018-08-29 17:43:16.000000000","message":"what changed about this line?\n\n(later) oh, you corrected \"overwrite\" misspelling","commit_id":"2864359164232cc3978982890f66b9d16d83530d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":4199,"context_line":"        orig_alloc \u003d orig_alloc[cn_uuid].get(\u0027resources\u0027, {})"},{"line_number":4200,"context_line":""},{"line_number":4201,"context_line":"        # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":4202,"context_line":"        # against only one provider. So, this may overwrite allocations against"},{"line_number":4203,"context_line":"        # a shared provider, if we had one."},{"line_number":4204,"context_line":"        LOG.info(\u0027Swapping old allocation on %(node)s held by migration \u0027"},{"line_number":4205,"context_line":"                 \u0027%(mig)s for instance\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_613284f4","line":4202,"updated":"2018-09-06 13:55:17.000000000","message":"To keep the diff smaller, it\u0027s best to omit this change from this patch. Especially since we might backport the fix, extra unnecessary changes can cause merge conflicts in the backport, so keep the diff as small as possible.","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"55fd12054bcd84f63f561ce3078f8c822afb0498","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"                # recreate an allocation that only refers to itself. So we"},{"line_number":1333,"context_line":"                # don\u0027t need to do anything in that case. Just log the"},{"line_number":1334,"context_line":"                # situation here for information but don\u0027t attempt to delete or"},{"line_number":1335,"context_line":"                # change the allocation."},{"line_number":1336,"context_line":"                LOG.warning(\"Instance %s has been moved to another host \""},{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining against \""},{"line_number":1338,"context_line":"                            \"the source host that might need to be removed: \""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_364f286b","line":1335,"updated":"2018-07-17 12:42:52.000000000","message":"This above comment needs to be adjusted to reflect that we are cleaning up the allocations now.","commit_id":"b946119603d88bf9315079c6150be4a03c668073"},{"author":{"_account_id":25284,"name":"fupingxie","email":"xiefp88@sina.com","username":"fpxie"},"change_message_id":"75fb0fdd91092a3915fccb9ebdb959c9ff39e6aa","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"                # recreate an allocation that only refers to itself. So we"},{"line_number":1333,"context_line":"                # don\u0027t need to do anything in that case. Just log the"},{"line_number":1334,"context_line":"                # situation here for information but don\u0027t attempt to delete or"},{"line_number":1335,"context_line":"                # change the allocation."},{"line_number":1336,"context_line":"                LOG.warning(\"Instance %s has been moved to another host \""},{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining against \""},{"line_number":1338,"context_line":"                            \"the source host that might need to be removed: \""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a361a2aa","line":1335,"in_reply_to":"5f7c97a3_364f286b","updated":"2018-07-19 02:41:13.000000000","message":"please review my new patch","commit_id":"b946119603d88bf9315079c6150be4a03c668073"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"875090f6605d7548e3211ecf1d754d9c41cee19f","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining \""},{"line_number":1338,"context_line":"                            \"against the source host. Detete the \""},{"line_number":1339,"context_line":"                            \"allocations(%s) if the instance is not \""},{"line_number":1340,"context_line":"                            \"in resized and there is not task associated \""},{"line_number":1341,"context_line":"                            \"with it \","},{"line_number":1342,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1343,"context_line":"                if not _instance_in_resize_state(instance) and \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_cb2f073c","line":1340,"range":{"start_line":1340,"start_character":29,"end_line":1340,"end_character":39},"updated":"2018-07-18 15:28:13.000000000","message":"in resized state","commit_id":"27207b22e4763ae5b6dd5f47f3a4dd7075cd23f5"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"875090f6605d7548e3211ecf1d754d9c41cee19f","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining \""},{"line_number":1338,"context_line":"                            \"against the source host. Detete the \""},{"line_number":1339,"context_line":"                            \"allocations(%s) if the instance is not \""},{"line_number":1340,"context_line":"                            \"in resized and there is not task associated \""},{"line_number":1341,"context_line":"                            \"with it \","},{"line_number":1342,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1343,"context_line":"                if not _instance_in_resize_state(instance) and \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8b258f5d","line":1340,"range":{"start_line":1340,"start_character":53,"end_line":1340,"end_character":56},"updated":"2018-07-18 15:28:13.000000000","message":"no","commit_id":"27207b22e4763ae5b6dd5f47f3a4dd7075cd23f5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c0b26b442a905726d31543556b754cd2e32c1ac0","unresolved":false,"context_lines":[{"line_number":1319,"context_line":"                            \"what to do.\", instance_uuid, alloc)"},{"line_number":1320,"context_line":"                continue"},{"line_number":1321,"context_line":"            if instance.host !\u003d cn.host:"},{"line_number":1322,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1323,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1324,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"},{"line_number":1325,"context_line":"                # instances to RT.tracked_instances and the above"},{"line_number":1326,"context_line":"                # Instance.get_by_uuid() call. We SHOULD attempt to remove any"},{"line_number":1327,"context_line":"                # allocations that reference this compute host if the VM is in"},{"line_number":1328,"context_line":"                # a stable terminal state (i.e. it isn\u0027t in a state of waiting"},{"line_number":1329,"context_line":"                # for resize to confirm/revert), however if the destination"},{"line_number":1330,"context_line":"                # host is an Ocata compute host, it will delete the allocation"},{"line_number":1331,"context_line":"                # that contains this source compute host information anyway and"},{"line_number":1332,"context_line":"                # recreate an allocation that only refers to itself. So we"},{"line_number":1333,"context_line":"                # don\u0027t need to do anything in that case. Just log the"},{"line_number":1334,"context_line":"                # situation here for information but don\u0027t attempt to delete or"},{"line_number":1335,"context_line":"                # change the allocation."},{"line_number":1336,"context_line":"                LOG.warning(\"Instance %s has been moved to another host \""},{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining \""},{"line_number":1338,"context_line":"                            \"against the source host. Detete the \""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_602fd73d","line":1335,"range":{"start_line":1322,"start_character":0,"end_line":1335,"end_character":40},"updated":"2018-07-19 13:10:23.000000000","message":"...this comment will need to be revised.","commit_id":"b4722023ff35f0765560708f0e89760ffe6b66a1"},{"author":{"_account_id":25284,"name":"fupingxie","email":"xiefp88@sina.com","username":"fpxie"},"change_message_id":"ac94c0837cb6a48a3c35d2cace479fface1064c9","unresolved":false,"context_lines":[{"line_number":1319,"context_line":"                            \"what to do.\", instance_uuid, alloc)"},{"line_number":1320,"context_line":"                continue"},{"line_number":1321,"context_line":"            if instance.host !\u003d cn.host:"},{"line_number":1322,"context_line":"                # The instance has been moved to another host either via a"},{"line_number":1323,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1324,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"},{"line_number":1325,"context_line":"                # instances to RT.tracked_instances and the above"},{"line_number":1326,"context_line":"                # Instance.get_by_uuid() call. We SHOULD attempt to remove any"},{"line_number":1327,"context_line":"                # allocations that reference this compute host if the VM is in"},{"line_number":1328,"context_line":"                # a stable terminal state (i.e. it isn\u0027t in a state of waiting"},{"line_number":1329,"context_line":"                # for resize to confirm/revert), however if the destination"},{"line_number":1330,"context_line":"                # host is an Ocata compute host, it will delete the allocation"},{"line_number":1331,"context_line":"                # that contains this source compute host information anyway and"},{"line_number":1332,"context_line":"                # recreate an allocation that only refers to itself. So we"},{"line_number":1333,"context_line":"                # don\u0027t need to do anything in that case. Just log the"},{"line_number":1334,"context_line":"                # situation here for information but don\u0027t attempt to delete or"},{"line_number":1335,"context_line":"                # change the allocation."},{"line_number":1336,"context_line":"                LOG.warning(\"Instance %s has been moved to another host \""},{"line_number":1337,"context_line":"                            \"%s(%s). There are allocations remaining \""},{"line_number":1338,"context_line":"                            \"against the source host. Detete the \""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_111668a2","line":1335,"range":{"start_line":1322,"start_character":0,"end_line":1335,"end_character":40},"in_reply_to":"5f7c97a3_602fd73d","updated":"2018-07-20 08:41:31.000000000","message":"OK,please review my new patch","commit_id":"b4722023ff35f0765560708f0e89760ffe6b66a1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34c74ba2359bb358866bb748a9bdc806e1f63621","unresolved":false,"context_lines":[{"line_number":1323,"context_line":"                # migration, evacuation or unshelve in between the time when we"},{"line_number":1324,"context_line":"                # ran InstanceList.get_by_host_and_node(), added those"},{"line_number":1325,"context_line":"                # instances to RT.tracked_instances and the above"},{"line_number":1326,"context_line":"                # Instance.get_by_uuid() call. We attempt to remove any"},{"line_number":1327,"context_line":"                # allocations that reference this compute host if the VM is in"},{"line_number":1328,"context_line":"                # a stable terminal state (i.e. it isn\u0027t in a state of waiting"},{"line_number":1329,"context_line":"                # for resize to confirm/revert)."}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7c5734cc","line":1326,"range":{"start_line":1326,"start_character":47,"end_line":1326,"end_character":71},"updated":"2018-08-29 14:17:12.000000000","message":"The name of this method is _remove_deleted_instances_allocations(), because it only removes allocations for deleted instances. Your proposed change here makes that no longer the case, and thus you should change the name of the method.","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"05becf494801f36f381ab7a777657f874a3f4ffc","unresolved":false,"context_lines":[{"line_number":1329,"context_line":"                # for resize to confirm/revert)."},{"line_number":1330,"context_line":"                LOG.warning(\"Instance %s has been moved to another host \""},{"line_number":1331,"context_line":"                            \"%s(%s). There are allocations remaining \""},{"line_number":1332,"context_line":"                            \"against the source host. Detete the \""},{"line_number":1333,"context_line":"                            \"allocations(%s) if the instance is not \""},{"line_number":1334,"context_line":"                            \"in resized state and there is no task \""},{"line_number":1335,"context_line":"                            \"associate with it \","}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b41aecc3","line":1332,"range":{"start_line":1332,"start_character":54,"end_line":1332,"end_character":60},"updated":"2018-07-20 20:47:41.000000000","message":"Delete","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"05becf494801f36f381ab7a777657f874a3f4ffc","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"                            \"against the source host. Detete the \""},{"line_number":1333,"context_line":"                            \"allocations(%s) if the instance is not \""},{"line_number":1334,"context_line":"                            \"in resized state and there is no task \""},{"line_number":1335,"context_line":"                            \"associate with it \","},{"line_number":1336,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1337,"context_line":"                if not _instance_in_resize_state(instance) and \\"},{"line_number":1338,"context_line":"                        not instance.task_state:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_1465e048","line":1335,"range":{"start_line":1335,"start_character":29,"end_line":1335,"end_character":38},"updated":"2018-07-20 20:47:41.000000000","message":"associated","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"05becf494801f36f381ab7a777657f874a3f4ffc","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"                            \"against the source host. Detete the \""},{"line_number":1333,"context_line":"                            \"allocations(%s) if the instance is not \""},{"line_number":1334,"context_line":"                            \"in resized state and there is no task \""},{"line_number":1335,"context_line":"                            \"associate with it \","},{"line_number":1336,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1337,"context_line":"                if not _instance_in_resize_state(instance) and \\"},{"line_number":1338,"context_line":"                        not instance.task_state:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_745f7474","line":1335,"range":{"start_line":1335,"start_character":46,"end_line":1335,"end_character":47},"updated":"2018-07-20 20:47:41.000000000","message":"remove blank space","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34c74ba2359bb358866bb748a9bdc806e1f63621","unresolved":false,"context_lines":[{"line_number":1335,"context_line":"                            \"associate with it \","},{"line_number":1336,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1337,"context_line":"                if not _instance_in_resize_state(instance) and \\"},{"line_number":1338,"context_line":"                        not instance.task_state:"},{"line_number":1339,"context_line":"                    self.reportclient.remove_provider_from_instance_allocation("},{"line_number":1340,"context_line":"                        instance.uuid, cn.uuid, instance.user_id,"},{"line_number":1341,"context_line":"                        instance.project_id, alloc[\u0027resources\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7c0c14ec","line":1338,"updated":"2018-08-29 14:17:12.000000000","message":"I\u0027m not sure this is strong enough to cover things like rebuild, shelved, etc.","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f602affdae92b042866b821029ab4dcae4088701","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1337,"context_line":"                if not _instance_in_resize_state(instance) and \\"},{"line_number":1338,"context_line":"                        not instance.task_state:"},{"line_number":1339,"context_line":"                    self.reportclient.remove_provider_from_instance_allocation("},{"line_number":1340,"context_line":"                        instance.uuid, cn.uuid, instance.user_id,"},{"line_number":1341,"context_line":"                        instance.project_id, alloc[\u0027resources\u0027])"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"    def delete_allocation_for_evacuated_instance(self, context, instance, node,"},{"line_number":1344,"context_line":"                                                 node_type\u003d\u0027source\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_9ec6c149","line":1341,"range":{"start_line":1339,"start_character":0,"end_line":1341,"end_character":64},"updated":"2018-08-29 17:43:16.000000000","message":"so, AFAIK, on the *destination node* when a resize is confirmed successfully, we will simply delete the allocation that is associated with the *migration UUID*:\n\nhttps://github.com/openstack/nova/blob/6522ea3ecfe99cca3fb33258b11e5a1f34e6e8f0/nova/compute/manager.py#L3895\n\nand then:\n\nhttps://github.com/openstack/nova/blob/6522ea3ecfe99cca3fb33258b11e5a1f34e6e8f0/nova/compute/manager.py#L3936\n\nSo, unless I\u0027m mistaken, this code would never need to be executed because the compute node resource provider representing the source host would not have an allocation for instance.uuid (only the destination host\u0027s compute node resource provider would have an allocation with instance.uuid as the consumer).","commit_id":"2864359164232cc3978982890f66b9d16d83530d"},{"author":{"_account_id":25284,"name":"fupingxie","email":"xiefp88@sina.com","username":"fpxie"},"change_message_id":"2207baa0ef2b15f598918c147c3493a59790f43d","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1337,"context_line":"                if not _instance_in_resize_state(instance) and \\"},{"line_number":1338,"context_line":"                        not instance.task_state:"},{"line_number":1339,"context_line":"                    self.reportclient.remove_provider_from_instance_allocation("},{"line_number":1340,"context_line":"                        instance.uuid, cn.uuid, instance.user_id,"},{"line_number":1341,"context_line":"                        instance.project_id, alloc[\u0027resources\u0027])"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"    def delete_allocation_for_evacuated_instance(self, context, instance, node,"},{"line_number":1344,"context_line":"                                                 node_type\u003d\u0027source\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_aab67bf8","line":1341,"range":{"start_line":1339,"start_character":0,"end_line":1341,"end_character":64},"in_reply_to":"3f79a3b5_9ec6c149","updated":"2018-09-12 13:28:35.000000000","message":"In some cases, MQ exception as example, the resource allocated to node-1 can not be removed, when VM start on node-2 after MQ become OK.","commit_id":"2864359164232cc3978982890f66b9d16d83530d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                            \"%s.\","},{"line_number":1394,"context_line":"                            instance_uuid, instance.host, instance.node, alloc)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def _remove_doubled_allocated_allocations(self, context, cn,"},{"line_number":1397,"context_line":"                                              instance_by_uuid):"},{"line_number":1398,"context_line":"        # Delete allocations for instances that have been moved to another"},{"line_number":1399,"context_line":"        # compute"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_a1417c3b","line":1396,"updated":"2018-09-06 13:55:17.000000000","message":"This is going to be called on every update_available_resource periodic task. Why not explicitly remove the allocations during resize confirm/revert? In fact, I\u0027m pretty sure we already have code that does that. So why isn\u0027t that working? Since there is no information in the commit message it\u0027s not clear (without digging into the bug report).","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        return None, None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":58,"context_line":"    # against only one provider. So, this may overwrite allocations against"},{"line_number":59,"context_line":"    # a shared provider, if we had one."},{"line_number":60,"context_line":"    success \u003d reportclient.set_and_clear_allocations("},{"line_number":61,"context_line":"        context, source_cn.uuid, migration.uuid, orig_alloc,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_c13cb8c0","line":58,"updated":"2018-09-06 13:55:17.000000000","message":"same, remove this change","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    reportclient \u003d schedclient.reportclient"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # FIXME(danms): This method is flawed in that it asssumes allocations"},{"line_number":89,"context_line":"    # against only one provider. So, this may overwrite allocations against"},{"line_number":90,"context_line":"    # a shared provider, if we had one."},{"line_number":91,"context_line":"    success \u003d reportclient.set_and_clear_allocations("},{"line_number":92,"context_line":"        context, source_cn.uuid, instance.uuid, orig_alloc,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_6147e44d","line":89,"updated":"2018-09-06 13:55:17.000000000","message":"same","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"05becf494801f36f381ab7a777657f874a3f4ffc","unresolved":false,"context_lines":[{"line_number":2836,"context_line":"    def test_remove_deleted_instances_allocations_resized_instance("},{"line_number":2837,"context_line":"            self, mock_inst_get):"},{"line_number":2838,"context_line":"        \"\"\"Tests the case that the resources of an instance is allocated on"},{"line_number":2839,"context_line":"         two resource providers. Also the instance is not in resized state and"},{"line_number":2840,"context_line":"         there is no task associated with the instance."},{"line_number":2841,"context_line":"        \"\"\""},{"line_number":2842,"context_line":"        instance \u003d _INSTANCE_FIXTURES[0]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f4d704bf","line":2839,"range":{"start_line":2839,"start_character":33,"end_line":2839,"end_character":74},"updated":"2018-07-20 20:47:41.000000000","message":"this particular unit test is for a resized instance. Perhaps consider replacing this copied (from below) docstring with just \"Make sure we don\u0027t attempt to remove allocations for instances that are resizing\"","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"05becf494801f36f381ab7a777657f874a3f4ffc","unresolved":false,"context_lines":[{"line_number":2871,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027)"},{"line_number":2872,"context_line":"    def test_remove_deleted_instances_allocations_tasking_instance("},{"line_number":2873,"context_line":"            self, mock_inst_get):"},{"line_number":2874,"context_line":"        \"\"\"Tests the case that the resources of an instance is allocated on"},{"line_number":2875,"context_line":"         two resource providers. Also the instance is not in resized state and"},{"line_number":2876,"context_line":"         there is no task associated with the instance."},{"line_number":2877,"context_line":"        \"\"\""},{"line_number":2878,"context_line":"        instance \u003d _INSTANCE_FIXTURES[0]"},{"line_number":2879,"context_line":"        instance.task_state \u003d task_states.MIGRATING"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_94f01068","line":2876,"range":{"start_line":2874,"start_character":11,"end_line":2876,"end_character":55},"updated":"2018-07-20 20:47:41.000000000","message":"this is copy/pasted from the unit test below (where this docstring is actually accurate). Please remove this docstring or replace with something like \"Make sure we do not attempt to delete allocations for an instance that is migrating\"","commit_id":"1bcea5b887c02e1d0b850fd4e1aa82aa5e0021a9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"267e81c0caf3e22c32dffb6f7f3e014ab70be41f","unresolved":false,"context_lines":[{"line_number":3035,"context_line":"                \u0027ctx\u0027, cn.uuid)"},{"line_number":3036,"context_line":"            rc.get_allocations_for_resource_provider.reset_mock()"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027)"},{"line_number":3039,"context_line":"    def test_remove_doubled_allocated_allocations_resized_instance("},{"line_number":3040,"context_line":"            self, mock_inst_get):"},{"line_number":3041,"context_line":"        \"\"\"Tests the case that the resources of an instance is allocated on"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_8142403a","line":3038,"updated":"2018-09-06 13:55:17.000000000","message":"I don\u0027t think unit tests will be enough for a change like this - if we have a latent bug here, we likely need a functional test to run through the flow asserting the allocations are properly cleaned up. We have several examples of that kind of test in nova.tests.functional.test_servers.","commit_id":"4a6832cd7e0a5534d677c1aa851863a024ee3bab"}]}
