libvirt: Do not reraise DiskNotFound exceptions during resize
When an instance has VERIFY_RESIZE status, the instance disk on the
source compute host has moved to <instance_path>/<instance_uuid>_resize
folder, which leads to disk not found errors if the update available
resource periodic task on the source compute runs before resize is
actually confirmed.
Icec2769bf42455853cbe686fb30fda73df791b25 almost fixed this issue but it
will only set reraise to False when task_state is not None, that isn't
the case when an instance is resized but resize is not yet confirmed.
This patch adds a condition based on vm_state to ensure we don't
reraise DiskNotFound exceptions while resize is not confirmed.
Closes-Bug: 1774249
Co-Authored-By: Vladyslav Drok <email address hidden>
Change-Id: Id687e11e235fd6c2f99bb647184310dfdce9a08d
(cherry picked from commit 966192704c20d1b4e9faf384c8dafac8ea6e06ea)
(cherry picked from commit f1280ab849d20819791f7c4030f570a917d3e91d)
(cherry picked from commit fd5c45473823105d8572d7940980163c6f09169c)
(cherry picked from commit d3bdeb26155c2d3b53850b790d3800a2dd78cada)
Reviewed: https:/ /review. opendev. org/742181 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=9202b2e6cfe b5dd67b54d7eaa6 187725a34aeae6
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 9202b2e6cfeb5dd 67b54d7eaa61877 25a34aeae6
Author: jichenjc <email address hidden>
Date: Mon May 21 02:03:51 2018 +0800
libvirt: Do not reraise DiskNotFound exceptions during resize
When an instance has VERIFY_RESIZE status, the instance disk on the path>/< instance_ uuid>_resize
source compute host has moved to <instance_
folder, which leads to disk not found errors if the update available
resource periodic task on the source compute runs before resize is
actually confirmed.
Icec2769bf4 2455853cbe686fb 30fda73df791b25 almost fixed this issue but it
will only set reraise to False when task_state is not None, that isn't
the case when an instance is resized but resize is not yet confirmed.
This patch adds a condition based on vm_state to ensure we don't
reraise DiskNotFound exceptions while resize is not confirmed.
Closes-Bug: 1774249 c2f99bb64718431 0dfdce9a08d 4e9faf384c8dafa c8ea6e06ea) 9791f7c4030f570 a917d3e91d) d8572d794098016 3c6f09169c) b53850b790d3800 a2dd78cada)
Co-Authored-By: Vladyslav Drok <email address hidden>
Change-Id: Id687e11e235fd6
(cherry picked from commit 966192704c20d1b
(cherry picked from commit f1280ab849d2081
(cherry picked from commit fd5c45473823105
(cherry picked from commit d3bdeb26155c2d3