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

Commits on Aug 1, 2023

  1. Add checks to ensure existing PVC matches PVC to restore

    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)
    ShyamsundarR committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    68859eb View commit details
    Browse the repository at this point in the history
  2. Add comment to function validateExistingPV[C] functions

    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)
    ShyamsundarR committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    a4fe104 View commit details
    Browse the repository at this point in the history