Instance stuck in 'migrating' status due to invalid host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Medium
|
Sivasathurappan Radhakrishnan |
Bug Description
Tried to live migrate instance to invalid destination host. Got an error message saying host was not available <class 'nova.exception
Steps to reproduce:
1) Create an instance test_1
2) live migrate instance using 'nova live-migration test_1 <invalid destination host name>'
3) Check status of the instance using 'nova show test_1' or 'nova list'.
Expected Result:
Status of the instance should have been in Active status as live migration failed with invalid host name
Actual Result:
Instance is stuck in 'migrating' status forever.
Environment:
Multinode devstack environment with 2 compute nodes or it can be done in single node environment as the validation of host name happens before live migration.
Multinode environment is not really required to reproduce above scenario
1)Current master
2)Networking-
3)Hypervisor Libvirt-KVM
tags: | added: live-migration |
Changed in nova: | |
assignee: | nobody → Sivasathurappan Radhakrishnan (siva-radhakrishnan) |
Matt Riedemann (mriedem) wrote : | #2 |
Marking as incomplete as this requires some more debug information.
description: | updated |
@mriedem: I think my bug title is confusing. In the above scenario migration doesn't happen at all as it does not have valid host in the environment but instance task state is stuck in migrating. But for the end user it might be little confusing as this particular instance would not have migration id set to use 'nova live-migration-
summary: |
- Not able to abort live migration + Instance stuck in 'migrating' status due to invalid host |
description: | updated |
Fix proposed to branch: master
Review: https:/
Changed in nova: | |
status: | Incomplete → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
OpenStack Infra (hudson-openstack) wrote : | #5 |
Fix proposed to branch: master
Review: https:/
Rajesh Tailor (ratailor) wrote : | #6 |
Hi Siva,
Are you still working on it ?
If you are not planning to work on it, would you please assign it to me.
Hi Rajesh!
I am not working on it anymore. My last patch requires unit test case to be considered for review. Feel free to work on it if you would like to.
Changed in nova: | |
assignee: | Sivasathurappan Radhakrishnan (siva-radhakrishnan) → nobody |
Changed in nova: | |
assignee: | nobody → Rajesh Tailor (ratailor) |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit fb68fd12e2fd6e9
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Mon Mar 20 03:13:13 2017 +0000
Return 400 when compute host is not found
Previously user was getting a 500 error code for ComputeHostNotFound
if they are using latest microversion that does live migration in
async. This patches changes return response to 400 as 500 internal
server error should not be returned to the user for failures due to
user error that can be fixed by changing to request on client side.
Change-Id: I7a9de211ecfaa7
closes-
Changed in nova: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/queens
Review: https:/
Fix proposed to branch: stable/pike
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit cc3f3adfb8dada8
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Mon Mar 20 03:13:13 2017 +0000
Return 400 when compute host is not found
Previously user was getting a 500 error code for ComputeHostNotFound
if they are using latest microversion that does live migration in
async. This patches changes return response to 400 as 500 internal
server error should not be returned to the user for failures due to
user error that can be fixed by changing to request on client side.
Change-Id: I7a9de211ecfaa7
closes-
(cherry picked from commit fb68fd12e2fd6e9
tags: | added: in-stable-queens |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 8ebdd91d463fd9f
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Mon Mar 20 03:13:13 2017 +0000
Return 400 when compute host is not found
Previously user was getting a 500 error code for ComputeHostNotFound
if they are using latest microversion that does live migration in
async. This patches changes return response to 400 as 500 internal
server error should not be returned to the user for failures due to
user error that can be fixed by changing to request on client side.
Change-Id: I7a9de211ecfaa7
closes-
(cherry picked from commit fb68fd12e2fd6e9
tags: | added: in-stable-pike |
This issue was fixed in the openstack/nova 17.0.2 release.
This issue was fixed in the openstack/nova 16.1.1 release.
This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.
Changed in nova: | |
assignee: | Rajesh Tailor (ratailor) → Sivasathurappan Radhakrishnan (siva-radhakrishnan) |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit c7aed3d13990991
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Wed Nov 23 00:17:47 2016 +0000
Fix host validity check for live-migration
When live migrating instance to invalid host, live migration fails
with host not found and sets instance task state to migrating.
This change handles host validity in API layer before changing instance
task_state to 'MIGRATING' and raise proper exception on invalid host.
Change-Id: I7c5e80298b9adf
Related-Bug: #1643623
Closes-Bug: #1785031
Related fix proposed to branch: stable/queens
Review: https:/
Related fix proposed to branch: stable/pike
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 0a60496ddbcd348
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Wed Nov 23 00:17:47 2016 +0000
Fix host validity check for live-migration
When live migrating instance to invalid host, live migration fails
with host not found and sets instance task state to migrating.
This change handles host validity in API layer before changing instance
task_state to 'MIGRATING' and raise proper exception on invalid host.
Change-Id: I7c5e80298b9adf
Related-Bug: #1643623
Closes-Bug: #1785031
(cherry picked from commit c7aed3d13990991
Related fix proposed to branch: stable/ocata
Review: https:/
Fix proposed to branch: stable/ocata
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit f5b8a0a09baa352
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Mon Mar 20 03:13:13 2017 +0000
Return 400 when compute host is not found
Previously user was getting a 500 error code for ComputeHostNotFound
if they are using latest microversion that does live migration in
async. This patches changes return response to 400 as 500 internal
server error should not be returned to the user for failures due to
user error that can be fixed by changing to request on client side.
Change-Id: I7a9de211ecfaa7
closes-
(cherry picked from commit fb68fd12e2fd6e9
tags: | added: in-stable-ocata |
This issue was fixed in the openstack/nova 15.1.4 release.
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 064daf9aeb39a7f
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Wed Nov 23 00:17:47 2016 +0000
Fix host validity check for live-migration
When live migrating instance to invalid host, live migration fails
with host not found and sets instance task state to migrating.
This change handles host validity in API layer before changing instance
task_state to 'MIGRATING' and raise proper exception on invalid host.
Change-Id: I7c5e80298b9adf
Related-Bug: #1643623
Closes-Bug: #1785031
(cherry picked from commit c7aed3d13990991
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit fbc91183ffa32e8
Author: Sivasathurappan Radhakrishnan <email address hidden>
Date: Wed Nov 23 00:17:47 2016 +0000
Fix host validity check for live-migration
When live migrating instance to invalid host, live migration fails
with host not found and sets instance task state to migrating.
This change handles host validity in API layer before changing instance
task_state to 'MIGRATING' and raise proper exception on invalid host.
Change-Id: I7c5e80298b9adf
Related-Bug: #1643623
Closes-Bug: #1785031
(cherry picked from commit c7aed3d13990991
(cherry picked from commit 064daf9aeb39a7f
What exact command did you use to run the abort command? And do you have a new enough python-novaclient to support that microversion?
That was added in microversion 2.24:
http:// docs.openstack. org/developer/ nova/api_ microversion_ history. html#id22
Looks like you need at least novaclient 3.3.0 for that:
https:/ /github. com/openstack/ python- novaclient/ commit/ 77e50cc91b328b1 f7681cfc6f31bc4 1e40ab214e
Also, do you see this error in the nova-compute logs when the abort fails?
https:/ /review. openstack. org/#/c/ 277971/ 19/nova/ virt/libvirt/ driver. py@5831