Incorrect param size check in cluster_scale_in/out service routines

Bug #1539478 reported by Yanyan Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Yanyan Hu

Bug Description

In cluster_scale_in/out service routines, check_size_params method should be invoked with strict set to False if there is scaling_policy attached and best_effort scaling is required.

http://git.openstack.org/cgit/openstack/senlin/tree/senlin/engine/service.py#n905
http://git.openstack.org/cgit/openstack/senlin/tree/senlin/engine/service.py#n954

Currently, scaling request could be rejected incorrectly in service layer even it is legal for scaling policy attached.

Yanyan Hu (yanyanhu)
Changed in senlin:
assignee: nobody → Yanyan Hu (yanyanhu)
milestone: none → mitaka-3
Revision history for this message
Yanyan Hu (yanyanhu) wrote :

Maybe we don't do size parameter check in cluster_scale_in/out routines. Although rejecting illegal cluster_scale_in/out request in service layer is good, scaling_policy should take the responsibility of size parameter checking if there it is attached.

Even no ScalingPolicy is attached, do_scale_in/out routines in cluster_action module will check the size parameter and reject illegal requests:

http://git.openstack.org/cgit/openstack/senlin/tree/senlin/engine/actions/cluster_action.py#n714

Revision history for this message
Yanyan Hu (yanyanhu) wrote :

Another solution is set 'strict' to False for check_size_params method to avoid strict check.

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

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

Changed in senlin:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/273987
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=36da5f481ee704167aa0f622d1034d3981cb3466
Submitter: Jenkins
Branch: master

commit 36da5f481ee704167aa0f622d1034d3981cb3466
Author: yanyanhu <email address hidden>
Date: Fri Jan 29 04:56:51 2016 -0500

    Set strict param to False by default for check_size_params

    This patch revises check_size_param method to set strict to False
    by default. For cases need strict size parameters check, strict
    should be set to True explicitly.

    Change-Id: Ib651bdf84ea01506bc11869d353b9cac8f23d4ab
    Closes-Bug: #1539478

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/senlin 1.0.0.0b3

This issue was fixed in the openstack/senlin 1.0.0.0b3 development milestone.

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.