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 validations checks and handle snapshot deletion once migrated to CSI #1712

Conversation

prateekpandey14
Copy link
Contributor

@prateekpandey14 prateekpandey14 commented Jun 8, 2020

Pull Request template

Why is this PR required? What issue does it fix?:

PR required to handle PVC validation checks before starting the volume migration operations,
for example, ignore the PVC deletion if snapshots are exists.

What this PR does?:

  • Add skip validations checks in webhook validations via annotations:
    There are some cases like volume migration where we need to delete
    the old pvc and create new pvc based on CSI, in such cases we need
    to ignore/skip the validations related to snapshots .

  • Ignore old snapshots delete request once migrated to CSI based volumes. Once we migrate the volumes to CSI, we have to migrate the snapshot as well, once snapshots are migrated, backend snapshot will be bind to new CSI snapshot type, and it requires clean up of the older snapshot related resources as they are no longer requried. This change will allow user to delete the snapshot of old types (not from the pools which is bind to the new csi snapshot types)

Does this PR require any upgrade changes?:

NO

If the changes in this PR are manually verified, list down the scenarios covered::

  • Created PVC with skip annotation
  • Created snapshot and tried to delete the pvc which should allow to delete the PVC.

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests

There are some cases like volume migration where we need to delete
the old pvc and create new based on CSI, in such cases we need
to ignore/skip the validations.

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
@prateekpandey14 prateekpandey14 force-pushed the handle-volume-migration branch 2 times, most recently from ffd134a to fcc0d1f Compare June 8, 2020 11:20
@prateekpandey14 prateekpandey14 changed the title skip validations checks and handle snapshot deletion for once migrated to CSI skip validations checks and handle snapshot deletion once migrated to CSI Jun 8, 2020
@prateekpandey14 prateekpandey14 force-pushed the handle-volume-migration branch from fcc0d1f to 02dc0c1 Compare June 8, 2020 11:59
Copy link
Contributor

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

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

lgtm

pkg/snapshot/v1alpha1/snapshot.go Outdated Show resolved Hide resolved
pkg/snapshot/v1alpha1/snapshot.go Outdated Show resolved Hide resolved
@prateekpandey14 prateekpandey14 force-pushed the handle-volume-migration branch from 2f82132 to 379d5de Compare June 8, 2020 14:32
Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
@prateekpandey14 prateekpandey14 force-pushed the handle-volume-migration branch from 379d5de to a8c40f8 Compare June 8, 2020 14:49
@prateekpandey14 prateekpandey14 added this to the 1.11 milestone Jun 9, 2020
Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

Changes are good

@prateekpandey14 prateekpandey14 merged commit d30965d into openebs-archive:master Jun 9, 2020
@prateekpandey14 prateekpandey14 deleted the handle-volume-migration branch June 19, 2020 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants