-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Always consider spot instance node readiness in cluster validation #8159
Conversation
Hi @johngmyers. 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/test-infra repository. |
/ok-to-test |
@@ -267,7 +266,7 @@ func (v *ValidationCluster) validateNodes(cloudGroups map[string]*cloudinstances | |||
continue | |||
} | |||
|
|||
role := util.GetNodeRole(node) | |||
role := strings.ToLower(string(cloudGroup.InstanceGroup.Spec.Role)) |
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.
Rather than performing this ToLower
could we not change the if n.Role == "..."
comparisons lower down to something like if cloudGroup.InstanceGroup.Spec.Role == kops.InstanceGroupRoleMaster
instead as we already do with bastion role checks on line 254?
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.
The value gets returned to the caller in the ValidationNode
struct (and the caller makes it visible to the user), so has to be lowercased in order to not do an API break.
/test pull-kops-verify-staticcheck |
Thanks @johngmyers |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers, rifelpet 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 |
/test pull-kops-e2e-kubernetes-aws |
/lgtm /test pull-kops-e2e-kubernetes-aws |
/test pull-kops-e2e-kubernetes-aws |
1 similar comment
/test pull-kops-e2e-kubernetes-aws |
/kind bug
When performing cluster validation on a cluster with spot instance nodes (nodes annotated with
node-role.kubernetes.io/spot-worker: "true"
), kops will ignore the node readiness roughly 50% of the time, instead printing the message:This means that cluster validation can randomly incorrectly succeed.
This change has cluster validation determine the node's role using the instancegroup spec, not an annotation chosen depending on the randomization of Go map ordering.
Fixes #5038