-
Notifications
You must be signed in to change notification settings - Fork 69
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): fixes pool scaledown bug #122
fix(cstor-webhook): fixes pool scaledown bug #122
Conversation
In case of scaling down a pool by removing a pool spec from the CSPC, webhook server was reporting a out of bounds exception. This commit fixes this bug. Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
b7a982d
to
23500a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provided comments
Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…penebs-archive#122) While scaling down a pool by removing a pool spec from the CSPC, there was nil pool list getting initialized due to additional node-selector labels get added in pool list label-selector not matches with existing CSPI labels, causing the webhook failures Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
) (#123) While scaling down a pool by removing a pool spec from the CSPC there was nil pool list getting initialized due to additional node-selector labels get added in pool list label-selector, not matches with existing CSPI labels, causing the webhook failures Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
In case of scaling down a pool by removing a pool spec from the CSPC, the webhook server was reporting an out of bounds error. This commit fixes this bug.
Bug Description:
The validation code, in case of scaledown, was trying to list CSPI based on all the labels present on the nodes of the corresponding CSPI. On the other hand, CSPI only has
kubernetes.io/hostname
label to it and not all the other node labels. As labels are ANDed for output, we were not getting any items in the CSPI list and hence out of bounds error was caused.Signed-off-by: Ashutosh Kumar ashutosh.kumar@mayadata.io