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

Bug 2224325: Add checks to ensure existing PVC matches PVC to restore #117

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

ShyamsundarR
Copy link

Currently, the check for existing PVC, if found during PVC restore, checks to see if PVC exists and is restored by Ramen.

This is insufficient in the case of a StatefulSet where the PVC maybe left behind (similar to the PV) post a failover or a relocate and on restore of the PVC if the older PVC is found, it may not be restored by Ramen.

The checks for existing PVCs is hence expanded to ensure:

PVC is not deleted
PVC is bound
PVC is bound to the same PV volume name we would have restored

The above ensures that we would have restored the same PVC and it would have been bound to the PV as desired.

Also, the check to ensure that if the PVC exists it is restored by Ramen is dropped, as that may fail in cases as mentioned above.

Currently, the check for existing PVC, if found during PVC
restore, checks to see if PVC exists and is restored by Ramen.

This is insufficient in the case of a StatefulSet where the
PVC maybe left behind (similar to the PV) post a failover or
a relocate and on restore of the PVC if the older PVC is
found, it may not be restored by Ramen.

The checks for existing PVCs is hence expanded to ensure:
- PVC is not deleted
- PVC is bound
- PVC is bound to the same PV volume name we would have restored

The above ensures that we would have restored the same PVC and
it would have been bound to the PV as desired.

Also, the check to ensure that if the PVC exists it is restored
by Ramen is dropped, as that may fail in cases as mentioned
above.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
(cherry picked from commit 1805b30)
Attempting to improve code quality as changes are done
around the code. In this case adding comments to related
functions.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
(cherry picked from commit ce7fe03)
@openshift-ci
Copy link

openshift-ci bot commented Aug 1, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ShyamsundarR

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

@openshift-ci
Copy link

openshift-ci bot commented Aug 1, 2023

@ShyamsundarR: This pull request references Bugzilla bug 2224325, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

2 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @parikshithb

In response to this:

Bug 2224325: Add checks to ensure existing PVC matches PVC to restore

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/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Aug 1, 2023

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: parikshithb.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@ShyamsundarR: This pull request references Bugzilla bug 2224325, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

2 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @parikshithb

In response to this:

Bug 2224325: Add checks to ensure existing PVC matches PVC to restore

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/test-infra repository.

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/test-infra repository.

@BenamarMk BenamarMk merged commit 78e2e7a into red-hat-storage:release-4.14 Aug 2, 2023
12 checks passed
@openshift-ci
Copy link

openshift-ci bot commented Aug 2, 2023

@ShyamsundarR: All pull requests linked via external trackers have merged:

Bugzilla bug 2224325 has been moved to the MODIFIED state.

In response to this:

Bug 2224325: Add checks to ensure existing PVC matches PVC to restore

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/test-infra repository.

@ShyamsundarR ShyamsundarR deleted the bz2224325 branch February 8, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants