-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
None
Description of problem:
Customer faced a problem while working with RHOSP 16.2, but it looks like same behavior is going to affect newer releases as well. He restarted nova-compute service while some live migrations were in queued state. As a result, VM's state was changed from "Migrating" to "Active", while live migration still stayed in queued state. When customer tried to drop queued live migration using "nova live-migration-abort" command, his request failed:
ERROR (Conflict): Instance XXXX is in an invalid state for 'abort live migration' (HTTP 409) (Request-ID: req-YYYY)
It looks like the problem is coming from _reset_live_migration() method https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1040-L1057 : it is only looking for "running" live migrations, while queued migrations are skipped. As a result,
"nova.exception.MigrationNotFoundByStatus: Migration not found for instance XXX with status running." error is returned and nova-compute proceeds with VM's state reset and causes this situation.
Version-Release number of selected component (if applicable):
RHOSP 16.2, but it looks like this problem wasn't addressed in Nova so far
How reproducible: please take a look at description
Actual results: VM's task_state is reset, while queued live migration is not dropped
Expected results: VM's task state is reset, queued live migration is dropped as well
- external trackers
- links to