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

DeleteSnapshot RPC is sent to CSI driver when clone was in progress. #905

Open
Madhu-1 opened this issue Sep 12, 2023 · 13 comments
Open

DeleteSnapshot RPC is sent to CSI driver when clone was in progress. #905

Madhu-1 opened this issue Sep 12, 2023 · 13 comments
Assignees

Comments

@Madhu-1
Copy link
Contributor

Madhu-1 commented Sep 12, 2023

What happened:

DeleteSnapshot RPC is sent to the CSI driver when the clone is in progress.

Note: The clone was created in a different namespace using https://kubernetes.io/blog/2023/01/02/cross-namespace-data-sources-alpha/#create-a-persistentvolumeclaim-by-using-cross-namespace-data-source and i think

func (ctrl *csiSnapshotCommonController) isVolumeBeingCreatedFromSnapshot(snapshot *crdv1.VolumeSnapshot) bool {
is only applicable when clone and snapshot are in same namespace.

What you expected to happen:

Dont send the DeleteSnapshot RPC clone when clone was in progress.

How to reproduce it:
Follow the steps in https://kubernetes.io/blog/2023/01/02/cross-namespace-data-sources-alpha/#create-a-persistentvolumeclaim-by-using-cross-namespace-data-source and ensure to delete the volume snapshot when the clone was in progress.

Anything else we need to know?:

Environment:

  • Driver version:
  • Kubernetes version (use kubectl version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Sep 14, 2023

@xing-yang any thoughts?

@xing-yang
Copy link
Collaborator

I think the cross namespace feature was not there when this was implemented. It makes sense to fix it.
@Madhu-1 Are you interested in working on a fix?

@liangyuanpeng
Copy link

liangyuanpeng commented Sep 21, 2023

I want to work for it and need some guide.
@Madhu-1 @xing-yang

It's need the external-snapshotter support feature-gates and check isVolumeBeingCreatedFromSnapshot from all of namespace if CrossNamespaceVolumeDataSource=true. Remind me if i missed something,thanks!

here is the simple code:

  CrossNamespaceVolumeDataSource := true
  if CrossNamespaceVolumeDataSource {
    pvcList, err = ctrl.pvcLister.List(labels.Everything())
  }else{
    pvcList, err = ctrl.pvcLister.PersistentVolumeClaims(snapshot.Namespace).List(labels.Everything())
  }

/assign

@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Sep 21, 2023

@xing-yang i missed the ping, sorry for that, as @liangyuanpeng has already shown interest , please go ahead :)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 27, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Apr 2, 2024

I want to work for it and need some guide. @Madhu-1 @xing-yang

It's need the external-snapshotter support feature-gates and check isVolumeBeingCreatedFromSnapshot from all of namespace if CrossNamespaceVolumeDataSource=true. Remind me if i missed something,thanks!

here is the simple code:

  CrossNamespaceVolumeDataSource := true
  if CrossNamespaceVolumeDataSource {
    pvcList, err = ctrl.pvcLister.List(labels.Everything())
  }else{
    pvcList, err = ctrl.pvcLister.PersistentVolumeClaims(snapshot.Namespace).List(labels.Everything())
  }

/assign

@xing-yang are you okay with introducing a new flag or any other alternative do you suggest?

@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Apr 2, 2024

/reopen

@k8s-ci-robot
Copy link
Contributor

@Madhu-1: Reopened this issue.

In response to this:

/reopen

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.

@k8s-ci-robot k8s-ci-robot reopened this Apr 2, 2024
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Apr 2, 2024

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Apr 2, 2024
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Apr 2, 2024

/assign

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

No branches or pull requests

5 participants