Handle addition of new nodes/instances in ironic flavor migration
The original idea for ironic flavor migration was to handle it in
init_host(), so that the code wouldn't run often. But in a situation
like an upgrade with multiple Nova computes handling ironic nodes, this
may not cover all the nodes, so we are moving it to be run whenever the
cache is refreshed, and new nodes for the compute service that have
instances are detected. We also need to cover the cases where an
existing node has a new instance created on it to ensure that that new
instance's flavor is also migrated.
Closes-Bug: #1707021
Change-Id: If0a7af3a958cf3aba95b89b96df5ff6bf252b110
(cherry picked from commit c3118b91db4b97a689c9a2f25a9554a0ccb29252)
Reviewed: https:/ /review. openstack. org/493227 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=322a99db22f ce1548358514500 f2152fcc32622c
Committed: https:/
Submitter: Jenkins
Branch: stable/pike
commit 322a99db22fce15 48358514500f215 2fcc32622c
Author: EdLeafe <email address hidden>
Date: Wed Jul 26 23:07:38 2017 +0000
Handle addition of new nodes/instances in ironic flavor migration
The original idea for ironic flavor migration was to handle it in
init_host(), so that the code wouldn't run often. But in a situation
like an upgrade with multiple Nova computes handling ironic nodes, this
may not cover all the nodes, so we are moving it to be run whenever the
cache is refreshed, and new nodes for the compute service that have
instances are detected. We also need to cover the cases where an
existing node has a new instance created on it to ensure that that new
instance's flavor is also migrated.
Closes-Bug: #1707021
Change-Id: If0a7af3a958cf3 aba95b89b96df5f f6bf252b110 689c9a2f25a9554 a0ccb29252)
(cherry picked from commit c3118b91db4b97a