-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ProviderID set by capi infra providers should match the one set by the controller manager cloud-provider #4526
Comments
/assign |
Seems reasonable to me, but I don't know about other providers. I'm also not sure if this would to problems with CAPO providerIDs? They currently look like this in CAPO and in the cloud provider openstack: (EDIT: for completeness, in OpenStack it's just |
What are you proposing the change be in cluster-api itself? The providerIDs definitely need to be consistent with the ones expected by cloud-provider, we actually ran into cluster-autoscaler issues with the Azure provider recently because of an extra slash in the ID (kubernetes-sigs/cluster-api-provider-azure#1293). kubernetes-sigs/cluster-api-provider-azure#655 was merged a long time ago to make it "consistent" but it actually wasn't right because it assumed the format was the same as AWS, which isn't true because Azure has an extra leading slash in the ID. This is what a providerID looks like in Azure right now: |
Thanks for that context @CecileRobertMichon.
If we agree on
|
IIRC the equality check was checking the entire string in the past, but we had to change it to match only on CloudProvider and the identifier given that some of the ProviderID information might be missing when the infrastructure provider provisions the machine and the cloud provider assigns the identifier later on. By contract, the ProviderID's ID part (last chunk after The comparison method change proposed is also a breaking change, and I'm quite sure most infrastructure providers would break. |
This is a good point, we should probably revisit and verify this is still the case.
Isn't this contract something we just assumed to be true for convenience because of the limitation you describe above but there's actually no reason nor guarantees for Cloud providers to necessarily satisfy this? My concern is that uniqueness might not be necessarily the case for all cloud providers. E.g It seems to not be the case in GCP where you can get same ID in different zones https://cloud.google.com/compute/docs/instances/verifying-instance-identity Happy to close this if this concern proves to not be justified. |
/milestone Next |
/lifecycle backlog |
/assign @alexeldeib @randomvariable |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
/reopen still valid I think, never tackled this unfortunately |
@alexeldeib: Reopened this issue. In response to this:
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. |
I think comparing the full string as suggested in #4526 (comment) is correct
+1 as the assumptions made here are totally false for azure, these are not even unique with multiple VMSS in same region. every VMSS has instances identified by integers unique to that scaleset only (i.e., reused for every VMSS) starting at 0. /help |
@alexeldeib: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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. |
/assign |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
@CecileRobertMichon: Reopened this issue. In response to this:
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. |
/triage accepted |
What steps did you take and what happened:
In the existing providerID logic assumptions, cloudProvider and ID is what is used to compare, skipping the other segments of the providerID. See https://github.com/kubernetes-sigs/cluster-api/blob/master/controllers/noderefutil/providerid.go#L86
This makes the assumption - not necessarily true - that IDs in different regions/zones won't be reused by the cloud provider.
What did you expect to happen:
I'd be in favour of changing the expectation for the cluster-api-providers to set exactly the same providerID the controller manager cloud-provider sets.
We actually ensured this in AWS a while ago kubernetes-sigs/cluster-api-provider-aws#1693.
Though there might be other provider specific reasons why this is not possible I'm not aware of.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]
The text was updated successfully, but these errors were encountered: