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

fix Azurefile volumeid conflict issue in csi migration #107575

Merged
merged 2 commits into from Jan 29, 2022

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Jan 15, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

fix Azurefile volumeid conflict issue in csi migration

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • with the fix:
# mount | grep cifs | grep fixed | sort | uniq
//andytesta.file.core.windows.net/aksshare on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/#azure-secret#aksshare#test#one-fixed/globalmount type cifs (rw,relatime,vers=3.1.1,cache=strict,username=andytesta,uid=0,noforceuid,gid=0,noforcegid,addr=20.38.101.232,file_mode=0777,dir_mode=0777,soft,persistenthandles,nounix,serverino,mapposix,mfsymlinks,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=30)
//andytesta.file.core.windows.net/aksshare on /var/lib/kubelet/pods/a58ef1bd-7d2b-44f3-992a-ba3a2dfc3dc7/volumes/kubernetes.io~csi/#azure-secret#aksshare#test#one-fixed/mount type cifs (rw,relatime,vers=3.1.1,cache=strict,username=andytesta,uid=0,noforceuid,gid=0,noforcegid,addr=20.38.101.232,file_mode=0777,dir_mode=0777,soft,persistenthandles,nounix,serverino,mapposix,mfsymlinks,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=30)
//andytestb.file.core.windows.net/aksshare on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/#azure-secret#aksshare#test#two-fixed/globalmount type cifs (rw,relatime,vers=3.1.1,cache=strict,username=andytestb,uid=0,noforceuid,gid=0,noforcegid,addr=52.239.174.136,file_mode=0777,dir_mode=0777,soft,persistenthandles,nounix,serverino,mapposix,mfsymlinks,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=30)
//andytestb.file.core.windows.net/aksshare on /var/lib/kubelet/pods/4e35f14c-82bb-4be3-a58d-6711830d1641/volumes/kubernetes.io~csi/#azure-secret#aksshare#test#two-fixed/mount type cifs (rw,relatime,vers=3.1.1,cache=strict,username=andytestb,uid=0,noforceuid,gid=0,noforcegid,addr=52.239.174.136,file_mode=0777,dir_mode=0777,soft,persistenthandles,nounix,serverino,mapposix,mfsymlinks,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=30)

# mount | grep dev | grep sdd
/dev/sdd on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/globalmount type ext4 (rw,relatime)
/dev/sdd on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/globalmount type ext4 (rw,relatime)
/dev/sdd on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/subscriptions/xxx/resourceGroups/mc_andy-aks122_andy-aks122_eastus2/providers/Microsoft.Compute/disks/pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/globalmount type ext4 (rw,relatime)
/dev/sdd on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/subscriptions/xxx/resourceGroups/mc_andy-aks122_andy-aks122_eastus2/providers/Microsoft.Compute/disks/pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/globalmount type ext4 (rw,relatime)
/dev/sdd on /var/lib/kubelet/pods/045b75bb-1e5d-48b8-9428-239c1a64ad42/volumes/kubernetes.io~csi/~subscriptions~xxx~resourceGroups~mc_andy-aks122_andy-aks122_eastus2~providers~Microsoft.Compute~disks~pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/mount type ext4 (rw,relatime)
/dev/sdd on /var/lib/kubelet/pods/045b75bb-1e5d-48b8-9428-239c1a64ad42/volumes/kubernetes.io~csi/~subscriptions~xxx~resourceGroups~mc_andy-aks122_andy-aks122_eastus2~providers~Microsoft.Compute~disks~pvc-f2358f1f-b86b-40da-a2f9-fcc3a99f876d/mount type ext4 (rw,relatime)

Does this PR introduce a user-facing change?

fix Azurefile volumeid collision issue in csi migration

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

fix Azurefile volumeid conflict issue in csi migration

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 15, 2022
@k8s-ci-robot k8s-ci-robot requested review from dchen1107 and saad-ali Jan 15, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 15, 2022

/test pull-kubernetes-e2e-aks-engine-azure-file-windows-containerd
/test pull-kubernetes-e2e-aks-engine-azure-file-windows-dockershim
/test pull-kubernetes-e2e-capz-azure-file
/test pull-kubernetes-e2e-capz-azure-file-vmss

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 15, 2022
@andyzhangx andyzhangx changed the title [WIP]fix Azurefile volumeid collision issue in csi migration [WIP]fix Azurefile volumeid conflict issue in csi migration Jan 16, 2022
@andyzhangx andyzhangx force-pushed the azurefile-volumeid-uuid branch from 3e9a6ab to fe76d54 Compare Jan 16, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 16, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 16, 2022

/retest

@andyzhangx andyzhangx changed the title [WIP]fix Azurefile volumeid conflict issue in csi migration fix Azurefile volumeid conflict issue in csi migration Jan 17, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2022
@andyzhangx andyzhangx changed the title fix Azurefile volumeid conflict issue in csi migration [WIP]fix Azurefile volumeid conflict issue in csi migration Jan 17, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2022
@andyzhangx andyzhangx force-pushed the azurefile-volumeid-uuid branch from fe76d54 to fdadc95 Compare Jan 19, 2022
@andyzhangx andyzhangx changed the title [WIP]fix Azurefile volumeid conflict issue in csi migration fix Azurefile volumeid conflict issue in csi migration Jan 19, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 19, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 19, 2022

/assign @msau42
/priority important-soon
/sig cloud-provider
/area provider/azure
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. labels Jan 19, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 27, 2022

/retest

Copy link
Member

@feiskyer feiskyer left a comment

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2022
@andyzhangx andyzhangx force-pushed the azurefile-volumeid-uuid branch from 02f9f0b to c2aba49 Compare Jan 27, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 27, 2022

/hold cancel
@msau42 I have added podNamespace in volumeid, to make it PV name unique across different namespace, PTAL.
you could just review the second commit: c2aba49

Thanks.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 27, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 28, 2022

/retest

1 similar comment
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 28, 2022

/retest

Copy link
Member

@feiskyer feiskyer left a comment

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2022
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, feiskyer, msau42

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

@feiskyer
Copy link
Member

feiskyer commented Jan 29, 2022

@andyzhangx could you cherry-pick this to impacted release branches?

@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 29, 2022

/retest

@msau42
Copy link
Member

msau42 commented Jan 29, 2022

/hold
One more question that just came up. Are these names consistent with how the volumeHandles would be represented with real CSI volumes? The reason is because volume attach limit feature will count each unique volume id towards the limit. If you don't have the same volumeHandle to represent the same volume, then we will overcount the volumes and you may reach the node limit unnecessarily.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 29, 2022

/hold One more question that just came up. Are these names consistent with how the volumeHandles would be represented with real CSI volumes? The reason is because volume attach limit feature will count each unique volume id towards the limit. If you don't have the same volumeHandle to represent the same volume, then we will overcount the volumes and you may reach the node limit unnecessarily.

Thanks for the review.
@msau42 that's only related to azure disk since azure file don't attach thus has no such node limit. And volumeHandle is diskURI, which represents with real CSI volumes

@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 29, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2022
@andyzhangx
Copy link
Member Author

andyzhangx commented Jan 29, 2022

/retest

@k8s-ci-robot k8s-ci-robot merged commit 807cee8 into kubernetes:master Jan 29, 2022
20 of 21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Jan 29, 2022
k8s-ci-robot added a commit that referenced this pull request Feb 11, 2022
…107575-upstream-release-1.22

Automated cherry pick of #107575: fix: azurefile volumeid conflict in csi migration
k8s-ci-robot added a commit that referenced this pull request Feb 11, 2022
…107575-upstream-release-1.21

Automated cherry pick of #107575: fix: azurefile volumeid conflict in csi migration
k8s-ci-robot added a commit that referenced this pull request Feb 11, 2022
…107575-upstream-release-1.23

Automated cherry pick of #107575: fix: azurefile volumeid conflict in csi migration
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. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants