allow_resize_to_same_host is not handled properly in the resize() api

Bug #1356309 reported by Kanagaraj Manickam
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Kanagaraj Manickam

Bug Description

allow_resize_to_same_host is used to direct the 'resize' action to the same node where the instance was running now. But the nova.compute.api. resize() method is not taking care of this condition as of now when this flag is set to TRUE.

Following code set the force_nodes to make sure that, the instance is resized to the same node again.

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

Tags: compute
Changed in nova:
assignee: nobody → Kanagaraj Manickam (kanagaraj-manickam)
Tracy Jones (tjones-i)
tags: added: compute
description: updated
Revision history for this message
Jay Pipes (jaypipes) wrote :

Not sure this is a bug. AFAICT, the behaviour of the logic is correct...

Revision history for this message
Kanagaraj Manickam (kanagaraj-manickam) wrote :

When there are more than one host, and when this flag is set, request has to be routed to the same host where the VM is created before resize request. But now that is not happening.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/117116

Changed in nova:
status: New → In Progress
Revision history for this message
melanie witt (melwitt) wrote :

I also see this as not a bug -- and it has been raised before [0]. The option allow_resize_to_same_host means "consider the same host as an option for resize" not "force the same host for resize."

I interpret the meaning from the code [1]:

    cfg.BoolOpt('allow_resize_to_same_host',
                default=False,
                help='Allow destination machine to match source for resize. '
                     'Useful when testing in single-host environments.'),

[0] https://bugs.launchpad.net/nova/+bug/1323578
[1] https://github.com/openstack/nova/blob/96ddc3e/nova/compute/api.py#L77

Revision history for this message
Kanagaraj Manickam (kanagaraj-manickam) wrote :

I agree that description provided for the allow_resize_to_same_host says for single host environment. But this flag is very much useful in multi host envrionment as well when cloud admin wants the resize to happen on the same host and is valid expectation as well. Nova is perfectly working in multi host environment with the fix provided. so could you reconsider on enabling it. Thank you.

Revision history for this message
melanie witt (melwitt) wrote :

@Kanagaraj The thing is that the option says "allow" same host, not "force" same host. So by default, the same host is not included in the pool of possible destinations. When allow_resize_to_same_host is True, the same host *is* included in the pool of possible destinations. It doesn't mean the same host will be the only choice.

To me it sounds like you desire a new feature, maybe a new option like "force_resize_to_same_host."

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/117116
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.