During the patch strategy creation the migrate-instances step
only happens for hosts who have instances running at that moment.
As a consequence, if an instance is migrated, during patching
operation, to a host that didn't have any instances running
previously, the patch operation will fail as it will try to lock
the host directly, without migrating its instances previously.
This issue can happen either during patch application or removal.
This commit changes the patching build strategy adding the
migrate-instances-from-host step that will be applied to all
worker hosts unconditionally (given they are OpenStack compute
nodes), and because the previous step (migrate-instances) was built
for a list of instances, some implementations had to take place to
allow building it for a list of hosts.
Test Plan
PASS: serial patch application runs successfully outside
Openstack context;
PASS: parallel patch application runs successfully outside
Openstack context;
PASS: serial patch application runs successfully with a host
not having instances before patch operation begins and
having an instance migrated to it during patch application;
PASS: parallel patch application runs successfully with a host
not having instances before patch operation begins and
having an instance migrated to it during patch application;
Reviewed: https:/ /review. opendev. org/c/starlingx /nfv/+/ 825879 /opendev. org/starlingx/ nfv/commit/ 1c4e0484659f5b9 8c09485e135fd02 386eee2dac
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 1c4e0484659f5b9 8c09485e135fd02 386eee2dac
Author: Heitor Matsui <email address hidden>
Date: Fri Jan 21 17:14:08 2022 -0300
Add migrate steps for hosts without instances
During the patch strategy creation the migrate-instances step
only happens for hosts who have instances running at that moment.
As a consequence, if an instance is migrated, during patching
operation, to a host that didn't have any instances running
previously, the patch operation will fail as it will try to lock
the host directly, without migrating its instances previously.
This issue can happen either during patch application or removal.
This commit changes the patching build strategy adding the instances- from-host step that will be applied to all
migrate-
worker hosts unconditionally (given they are OpenStack compute
nodes), and because the previous step (migrate-instances) was built
for a list of instances, some implementations had to take place to
allow building it for a list of hosts.
Test Plan
PASS: serial patch application runs successfully outside
Openstack context;
PASS: parallel patch application runs successfully outside
Openstack context;
PASS: serial patch application runs successfully with a host
not having instances before patch operation begins and
having an instance migrated to it during patch application;
PASS: parallel patch application runs successfully with a host
not having instances before patch operation begins and
having an instance migrated to it during patch application;
Closes-bug: 1960833 5bc84c78864b118 debc265ceb4
Change-Id: I99675ea0b5d0c7
Signed-off-by: Heitor Matsui <email address hidden>
Co-authored-by: Rafael Falcão <email address hidden>