nfv/nfv/nfv-vim
Heitor Matsui 1c4e048465 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
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;

Closes-bug: 1960833
Change-Id: I99675ea0b5d0c75bc84c78864b118debc265ceb4
Signed-off-by: Heitor Matsui <HeitorVieira.Matsui@windriver.com>
Co-authored-by: Rafael Falcão <Rafael.VieiraFalcao@windriver.com>
2022-02-25 17:48:42 -03:00
..
nfv_vim Add migrate steps for hosts without instances 2022-02-25 17:48:42 -03:00
scripts Set up /var/run/nfv-vim as vim's default temp files location 2020-09-25 11:29:02 -04:00
LICENSE small cleanup required by OBS badness check - exec rights on non executable not allowed 2019-09-17 08:54:22 +02:00
setup.py Clean up imports based on flake8 2018-09-20 16:43:28 -05:00