Skip to content

Enable Rollback Support of VAC with Infeasible Errors #487

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunnylovestiramisu
Copy link
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
ControllerModifyVolume should allow rollback if a modification ends in infeasible state.

Which issue(s) this PR fixes:
Fixes #482 , kubernetes/kubernetes#130597

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Enable Rollback Support of VAC with Infeasible Errors

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 21, 2025
@sunnylovestiramisu sunnylovestiramisu removed the request for review from chrishenzie March 21, 2025 21:03
@xing-yang
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 27, 2025
@@ -65,6 +65,24 @@ func (ctrl *modifyController) modify(pvc *v1.PersistentVolumeClaim, pv *v1.Persi
}
return ctrl.controllerModifyVolumeWithTarget(pvc, pv, vac, pvcSpecVacName)
}
} else if pvcSpecVacName != nil && curVacName != nil && pvc.Status.ModifyVolumeStatus != nil && *pvcSpecVacName == *curVacName {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can pvcSpecVacName ever be nil in this code path? I think that, this code is way harder to read and understand because all the used if and else conditions need to be simplified.

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. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VolumeAttributesClass update should support recover from failure
4 participants