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.
Description 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 UnableToMigrate ToSelf 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.
===========
We set CONF.allow_
Steps to reproduce resize_ to_same_ host to True in nova.conf on controller node
==================
Two compute nodes and set CONF.allow_
* 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
==============