Comment 0 for bug 1949808

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

OpenStack supports cancelling "queued" live-migration by "nova live-migration-abort", but state of canceled instance remains "MIGRATING".

     # nova list
     +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+
     | ID | Name | Status | Task State | Power State | Networks |
     +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+
     | 18da36b8-9d90-4f6b-91f8-92997f8b7849 | live_migration_abort_queued_iscsi_vm1 | ACTIVE | - | Running | net_kobe4=192.168.200.2 |
     ...
     | 712ef470-95d0-438b-9aac-8a7259f3c872 | live_migration_abort_queued_iscsi_vm5 | ACTIVE | - | Running | net_kobe4=192.168.200.5 |
     +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+
     # nova live-migration live_migration_abort_queued_iscsi_vm1 osp14-cn-1.novalocal
     ...
     # nova live-migration live_migration_abort_queued_iscsi_vm5 osp14-cn-1.novalocal
     # nova migration-list --instance-uuid 712ef470-95d0-438b-9aac-8a7259f3c872 | grep -w 712ef470-95d0-438b-9aac-8a7259f3c872 | sort -k 2 -n | tail -n 1 | awk '{print $16}'
     queued
     # mig_id=$(nova migration-list --instance-uuid 712ef470-95d0-438b-9aac-8a7259f3c872 | grep -w 712ef470-95d0-438b-9aac-8a7259f3c872 | sort -k 2 -n | tail -n 1 | awk '{print $2}')
     # nova --os-compute-api-version 2.65 live-migration-abort 712ef470-95d0-438b-9aac-8a7259f3c872 $mig_id
     # nova migration-list
     +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+
     | Id | UUID | Source Node | Dest Node | Source Compute | Dest Compute | Dest Host | Status | Instance UUID | Old Flavor | New Flavor | Created At | Updated At | Type |
     +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+
     ...
     | 33 | f83cbcff-2a42-4259-a484-8ae621635a2a | osp14-cn-2.novalocal | osp14-cn-1.novalocal | osp14-cn-2.novalocal | osp14-cn-1.novalocal | - | cancelled | 712ef470-95d0-438b-9aac-8a7259f3c872 | 1 | 1 | 2019-07-05T07:06:45.000000 | 2019-07-05T07:06:53.000000 | live-migration |
     +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+
     # nova list
     +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+
     | ID | Name | Status | Task State | Power State | Networks |
     +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+
     | 18da36b8-9d90-4f6b-91f8-92997f8b7849 | live_migration_abort_queued_iscsi_vm1 | ACTIVE | - | Running | net_kobe4=192.168.200.2 |
     ...
     | 712ef470-95d0-438b-9aac-8a7259f3c872 | live_migration_abort_queued_iscsi_vm5 | MIGRATING | migrating | Running | net_kobe4=192.168.200.5 |
     +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+