Skip to content
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

feat: add startup taint removal feature #2309

Merged
merged 1 commit into from
May 1, 2024

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Apr 29, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:
feat: add startup taint removal feature

This PR is for solving the race condition between CSI driver initialization and disk volume scheduling, you could find details here: kubernetes/kubernetes#95911

user should add taint(disk.csi.azure.com/agent-not-ready:NoExecute) to node pool before CSI driver starts up

  • testing example
kubectl taint nodes aks-user-34333166-vmss000000 disk.csi.azure.com/agent-not-ready:NoExecute
  • related logs
I0429 13:40:02.781428       1 azuredisk.go:754] CSINode Allocatable value is set for driver on node aks-user-34333166-vmss000000, count 4
I0429 13:40:02.781458       1 azuredisk.go:703] removing taint with key disk.csi.azure.com/agent-not-ready from local node aks-user-34333166-vmss000000
I0429 13:40:02.781480       1 azuredisk.go:706] checking taint key disk.csi.azure.com/agent-not-ready, value , effect NoExecute
I0429 13:40:02.781492       1 azuredisk.go:710] queued taint for removal with key disk.csi.azure.com/agent-not-ready, effect NoExecute
I0429 13:40:02.801729       1 azuredisk.go:741] removed taint with key disk.csi.azure.com/agent-not-ready from local node aks-user-34333166-vmss000000 successfully

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:
There is a race condition between CSI driver initialization and kube-scheduler, we have added a taint removal feature (when CSI driver is started up) from aks 1.30, so cx could mitigate this issue, add taint disk.csi.azure.com/agent-not-ready:NoExecute in node pool creation and then after CSI driver is started, the taint would be removed by the CSI driver, that won’t be any race condition between CSI driver initialization and kube-scheduler any more.

Use node taints in an Azure Kubernetes Service (AKS) cluster - Azure Kubernetes Service | Microsoft Learn
az aks nodepool add
--resource-group $RESOURCE_GROUP_NAME
--cluster-name $CLUSTER_NAME
--name $NODE_POOL_NAME
--node-count 1
--node-taints "disk.csi.azure.com/agent-not-ready:NoExecute"
--no-wait

Release note:

feat: add startup taint removal feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 29, 2024
@k8s-ci-robot k8s-ci-robot requested a review from cvvz April 29, 2024 13:50
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from edreed April 29, 2024 13:50
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 29, 2024
@andyzhangx andyzhangx removed the request for review from edreed April 29, 2024 15:06
@andyzhangx
Copy link
Member Author

/retest

4 similar comments
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx merged commit b1be543 into kubernetes-sigs:master May 1, 2024
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. 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.

2 participants