[openstack-dev] [nova] Bug: resize on same node with allow_resize_to_same_host=True

Jay Pipes jaypipes at gmail.com
Thu Aug 14 04:08:56 UTC 2014


On 08/13/2014 11:50 PM, Manickam, Kanagaraj wrote:
> Hi,
>
> Nova provides a flag ‘allow_resize_to_same_host’ to resize the given
> instance on the same hypervisor where it is currently residing. When
> this flag is set to True, the nova.compute.api: resize() method does not
> set the scheduler hint with ‘force_nodes’, where as its set the
> ‘ignored_hosts’ properly when this flag is set to False.
>
> So I have filed following defect to fix the logic when this flag is set
> to True.
>
> https://bugs.launchpad.net/nova/+bug/1356309
>
> I felt this defect is import to fix, when cloud admin wants the resize
> to be happen on the same hypervisor (compute node). So could you please
> let me know whether I can fix this for Juno-3? Thanks.

Hi Kanagaraj,

AFAICT, there is no bug here.

         if not CONF.allow_resize_to_same_host:
             filter_properties['ignore_hosts'].append(instance['host'])
         else:
             filter_properties['force_nodes'] = [instance['node']]

When allow_resize_to_same_host is True, then 
filter_properties['force_node'] will be set to a list with only one node 
(the compute node that the instance is currently on), and therefore the 
resize will happen on the original host.

Best,
-jay




More information about the OpenStack-dev mailing list