Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cstor-webhook): allow scale down of pools when node doesn't exist in cluster #135

Merged
merged 3 commits into from
Jul 23, 2020

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Jul 20, 2020

What does this PR does:
In case of scaling down a pool by removing a pool spec
from the CSPC when a pool spec node doesn't exist in
the cluster, the cStor-admission server reported an error
saying no node exists for a given node selector. This PR
fixes this bug.

Bug Description:

  • To validate day-2-operations(pool expansion, blockdevice replacement)
    performed on the pool it was trying to get common pool specs from old
    CSPC spec(CSPC exist in etcd) and new CSPC spec(modified CSPC
    which needs to persist in etcd). common pool specs were figured out
    by fetching hostName from node resource(node resource will be fetched
    from etcd using nodeSelector on pool specs). In node doesn't exist
    in the cluster then scaling down operation will be failed.

Issue fixed by this PR : #134

Signed-off-by: mittachaitu sai.chaithanya@mayadata.io

… in cluster

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mittachaitu
Copy link
Contributor Author

pr/hold-merge has been added to discusses corner cases.

@mittachaitu mittachaitu linked an issue Jul 20, 2020 that may be closed by this pull request
…ered simultaneously

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Copy link
Contributor

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…he time where node doesn't exist in the cluster

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
expectedRsp: false,
getCSPCObj: getCSPCObject,
},
"Positive stripe expansion test when node name chaged": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chaged -> changed ?

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prateekpandey14 prateekpandey14 merged commit d522edb into openebs-archive:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admission-webhook bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(scaledown): admission server rejects update request of CSPC
4 participants