Bug 1907287
| Summary: | [csi-snapshot-webhook] should support both v1beta1 and v1 version when creating volumesnapshot/volumesnapshotcontent | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Wei Duan <wduan> |
| Component: | Storage | Assignee: | Jan Safranek <jsafrane> |
| Storage sub component: | Kubernetes External Components | QA Contact: | Qin Ping <piqin> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | aos-bugs, jsafrane |
| Version: | 4.7 | Keywords: | TestBlocker |
| Target Milestone: | --- | ||
| Target Release: | 4.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-24 15:43:03 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
We must support both snapshot.storage.k8s.io/v1 and v1beta1 for couple of releases. I admit that the snapshot webhook does not allow snapshot.storage.k8s.io/v1 yet, because external-snapshotter was not rebased to Kubernetes 1.20 version. We're waiting for upstream release. If the webhook does not support snapshot.storage.k8s.io/v1, all the update(patch) options to volumesnapshot and volumesnapshotcontent will be rejected. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633 |
Description of problem: Currently csi-snapshot-controller-operator installs the snapshot CRDs for v1 version, when creating volumesnapshot instance with v1 version, the validation-webhook still checks the v1beta1 version and report: Error from server: error when creating "temp.yaml": admission webhook "volumesnapshotclasses.snapshot.storage.k8s.io" denied the request: expect resource to be {snapshot.storage.k8s.io v1beta1 volumesnapshots} or {snapshot.storage.k8s.io v1beta1 volumesnapshotcontents} Version-Release number of selected component (if applicable): 4.7.0-0.nightly-2020-12-13-224840 How reproducible: Always Steps to Reproduce: 1. Install aws cluster 2. Create volumesnapshotclass instance with "v1" successfully 3. Create volumesnapshot instance with "v1" failed $ more temp.yaml apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: mysnapshot spec: volumeSnapshotClassName: csi-aws-ebs-snapclass source: persistentVolumeClaimName: mypvc-ori $ oc create -f temp.yaml Error from server: error when creating "temp.yaml": admission webhook "volumesnapshotclasses.snapshot.storage.k8s.io" denied the request: expect resource to be {snapshot.storage.k8s.io v1beta1 volumesnapshots} or {snapshot.storage.k8s.io v1beta1 volumesnapshotcontents} Actual results: volumesnapshot instance created failed. Expected results: volumesnapshot instance should be created successfully.