← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1364851] Re: CONF.allow_migrate_to_same_host doesn't work

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => liberty-1

-- 
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/1364851

Title:
  CONF.allow_migrate_to_same_host  doesn't work

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  there are such codes  in the “resize” function  from
  nova/compute/api.py

   if not CONF.allow_resize_to_same_host:
              filter_properties['ignore_hosts'].append(instance['host'])
   # Here when flavor_id is None, the process is considered as migrate.

  if (not flavor_id and not CONF.allow_migrate_to_same_host):
            filter_properties['ignore_hosts'].append(instance['host'])

  When running the "migrate" operation and the CONF.allow_resize_to_same_host is set as "false",the CONF.allow_migrate_to_same_host will not work
  At the same time, I find the CONF.allow_migrate_to_same_host isn't  checked in the _prep_resize function from nova/compute/manager.py.
  the code part is as follows:

  same_host = instance['host'] == self.host
      if same_host and not CONF.allow_resize_to_same_host:
           self._set_instance_error_state(context, instance)
           msg = _('destination same as source!')
           raise exception.MigrationError(msg)

  So, I think that using two configuration items here can occur conflict, maybe we can
  take out a configuration item!

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


References