-
Notifications
You must be signed in to change notification settings - Fork 302
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
Instance Group Manager does not remove nodes with empty string in the zone field #2658
base: master
Are you sure you want to change the base?
Conversation
Hi @08volt. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/lgtm |
/hold |
/ok-to-test |
my lgtm was accidental, for now |
1f151d8
to
726a46f
Compare
fb05798
to
0b2fcc6
Compare
012b702
to
5a6b7ee
Compare
Nodes can have empty zone if it not has been assigned yet. The zone was retrieved from providerID using the following Regular Expression Matching and taking the second match: ```var providerIDRE = regexp.MustCompile(`^` + "gce" + `://([^/]+)/([^/]+)/([^/]+)$`)``` In the case of empty zone it was generating an Error. In order to allow an empty zone to match the Regular Expression, it has been updated to: ```var providerIDRE = regexp.MustCompile(`^` + "gce" + `://([^/]+)/([^/]*)/([^/]+)$`)``` After that, I updated all the instances where the code was checking the error, to check also for the empty zone. I updated the Instance Group Manager to not remove the nodes which do not have a zone assigned.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 08volt, cezarygerard, mmamczur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
Updates Instance Group Manager to Support Nodes with Empty Zones
Bug:
The Load Balancer controller removes nodes with an empty string in the Zone field, even when they are already in the correct instance group.
Solution:
Prevents the removal of nodes with an empty string in the Zone field.
Details:
providerID
using a regular expression (var providerIDRE = regexp.MustCompile(
^+ "gce" +
://([^/]+)/([^/]+)/([^/]+)$)
) that didn't account for empty Zones, leading to errors.var providerIDRE = regexp.MustCompile(
^+ "gce" +
://([^/]+)/([^/]*)/([^/]+)$)
to support empty Zones.