Addressing an Overlooked Test Case: Reevaluating Pre-operation Checks in Recent Patch

Bug #2049191 reported by Nguyen Ngoc Hieu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Nguyen Ngoc Hieu

Bug Description

I missed a test case in my recent patch. It happens when ignoring pre_op LB if the cluster is already at the minimum size [https://github.com/openstack/senlin/commit/23f3bd708b5c7026051c2635f34ee69b5c366a2a]. Let me briefly describe this patch:
- The pre_op check actions include: CLUSTER_DEL_NODES, CLUSTER_SCALE_IN, CLUSTER_RESIZE, NODE_DELETE, CLUSTER_REPLACE_NODES.
- The actions among the above will skip the pre_op check if the cluster is already at the minimum size: CLUSTER_DEL_NODES, CLUSTER_SCALE_IN, CLUSTER_RESIZE, NODE_DELETE.
- The exception action is CLUSTER_REPLACE_NODES.

However, I quickly realized that the CLUSTER_RESIZE action should be an exception for the following reasons:
- Resizing a cluster that already has desired_capacity = min_size is still entirely valid.
- CLUSTER_RESIZE allows simultaneous changes to both desired_capacity and min_size, and they have been validated in the conductor [https://github.com/openstack/senlin/blob/29f2e885e7648934dfd46196bb6f25e08d5857ad/senlin/conductor/service.py#L1149C14-L1149C14].

Changed in senlin:
assignee: nobody → Nguyen Ngoc Hieu (zitechdev201)
status: New → In Progress
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/+/905429

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

Reviewed: https://review.opendev.org/c/openstack/senlin/+/905429
Committed: https://opendev.org/openstack/senlin/commit/7ef513dd7918b609abf19712288c3bc98405fb67
Submitter: "Zuul (22348)"
Branch: master

commit 7ef513dd7918b609abf19712288c3bc98405fb67
Author: Nguyen Ngoc Hieu <email address hidden>
Date: Fri Jan 12 17:26:43 2024 +0700

    Removing CLUSTER_RESIZE from pre-op skip List at min threshold

    Excluding CLUSTER_RESIZE from the list of actions that skip
    pre-operation checks if the cluster is already at the minimum threshold.

    When the cluster is at the minimum threshold, pre-op LB will function
    with actions such as CLUSTER_DEL_NODES, CLUSTER_SCALE_IN, NODE_DELETE,
    and will skip actions like CLUSTER_REPLACE_NODES and CLUSTER_RESIZE.

    Closes-Bug: #2049191
    Change-Id: I00a7ea40f69bafc94ca2bba9f268af7b03344997

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.