kubernetes-csi / external-snapshotter

Sidecar container that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint.
Apache License 2.0
471 stars 363 forks source link

v7.0.1 API is not backwards compatible #1022

Closed Lyndon-Li closed 1 month ago

Lyndon-Li commented 6 months ago

What happened: In v7.0.1 since prevent-volume-mode-conversion is enabled by default, the created volumesnapshotcotent sets its spec.SourceVolumeMode by inheriting value from the source PVC, so it must not be nil. On the other hand, in v7.0.1, there is a change #1005 where the webhook fails the validation of updating volumesnapshotcotent if oldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil.

However, it is possible that for a client that is using an older version of external-snapshotter API, spec.SourceVolumeMode field does not exist in volumesnapshotcotent's spec. If the Update method is called through this old client, it falls into oldSnapcontent.Spec.SourceVolumeMode != nil && newSnapcontent.Spec.SourceVolumeMode == nil, as a result, the Update will fail.

What you expected to happen: Update method should succeed even spec.SourceVolumeMode is not defined

How to reproduce it: See Velero issue https://github.com/vmware-tanzu/velero/issues/7433

Anything else we need to know?:

Environment:

k8s-triage-robot commented 3 months ago

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

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

You can:

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

/lifecycle stale

k8s-triage-robot commented 2 months ago

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:

You can:

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

/lifecycle rotten

k8s-triage-robot commented 1 month ago

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:

You can:

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

/close not-planned

k8s-ci-robot commented 1 month ago

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

In response to [this](https://github.com/kubernetes-csi/external-snapshotter/issues/1022#issuecomment-2249874491): >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][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.