Comment 0 for bug 1794252

Revision history for this message
Tao Li (eric-litao) wrote :

Description
===========
We set CONF.allow_resize_to_same_host to True in nova.conf. Then I migrated an instance, unfortunately nova scheduler selects the host which the instance locates in. The pre_resize will raised the UnableToMigrateToSelf exception because of the restriction of libvirt driver. Then nova scheduler will select another host to migrate, after migrating successfully, the retried host will be saved in database. From then on, the instance cann't migrate to the host any more, because the nova scheduler will check the retried hosts and bypassed them.

Steps to reproduce
==================
Two compute nodes and set CONF.allow_resize_to_same_host to True in nova.conf on controller node
* Create an instance
* Migrate the instance and ensure the first selected host is the host which the instance in.
* After migrate successfully, then migrate again.

Expected result
===============
The instance will migrate to the first host.

Actual result
=============
The instance migrated failed.

Environment
===========
1. Openstack Pike version.

[root@cdpm01 ~]# nova --version
9.1.1

2. libvirt driver.

Logs & Configs
==============