Bug 1906518 - Update snapshot API CRDs to v1
Summary: Update snapshot API CRDs to v1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.7.0
Assignee: Christian Huffman
QA Contact: Wei Duan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-10 17:22 UTC by Jan Safranek
Modified: 2023-01-27 02:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:41:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-csi-snapshot-controller-operator pull 69 0 None closed Bug 1906518: Update Snapshot CRDs to v1 2021-02-05 10:40:30 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:42:24 UTC

Description Jan Safranek 2020-12-10 17:22:32 UTC
csi-snapshot-controller-operator installs  volumesnapshotclasses.snapshot.storage.k8s.io/v1beta1, while Kubernetes 1.20 tests expect v1.

* Update csi-snapshot-controller-operator to install the snapshot CRDs volumesnapshotclasses.snapshot.storage.k8s.io/v1
* Enable e2e tests with [Feature:VolumeSnapshotDataSource], if they were disabled during 1.20 rebase.

Version-Release number of selected component (if applicable):
4.7.0-0.nightly-2020-12-09-112139

Steps to Reproduce:
1. Create a snapshot class:

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-hostpath-snapclass
driver: hostpath.csi.k8s.io #csi-hostpath
deletionPolicy: Delete

[Test also with VolumeSnapshot and VolumeSnapshotContent]

Actual results:
"the server could not find the requested resource"

Expected results:
* The snapshot class is created.
* E2e tests run tests like:
[sig-storage] CSI Volumes [Driver: csi-hostpath] [Testpattern: Dynamic PV (default fs)] provisioning should provision storage with snapshot data source [Feature:VolumeSnapshotDataSource]

Comment 4 Jan Safranek 2020-12-14 11:06:56 UTC
In 4.7, we should support both v1 and v1beta1 to give users / applications some time to update. In the API servers, objects are automatically converted between v1 and v1beta1 - you can create v1beta1 object and get v1 and the other way around. The API server prefers v1, so `oc get volumesnapshot` will get v1 version. If you want to get v1beta1 from some reason, use curl:

$ oc proxy
Starting to serve on 127.0.0.1:8001

$ curl http://localhost:8001/apis/snapshot.storage.k8s.io/v1beta1/volumesnapshots | jq
{
  "apiVersion": "snapshot.storage.k8s.io/v1beta1",
  "items": [
...
      "apiVersion": "snapshot.storage.k8s.io/v1beta1",
      "kind": "VolumeSnapshot",
...



However, external-snapshotter, which includes also snapshot controller + webhook, was not yet released for Kubernetes 1.20. It's close, but it has no exact date. My feeling is that it could be this or the next week. So, you can test the webhook only with v1beta1 API and prepare scripts for v1. Actually, you will need to re-test snapshots after we do the rebase, so it might be better to wait.

Comment 6 Wei Duan 2020-12-22 11:31:56 UTC
We'd like to use this bz to track snapshot API upgrade for basic snapshot test.

Comment 7 Wei Duan 2021-01-11 10:00:11 UTC
To some snapshot regression tests on 4.7.0-0.nightly-2021-01-10-070949.
Marked as pass.

Comment 9 errata-xmlrpc 2021-02-24 15:41:57 UTC
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


Note You need to log in before you can comment on or make changes to this bug.