When doing resize action, CONF.allow_resize_to_same_host should check only once

Bug #1459468 reported by Zhenyu Zheng
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Zhenyu Zheng

Bug Description

In the current implementation, when doing instance resize action. The CONF.allow_resize_to_same_host is first checked in
compute/api which is on controller node. If CONF.allow_resize_to_same_host = True, nothing will added to
filter_properties['ignore_hosts'], if it is set to False, the source host will be added to filter_properties['ignore_hosts'] and it
will be ignored when performing select_destinations.

The value of CONF.allow_resize_to_same_host has been checked again in compute/manager.py which is on the destination
host which has already been selected by scheduler.

This will lead to a problem, if CONF.allow_resize_to_same_host parameter is set to True in controller node but set to False
or didn't set in compute node. When scheduler decided that the original compute node is the best one for resize but when
the compute node implementing the resize action, it will throw an exception.

The value of CONF.allow_resize_to_same_host should only check once in controller node (compute/api.py) and let scheduler
judge which host is best for rebuild, the compute node should only perform the action when it has been selected.

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
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/186236

Changed in nova:
status: New → In Progress
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote : Re: When doing resize action, CONF.allow_resize_on_same_host should check only once

It's not that something is broken right now, but doing this check only once would probably be less error prone (as you pointed out in the example when settings are different on the controller node and the compute node).

Changed in nova:
importance: Undecided → Wishlist
status: In Progress → Triaged
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/186236
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0b4993488ab945f88e778dca7b01df8810951cd1
Submitter: Jenkins
Branch: master

commit 0b4993488ab945f88e778dca7b01df8810951cd1
Author: Kevin_Zheng <email address hidden>
Date: Thu May 28 09:54:04 2015 +0800

    CONF.allow_resize_to_same_host should check only once in controller

    When doing instance resize action, the configuration parameter
    CONF.allow_resize_to_same_host has been checked both in controller
    node (compute/api.py) and compute node (compute/manager.py).

    The check in compute node is unecessary because after the check
    in controller node, the filter_properties['ignore_hosts'] is
    properly setted for scheduling, and when the host was selected
    by the scheduler, it should only perform the action and do no more
    checks.

    UpgradeImpact: CONF.allow_resize_to_same_host will no longer checked
    in compute/manager.py

    Change-Id: I21104eb182ebfa5ddfe3ea0a8663d77df5cf0eab
    Closes-Bug:1459468

Changed in nova:
status: In Progress → Fix Committed
melanie witt (melwitt)
summary: - When doing resize action, CONF.allow_resize_on_same_host should check
+ When doing resize action, CONF.allow_resize_to_same_host should check
only once
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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