SCALE_IN Action Bug - Inconsistent Node Deletion Behavior

Bug #2048099 reported by Nguyen Ngoc Hieu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Nguyen Ngoc Hieu

Bug Description

Behavior: With the action SCALE_IN, it consistently removes only one node from the load balancer (LB), even when the count of inputs is greater than 1 (in cases where there is no deletion data).

Reproduce this bug:
- Create a cluster with more than 1 node.
- Attach lb_policy.
- Perform SCALE_IN with a count number greater than 1.
=> Only one node is deleted and removed from the LB.

Root cause: pre_op -> _get_delete_candidates
https://github.com/openstack/senlin/blob/541498724bc0c1cf730d9f31c2ca7cf218d07bc3/senlin/policies/lb_policy.py#L528
https://github.com/openstack/senlin/blob/541498724bc0c1cf730d9f31c2ca7cf218d07bc3/senlin/policies/lb_policy.py#L544-L550

I've previously reported this [https://bugs.launchpad.net/senlin/+bug/1966847], but it seems the description is not clear.

Changed in senlin:
assignee: nobody → Nguyen Ngoc Hieu (zitechdev201)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/senlin/+/904800

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.opendev.org/c/openstack/senlin/+/904800
Committed: https://opendev.org/openstack/senlin/commit/2b6693576355b673dcc4e3e53f1291204412c512
Submitter: "Zuul (22348)"
Branch: master

commit 2b6693576355b673dcc4e3e53f1291204412c512
Author: Nguyen Ngoc Hieu <email address hidden>
Date: Fri Jan 5 02:26:04 2024 +0700

    fix: SCALE_IN action not honoring specified node count

    The SCALE_IN action in the lb_policy module was removing only
    one node from the load balancer, regardless of the specified
    count when the count was greater than 1. This was due to a
    hard-coded count of 1 in the _get_delete_candidates function.

    The root cause has been addressed by updating the
    _get_delete_candidates function to dynamically handle the count
    for SCALE_IN. The count is now retrieved from the action inputs,
    and if not specified or invalid, it defaults to 1.

    Closes-Bug: #2048099
    Change-Id: I9ff12dec26f4c558ef5ef84de87668e9668cec80

Changed in senlin:
status: In Progress → Fix Released
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.