)]}'
{"id":"openstack%2Fnova~810911","triplet_id":"openstack%2Fnova~stable%2Fxena~Ic0d6c59147abe5e094e8f13e0d3523b178daeba9","project":"openstack/nova","branch":"stable/xena","topic":"bug/1944759","attention_set":{},"removed_from_attention_set":{"9708":{"account":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"last_update":"2021-11-04 10:34:02.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"Ic0d6c59147abe5e094e8f13e0d3523b178daeba9","subject":"Store old_flavor already on source host during resize","status":"MERGED","created":"2021-09-24 13:50:56.000000000","updated":"2021-11-04 10:41:27.000000000","submitted":"2021-11-04 10:34:02.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":2,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"810911-bug/1944759","meta_rev_id":"e132e154014a8baf249b8661b197fd336506e045","_number":810911,"virtual_id_number":810911,"owner":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2021-11-04 10:34:01.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"all":[{"value":2,"date":"2021-10-29 15:36:35.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":2,"date":"2021-11-04 08:45:38.000000000","_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":1,"date":"2021-11-04 08:45:38.000000000","_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2021-09-24 14:17:34.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2021-10-29 15:36:35.000000000","updated_by":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"reviewer":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"state":"REVIEWER"},{"updated":"2021-11-04 08:45:38.000000000","updated_by":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"reviewer":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"state":"REVIEWER"}],"messages":[{"id":"76f42fa9721402d34061377588ca8e790b08ccfc","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-24 13:50:56.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"e5d091cd2f046729ae2af80796bbcf1c939ddcc3","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-09-24 14:17:34.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/d80d7f5dffb84331b7c587d05884f852 : SUCCESS in 17m 47s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/13c8d56f404145059833fe23b50257be : SUCCESS in 14m 06s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/270fa814de754cb68c8d765561202831 : SUCCESS in 17m 30s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/7260ad358a1047b190509ca7112a3554 : SUCCESS in 13m 19s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/ddfc19412eb54676a5bc6ddb21039695 : SUCCESS in 13m 13s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/3f959db9436f4810a291699a1ea13a2f : SUCCESS in 12m 59s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/ae20c9e07874430485d94b25c2a04d66 : SUCCESS in 11m 21s\n- nova-tox-validate-backport https://zuul.opendev.org/t/openstack/build/1ca384e31a574064a1502923ed97c1ad : FAILURE in 6m 59s (non-voting)\n- nova-tox-functional-centos8-py36 https://zuul.opendev.org/t/openstack/build/dbfe1f15c8c948fd9b3f4ef6ecc8f691 : SUCCESS in 21m 16s\n- nova-tox-functional-py38 https://zuul.opendev.org/t/openstack/build/f5c26bfc88dd4f3b8c1823c03ae274a4 : SUCCESS in 19m 12s\n- nova-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/dd226dcd3dcd4b26913d6cd157253e38 : SUCCESS in 21m 18s (non-voting)","accounts_in_message":[],"_revision_number":1},{"id":"f3326dd09ae72d01f5dcae2ddbf01649382ba652","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-09-24 14:20:33.000000000","message":"Patch Set 1:\n\nBuild succeeded (ARM64 pipeline).\n\n- openstack-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/c55b831ce6c140c4871928b232b684e8 : SUCCESS in 21m 12s (non-voting)\n- openstack-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/bd651652efe7493b9d70461d4d0c885c : SUCCESS in 23m 19s (non-voting)","accounts_in_message":[],"_revision_number":1},{"id":"7452fc425c1b32f1993e0573df169643fc96cc94","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-27 12:39:45.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"bfb699020c96bfe282f35c5bff39ef08dce3521c","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-09-27 13:04:32.000000000","message":"Patch Set 2:\n\nBuild succeeded (ARM64 pipeline).\n\n- openstack-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/0f137c7a651c458d9374f89758fb3465 : SUCCESS in 20m 52s (non-voting)\n- openstack-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/79879138d4e14397a8b79ab586e24e48 : SUCCESS in 20m 43s (non-voting)","accounts_in_message":[],"_revision_number":2},{"id":"8defbe637fcb329d2d94e198997a0b7d0e41f786","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-09-27 14:20:37.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- tempest-integrated-compute https://zuul.opendev.org/t/openstack/build/a0d7d9278d6f4029975d098a680e6bc3 : SUCCESS in 1h 06m 31s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/ed568ef22b7647b196662fb64e3687ad : SUCCESS in 13m 22s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/d0596269812442a0aad97c1a79ee24ee : SUCCESS in 18m 48s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/5ec316efd46c4f52800a639921754d22 : SUCCESS in 11m 57s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/386e9108b95a447aaea8165201f3edad : SUCCESS in 11m 45s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/20277bb6ba8d4c29a3f2c8d1caa7ed05 : SUCCESS in 12m 30s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/c11934a70db846118b125e5aeb855737 : SUCCESS in 12m 03s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/9f401f8375474d2e9d5ad0dba3a484c8 : SUCCESS in 11m 28s\n- ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa https://zuul.opendev.org/t/openstack/build/128a01b871a44e34962d60ace0b173ed : SUCCESS in 1h 23m 58s (non-voting)\n- nova-ceph-multistore https://zuul.opendev.org/t/openstack/build/2540901e6bb34b14b29f5a0f211607bf : SUCCESS in 1h 08m 22s\n- nova-live-migration https://zuul.opendev.org/t/openstack/build/aa0e77ac9ada4d249f48588445a2abd2 : SUCCESS in 1h 03m 07s (non-voting)\n- nova-live-migration-ceph https://zuul.opendev.org/t/openstack/build/8045657e4f7e4fc99ea6e0c629db1eb3 : SUCCESS in 45m 09s (non-voting)\n- nova-multi-cell https://zuul.opendev.org/t/openstack/build/92fceb49fcc3489591d2c2d47aa6f097 : SUCCESS in 1h 33m 30s\n- nova-next https://zuul.opendev.org/t/openstack/build/c8c1a3146d794446b71c2d3de166f59f : SUCCESS in 1h 20m 00s\n- nova-tox-validate-backport https://zuul.opendev.org/t/openstack/build/e233a9715b7c4eb181d07553c9556467 : FAILURE in 6m 49s (non-voting)\n- nova-tox-functional-centos8-py36 https://zuul.opendev.org/t/openstack/build/925eb32d26a34aaaa2c7e033ade6a92a : SUCCESS in 19m 43s\n- nova-tox-functional-py38 https://zuul.opendev.org/t/openstack/build/4b8e4e6e3377421fa6f19ae1354aeb86 : SUCCESS in 18m 48s\n- nova-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/f127fad48f1f4b7a843396602d31f5a1 : SUCCESS in 19m 06s (non-voting)\n- nova-grenade-multinode https://zuul.opendev.org/t/openstack/build/418e37e4f3fd49419269f2c0d217b6b8 : SUCCESS in 1h 11m 35s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/dbcf971e699c40638f56461c2510f963 : SUCCESS in 50m 50s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/1eea63c082434673a07156c4fca33df7 : SUCCESS in 46m 12s\n- cyborg-tempest https://zuul.opendev.org/t/openstack/build/4fe8c4dcde534a74a44284598b50196b : SUCCESS in 26m 33s (non-voting)\n- barbican-tempest-plugin-simple-crypto https://zuul.opendev.org/t/openstack/build/dd3de745a432415a8264f32753e66615 : SUCCESS in 49m 42s (non-voting)","accounts_in_message":[],"_revision_number":2},{"id":"218c02e371251fee524fbcf3ab31381b792f4147","author":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"date":"2021-10-29 15:36:35.000000000","message":"Patch Set 2: Code-Review+2\n\n(1 comment)","accounts_in_message":[],"_revision_number":2},{"id":"7b9cf5c1a7cc6d69171154c7c7403c8e92f42448","author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"date":"2021-11-04 08:45:38.000000000","message":"Patch Set 2: Code-Review+2 Workflow+1\n\n(1 comment)","accounts_in_message":[],"_revision_number":2},{"id":"38c64244db2913c9c68781eb636919aa1fedf901","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-11-04 08:46:31.000000000","message":"Patch Set 2: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":2},{"id":"984c8f09428cf6064c74e4301832ec9a74e1fd37","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-11-04 10:34:01.000000000","message":"Patch Set 2: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- tempest-integrated-compute https://zuul.opendev.org/t/openstack/build/32fa65888b064eacab6e53c149c9473e : SUCCESS in 1h 39m 14s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/c55356ad98b04f6f940a4cbd6cd9d662 : SUCCESS in 16m 50s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/14cb37fa3d134ddebd8cbe028b9311aa : SUCCESS in 9m 59s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/5d56140772a447e2a5185b90b50ecc5a : SUCCESS in 13m 45s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/aa892ac84b1d449fae984b9b0fc6f8de : SUCCESS in 13m 54s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/a78d2b0bcefc4c4cb7c59eceaed6dc34 : SUCCESS in 12m 13s\n- nova-live-migration https://zuul.opendev.org/t/openstack/build/7363d0e75cbc4968af2214c19c3c2382 : SUCCESS in 51m 03s (non-voting)\n- nova-live-migration-ceph https://zuul.opendev.org/t/openstack/build/8a0a4cee80c140f79b35905f61741ff2 : POST_FAILURE in 1h 05m 28s (non-voting)\n- nova-tox-functional-centos8-py36 https://zuul.opendev.org/t/openstack/build/16559bbdd08c45fb90f46523c27a0346 : SUCCESS in 21m 04s\n- nova-tox-functional-py38 https://zuul.opendev.org/t/openstack/build/bc80516bbcdb4c34b0e671018b9e557b : SUCCESS in 21m 46s\n- nova-multi-cell https://zuul.opendev.org/t/openstack/build/66813b7a68744cee8b4fcb51fab083ce : SUCCESS in 1h 23m 13s\n- nova-next https://zuul.opendev.org/t/openstack/build/944968f51da84fd38f926829c16299c9 : SUCCESS in 1h 26m 52s\n- nova-tox-validate-backport https://zuul.opendev.org/t/openstack/build/1f183e0e14264d0da61cd30df8a8dc28 : SUCCESS in 6m 42s\n- nova-ceph-multistore https://zuul.opendev.org/t/openstack/build/6b90f143c49c4ae7b76b8fe743159c79 : SUCCESS in 1h 19m 47s\n- nova-grenade-multinode https://zuul.opendev.org/t/openstack/build/faa15909f0aa419c81715c655b8c8de6 : SUCCESS in 1h 18m 30s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/c1c1b41112004369aef52f7900954cc3 : SUCCESS in 49m 49s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/18add0f4c6f64bf7bf078f3f58d86db6 : SUCCESS in 47m 23s","accounts_in_message":[],"_revision_number":2},{"id":"743f58e44dd67511e023fe54766c9a8a35c60dbe","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-11-04 10:34:02.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":2},{"id":"e132e154014a8baf249b8661b197fd336506e045","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-11-04 10:41:27.000000000","message":"Patch Set 2:\n\nBuild succeeded (promote pipeline).\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/6bd9f35edccf46afaaecc6ebc390fa66 : SUCCESS in 1m 33s","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"d4edcd62bae44c01885268a6cf7b7fae92617060","revisions":{"c8b92ddad5787a222b9dc8a78fbb050332170c65":{"kind":"REWORK","_number":1,"created":"2021-09-24 13:50:56.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/11/810911/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/nova","ref":"refs/changes/11/810911/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/nova refs/changes/11/810911/1"}}},"commit":{"parents":[{"commit":"e6c6880465824f1e327a54143f32bb5a5816ff6c","subject":"Reproduce bug 1944759","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/e6c6880465824f1e327a54143f32bb5a5816ff6c"}]}],"author":{"name":"Balazs Gibizer","email":"balazs.gibizer@est.tech","date":"2021-09-24 13:17:28.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"balazs.gibizer@est.tech","date":"2021-09-24 13:47:23.000000000","tz":120},"subject":"Store old_flavor already on source host during resize","message":"Store old_flavor already on source host during resize\n\nDuring resize, on the source host, in resize_instance(), the instance.host\nand .node is updated to point to the destination host. This indicates to\nthe source host\u0027s resource tracker that the allocation of this instance\ndoes not need to be tracked as an instance but as an outbound migration\ninstead. However for the source host\u0027s resource tracker to do that it,\nneeds to use the instance.old_flavor. Unfortunately the\ninstance.old_flavor is only set during finish_resize() on the\ndestination host. (resize_instance cast to the finish_resize). So it is\npossible that a running resize_instance() set the instance.host to point\nto the destination and then before the finish_resize could set the\nold_flavor an update_available_resources periodic runs on the source\nhost. This causes that the allocation of this instance is not tracked as\nan instance as the instance.host point to the destination but it is not\ntracked as a migration either as the instance.old_flavor is not yet set.\nSo the allocation on the source host is simply dropped by the periodic\njob.\n\nWhen such migration is confirmed the confirm_resize() tries to drop\nthe same resource allocation again but fails as the pinned CPUs of the\ninstance already freed.\n\nWhen such migration is reverted instead, then revert succeeds but the\nsource host resource allocation will not contain the resource allocation\nof the instance until the next update_available_resources periodic runs\nand corrects it.\n\nThis does not affect resources tracked exclusively in placement (e.g.\nVCPU, MEMORY_MB, DISK_GB) but it does affect NUMA related resource that\nare still tracked in the resource tracker (e.g. huge pages, pinned\nCPUs).\n\nThis patch moves the instance.old_flavor setting to the source node to\nthe same transaction that sets the instance.host to point to the\ndestination host. Hence solving the race condition.\n\nChange-Id: Ic0d6c59147abe5e094e8f13e0d3523b178daeba9\nCloses-Bug: #1944759\n(cherry picked from commit 1b0c5a11526a649d330f7de281ed33f90e49e255)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/c8b92ddad5787a222b9dc8a78fbb050332170c65"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/c8b92ddad5787a222b9dc8a78fbb050332170c65"}]},"branch":"refs/heads/stable/xena"},"d4edcd62bae44c01885268a6cf7b7fae92617060":{"kind":"REWORK","_number":2,"created":"2021-09-27 12:39:45.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/11/810911/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/nova","ref":"refs/changes/11/810911/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/nova refs/changes/11/810911/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/nova refs/changes/11/810911/2"}}},"commit":{"parents":[{"commit":"e6c6880465824f1e327a54143f32bb5a5816ff6c","subject":"Reproduce bug 1944759","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/e6c6880465824f1e327a54143f32bb5a5816ff6c"}]}],"author":{"name":"Balazs Gibizer","email":"balazs.gibizer@est.tech","date":"2021-09-24 13:17:28.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"balazs.gibizer@est.tech","date":"2021-09-27 12:38:07.000000000","tz":120},"subject":"Store old_flavor already on source host during resize","message":"Store old_flavor already on source host during resize\n\nDuring resize, on the source host, in resize_instance(), the instance.host\nand .node is updated to point to the destination host. This indicates to\nthe source host\u0027s resource tracker that the allocation of this instance\ndoes not need to be tracked as an instance but as an outbound migration\ninstead. However for the source host\u0027s resource tracker to do that it,\nneeds to use the instance.old_flavor. Unfortunately the\ninstance.old_flavor is only set during finish_resize() on the\ndestination host. (resize_instance cast to the finish_resize). So it is\npossible that a running resize_instance() set the instance.host to point\nto the destination and then before the finish_resize could set the\nold_flavor an update_available_resources periodic runs on the source\nhost. This causes that the allocation of this instance is not tracked as\nan instance as the instance.host point to the destination but it is not\ntracked as a migration either as the instance.old_flavor is not yet set.\nSo the allocation on the source host is simply dropped by the periodic\njob.\n\nWhen such migration is confirmed the confirm_resize() tries to drop\nthe same resource allocation again but fails as the pinned CPUs of the\ninstance already freed.\n\nWhen such migration is reverted instead, then revert succeeds but the\nsource host resource allocation will not contain the resource allocation\nof the instance until the next update_available_resources periodic runs\nand corrects it.\n\nThis does not affect resources tracked exclusively in placement (e.g.\nVCPU, MEMORY_MB, DISK_GB) but it does affect NUMA related resource that\nare still tracked in the resource tracker (e.g. huge pages, pinned\nCPUs).\n\nThis patch moves the instance.old_flavor setting to the source node to\nthe same transaction that sets the instance.host to point to the\ndestination host. Hence solving the race condition.\n\nChange-Id: Ic0d6c59147abe5e094e8f13e0d3523b178daeba9\nCloses-Bug: #1944759\n(cherry picked from commit b841e553214be9a732703e2dfed6c97698ef9b71)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/d4edcd62bae44c01885268a6cf7b7fae92617060"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/d4edcd62bae44c01885268a6cf7b7fae92617060"}]},"branch":"refs/heads/stable/xena"}},"requirements":[],"submit_records":[{"status":"CLOSED","labels":[{"label":"Verified","status":"OK","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"}},{"label":"Workflow","status":"OK","applied_by":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"}},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Workflow\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}}]}
