Skip to content

fix: fallback to API server on missing Node topology key#1485

Open
ryan-mist wants to merge 2 commits intokubernetes-csi:masterfrom
ryan-mist:node-topology-label-fix
Open

fix: fallback to API server on missing Node topology key#1485
ryan-mist wants to merge 2 commits intokubernetes-csi:masterfrom
ryan-mist:node-topology-label-fix

Conversation

@ryan-mist
Copy link
Copy Markdown

What type of PR is this?
/kind bug

What this PR does / why we need it:e
This PR adds a fallback to the API server in Node Topology if the topology labels on the Node do not match the labels on the CSINode.

This fixes a bug where during provisioning, if the Node does not yet have all topology labels then provisioning continually fails. Even when the Node eventually does have all the labels.

Testing After Fix

  1. Launch Node
    In this case, I use EKS Auto to launch the Node. There are 4 required topology labels are:
eks.amazonaws.com/compute-type
kubernetes.io/os
topology.ebs.csi.eks.amazonaws.com/zone
topology.kubernetes.io/zone
  1. Remove A Required Topology Label From The Node
k label node {NODE_LABEL} eks.amazonaws.com/compute-type-
  1. Create Stateful Set with volumeClaimTemplate so PVC created and volume provisioned
    Looking at the PVC events
Warning  ProvisioningFailed    40s (x7 over 103s)     ebs.csi.eks.amazonaws.com_ebscsicontroller-7b864487cb-dgx8v_07b290e6-86d7-4bb5-a604-410cd0ef97ba  error generating accessibility requirements: topology labels from selected node map[] does not match topology keys from CSINode [eks.amazonaws.com/compute-type kubernetes.io/os topology.ebs.csi.eks.amazonaws.com/zone topology.kubernetes.io/zone]
  1. Add Label Back Onto The Node
k label node i-096987243751a321d eks.amazonaws.com/compute-type=auto
  1. PVC Should Be Bound Soon After
NAME                     STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
data-my-stateful-app-0   Bound    pvc-a733f911-6d1a-4e30-9c8d-8f249b465ea5   8Gi        RWO            auto-ebs-sc    <unset>                 4m37s
data-my-stateful-app-1   Bound    pvc-6b8dac92-770e-4ba6-ae0c-c2f57dbd833e   8Gi        RWO            auto-ebs-sc    <unset>                 7s

Before this new version of external provisioner, PVCs would remain unbound with provisioning failures of:

error generating accessibility requirements: topology labels from selected node map[] does not match topology keys from CSINode

Which issue(s) this PR fixes:

Fixes #1478

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @ryan-mist!

It looks like this is your first PR to kubernetes-csi/external-provisioner 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-provisioner has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @ryan-mist. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ryan-mist
Once this PR has been reviewed and has the lgtm label, please assign xing-yang for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from gnufied and pohly March 10, 2026 18:57
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 10, 2026
@jsafrane
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 19, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale Node Topology Label Cache causes Volume Provisioning Failures Until Restart

3 participants