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

Skip modifying volumes owned by other CSI drivers #419

Conversation

ConnorJC3
Copy link
Contributor

@ConnorJC3 ConnorJC3 commented Jul 22, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes issue (3) from kubernetes/kubernetes#124151 (comment) - Today, the external-resizer will attempt to modify any PVC awaiting modification without checking for if it matches the local CSI driver.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

No test exercises syncPVC, so I could not update the tests for this case. I have manually tested the change against multiple drivers.

Does this PR introduce a user-facing change?:

Fixed a bug causing external-resizer to attempt to modify volumes owned by other CSI drivers

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Jul 22, 2024
@k8s-ci-robot k8s-ci-robot requested review from andyzhangx and pohly July 22, 2024 21:31
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 22, 2024
@ConnorJC3 ConnorJC3 changed the title [WIP] Skip modifying volumes owned by other CSI drivers Skip modifying volumes owned by other CSI drivers Jul 23, 2024
@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 Jul 23, 2024
@msau42
Copy link
Collaborator

msau42 commented Jul 26, 2024

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 26, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ConnorJC3, 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2024
vacName := pvc.Spec.VolumeAttributesClassName
if vacName != nil && *vacName != "" && pvc.Status.Phase == v1.ClaimBound {
if vacName != nil && *vacName != "" && pvc.Status.Phase == v1.ClaimBound && pv.Spec.CSI.Driver == ctrl.name {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a unit test for syncPVC if one doesn't exist?

@k8s-ci-robot k8s-ci-robot merged commit 6b7a68f into kubernetes-csi:master Jul 26, 2024
6 checks passed
@msau42
Copy link
Collaborator

msau42 commented Jul 26, 2024

/cherry-pick release-1.11

@k8s-infra-cherrypick-robot

@msau42: new pull request created: #422

In response to this:

/cherry-pick release-1.11

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.

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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants