During a resize, the RequestSpec.flavor is updated
to the new flavor. If the resize failed on one host
and was rescheduled, the RequestSpec.retry is updated
for that failed host and mistakenly persisted, which
can affect later move operations, like if an admin
targets one of those previously failed hosts for a
live migration or evacuate operation.
This change fixes the problem by not ever persisting
the RequestSpec.retry field to the database, since
retries are per-request/operation and not something
that needs to be persisted.
Alternative to this, we could reset the retry field
in the RequestSpec.reset_forced_destinations method
but that would be slightly overloading the meaning
of that method, and the approach taken in this patch
is arguably cleaner since retries shouldn't ever be
persisted. It should be noted, however, that one
advantage to resetting the 'retry' field in the
RequestSpec.reset_forced_destinations method would
be to avoid this issue for any existing DB entries
that have this problem.
The related functional regression test is updated
to show the bug is now fixed.
NOTE(mriedem): This backport also includes change
I61f745667f4c003d7e3ca6f2f9a99194930ac892 squashed
into it in order to not re-introduce that bug. On
Ocata it must be adjusted slightly to pass a string
rather than list to _wait_for_migration_status
since I752617066bb2167b49239ab9d17b0c89754a3e12 is
not in Ocata.
NOTE(mriedem): This patch has to pull some changes
from two other patches to make live migration work
in the fake virt driver: ce893e37f and b97c433f7.
Change-Id: Iadbf8ec935565a6d4ccf6f36ef630ab6bf1bea5d
Closes-Bug: #1718512
(cherry picked from commit 6647f11dc1aba89f9b0e2703f236a43f31d88079)
(cherry picked from commit 757dbd17cf37aecea005dfdc954bf50bbddedd95)
(cherry picked from commit 878e99d1f82fbeec840b2dbab8e40c27127d88ba)
Reviewed: https:/ /review. openstack. org/560167 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=c61ec9d98b7 ca22fb6b68a80a9 b382251a537a83
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit c61ec9d98b7ca22 fb6b68a80a9b382 251a537a83
Author: Matt Riedemann <email address hidden>
Date: Fri Apr 6 20:28:53 2018 -0400
Don't persist RequestSpec.retry
During a resize, the RequestSpec.flavor is updated
to the new flavor. If the resize failed on one host
and was rescheduled, the RequestSpec.retry is updated
for that failed host and mistakenly persisted, which
can affect later move operations, like if an admin
targets one of those previously failed hosts for a
live migration or evacuate operation.
This change fixes the problem by not ever persisting operation and not something
the RequestSpec.retry field to the database, since
retries are per-request/
that needs to be persisted.
Alternative to this, we could reset the retry field reset_forced_ destinations method .reset_ forced_ destinations method would
in the RequestSpec.
but that would be slightly overloading the meaning
of that method, and the approach taken in this patch
is arguably cleaner since retries shouldn't ever be
persisted. It should be noted, however, that one
advantage to resetting the 'retry' field in the
RequestSpec
be to avoid this issue for any existing DB entries
that have this problem.
The related functional regression test is updated
to show the bug is now fixed.
NOTE(mriedem): This backport also includes change 4c003d7e3ca6f2f 9a99194930ac892 squashed migration_ status 7b49239ab9d17b0 c89754a3e12 is
I61f745667f
into it in order to not re-introduce that bug. On
Ocata it must be adjusted slightly to pass a string
rather than list to _wait_for_
since I752617066bb216
not in Ocata.
NOTE(mriedem): This patch has to pull some changes
from two other patches to make live migration work
in the fake virt driver: ce893e37f and b97c433f7.
Change-Id: Iadbf8ec935565a 6d4ccf6f36ef630 ab6bf1bea5d f9b0e2703f236a4 3f31d88079) ea005dfdc954bf5 0bbddedd95) c840b2dbab8e40c 27127d88ba)
Closes-Bug: #1718512
(cherry picked from commit 6647f11dc1aba89
(cherry picked from commit 757dbd17cf37aec
(cherry picked from commit 878e99d1f82fbee