On recreate where the instance is being evacuated to a different node,
we should be rebuilding the claim so the migration context is available
when rebuilding the instance.
1. I5aaa869f2e6155964827e659d18e2bcaad9d866b changed the LOG.info
method to not pass a context in Ocata.
2. I57233259065d887b38a79850a05177fcbbdfb8c3 changed some tests in
test_compute_manager in Ocata, but is irrelevant here.
3. The bigger change isn't a merge conflict but in Ocata the compute
manager code was all refactored so that the _get_resource_tracker
method no longer needed a nodename passed to it. In Newton, however,
if we're force evacuating (scenario 3) then we don't have a scheduled_node
passed to the rebuild_instance method and in this case we need to
lookup the nodename for the host we're currently on. To resolve this,
some existing code that handles this case is moved up where it is
needed to get the resource tracker so we can get the rebuild_claim method.
We let any ComputeHostNotFound exception raise up in this case rather than
log it because without the compute node we can't make the rebuild claim and
we need to fail. Tests are adjusted accordingly for this.
4. The fake instances in Mitaka are still created manually, so node
field needs to be added explicitly.
Change-Id: I53bdcf8edf640e97b4632ef7a093f14a6e3845e4
Closes-Bug: 1658070
(cherry picked from commit a2b0824aca5cb4a2ae579f625327c51ed0414d35)
(cherry picked from commit ea90c60b07534a46541c55432389f2d50b5b7d0a)
(cherry picked from commit 0f2d87416eff1e96c0fbf0f4b08bf6b6b22246d5)
Reviewed: https:/ /review. fuel-infra. org/35612
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka
Commit: 06bb2fcb21b1531 b7f434f7502b50a 9751ef93aa
Author: Guang Yee <email address hidden>
Date: Thu Jun 15 11:13:34 2017
make sure to rebuild claim on recreate
On recreate where the instance is being evacuated to a different node,
we should be rebuilding the claim so the migration context is available
when rebuilding the instance.
Conflicts: compute/ manager. py tests/unit/ compute/ test_compute. py tests/unit/ compute/ test_compute_ mgr.py
nova/
nova/
nova/
NOTE(mriedem): There are a few issues here:
1. I5aaa869f2e6155 964827e659d18e2 bcaad9d866b changed the LOG.info 7b38a79850a0517 7fcbbdfb8c3 changed some tests in compute_ manager in Ocata, but is irrelevant here. tracker
method to not pass a context in Ocata.
2. I57233259065d88
test_
3. The bigger change isn't a merge conflict but in Ocata the compute
manager code was all refactored so that the _get_resource_
method no longer needed a nodename passed to it. In Newton, however,
if we're force evacuating (scenario 3) then we don't have a scheduled_node
passed to the rebuild_instance method and in this case we need to
lookup the nodename for the host we're currently on. To resolve this,
some existing code that handles this case is moved up where it is
needed to get the resource tracker so we can get the rebuild_claim method.
We let any ComputeHostNotFound exception raise up in this case rather than
log it because without the compute node we can't make the rebuild claim and
we need to fail. Tests are adjusted accordingly for this.
4. The fake instances in Mitaka are still created manually, so node
field needs to be added explicitly.
Change-Id: I53bdcf8edf640e 97b4632ef7a093f 14a6e3845e4 2ae579f625327c5 1ed0414d35) 6541c55432389f2 d50b5b7d0a) 6c0fbf0f4b08bf6 b6b22246d5)
Closes-Bug: 1658070
(cherry picked from commit a2b0824aca5cb4a
(cherry picked from commit ea90c60b07534a4
(cherry picked from commit 0f2d87416eff1e9