Public bug reported:

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. I check the latest code, there is still this problem.

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
==============

** Affects: nova
     Importance: Undecided
     Assignee: Tao Li (eric-litao)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Tao Li (eric-litao)

** Description changed:

  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.
- 
+ 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. I check the latest code, there is still problem.
  
  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
  ==============

** Description changed:

  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. I check the latest code, there is still problem.
+ 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. I check the latest code, there is still this problem.
  
  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
  ==============

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1794252

Title:
  we shouldn't persist the retried failed host in db when migrating an
  instance

Status in OpenStack Compute (nova):
  New

Bug description:
  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. I check the latest code, there is still this problem.

  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
  ==============

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1794252/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to