Bug 1800477 - 'oc get volumesnapshotcontent' should show deletionPolicy/driver/volumeSnapshotClassName/volumeSnapshotRef info
Summary: 'oc get volumesnapshotcontent' should show deletionPolicy/driver/volumeSnapsh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Christian Huffman
QA Contact: Wei Duan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-07 08:08 UTC by Liang Xia
Modified: 2020-07-13 17:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Included additional details when querying VolumeSnapshotContent resources. Reason: The `oc get` information only displayed the name and creation time of the resource. Result: Now the `oc get` information includes additional details, such as the associated VolumeSnapshot, VolumeSnapshotClass, and other relevant information.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:14:25 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 30 0 None closed Bug 1800437, Bug 1800470, Bug 1800477: Update getters to match upstream 2020-11-10 01:17:32 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:14:49 UTC

Description Liang Xia 2020-02-07 08:08:35 UTC
Description of problem:
Request 'oc get volumesnapshotcontent' to show deletionPolicy/driver/volumeSnapshotClassName/volumeSnapshotRef info.
Currently, it only show name/age info.

Version-Release number of selected component (if applicable):
openshift-clients-4.4.0-202002052231.git.1.3433f68.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. oc get volumesnapshotcontent


Actual results:
$ oc get volumesnapshotcontent 
NAME                                               AGE
snapcontent-dfae1f79-5aba-4849-8d3f-5670728e2bf2   24m

$ oc get volumesnapshotcontent snapcontent-dfae1f79-5aba-4849-8d3f-5670728e2bf2 -o yaml
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotContent
metadata:
  creationTimestamp: "2020-02-07T07:36:29Z"
  finalizers:
  - snapshot.storage.kubernetes.io/volumesnapshotcontent-bound-protection
  generation: 1
  name: snapcontent-dfae1f79-5aba-4849-8d3f-5670728e2bf2
  resourceVersion: "119093"
  selfLink: /apis/snapshot.storage.k8s.io/v1beta1/volumesnapshotcontents/snapcontent-dfae1f79-5aba-4849-8d3f-5670728e2bf2
  uid: 733f258e-8690-4dad-b8d5-4a748b7a1cfe
spec:
  deletionPolicy: Delete
  driver: openshift-storage.rbd.csi.ceph.com
  source:
    volumeHandle: 0001-0011-openshift-storage-0000000000000001-9dd8bdb7-497a-11ea-91b3-0a580a81021a
  volumeSnapshotClassName: ceph-rbd-snap
  volumeSnapshotRef:
    apiVersion: snapshot.storage.k8s.io/v1beta1
    kind: VolumeSnapshot
    name: snapshot-1
    namespace: lxia-test
    resourceVersion: "119089"
    uid: dfae1f79-5aba-4849-8d3f-5670728e2bf2



Expected results:
'oc get volumesnapshotcontent' should show deletionPolicy/driver/volumeSnapshotClassName/volumeSnapshotRef info

$ oc get volumesnapshotcontent 
NAME                                               DELETION POLICY	DRIVER					VOLUMESNAPSHOT CLASS	VOLUMESNAPSHOT REF			AGE
snapcontent-dfae1f79-5aba-4849-8d3f-5670728e2bf2   Delete		openshift-storage.rbd.csi.ceph.com	ceph-rbd-snap		namespaces/name	of volumeSnapshotRef	24m


Additional info:
The relationship between VolumeSnapshot, VolumeSnapshotContent VolumeSnapshotClass is quite similiar to PersistentVolumeClaim/PersistentVolume/StorageClass.

Comment 1 Maciej Szulik 2020-02-10 13:42:24 UTC
The printing is defined on the server, the owners of the component are responsible for updating the printers on the server.
Moving to storage team to update.

Comment 2 Christian Huffman 2020-02-17 21:56:18 UTC
Upstream PR has been submitted at [1].

[1] https://github.com/kubernetes-csi/external-snapshotter/pull/256

Comment 3 Christian Huffman 2020-02-27 19:20:23 UTC
Upstream PR has been merged. I've submitted [1] to include this in the operator we ship.

[1] https://github.com/openshift/cluster-csi-snapshot-controller-operator/pull/30

Comment 8 Wei Duan 2020-03-23 08:21:54 UTC
@Huffman, verify pass but with one query about "SOURCESNAPSHOTCONTENT" in "oc get volumesnapshot", What does it mean? Thanks.


[wduan@MINT snapshot]$ oc get volumesnapshotclass
NAME                DRIVER               DELETIONPOLICY   AGE
csi-azuredisk-vsc   disk.csi.azure.com   Delete           14s


[wduan@MINT snapshot]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-03-22-224936   True        False         5h49m   Cluster version is 4.5.0-0.nightly-2020-03-22-224936

[wduan@MINT snapshot]$ oc get volumesnapshot
NAME                        READYTOUSE   SOURCEPVC       SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS       SNAPSHOTCONTENT                                    CREATIONTIME   AGE
azuredisk-volume-snapshot   true         pvc-azuredisk                           10Gi          csi-azuredisk-vsc   snapcontent-5aec90c0-ad3f-4e0d-8621-a3232d07a95e   31s            32s

[wduan@MINT snapshot]$ oc get volumesnapshotcontent
NAME                                               READYTOUSE   RESTORESIZE   DELETIONPOLICY   DRIVER               VOLUMESNAPSHOTCLASS   VOLUMESNAPSHOT              AGE
snapcontent-5aec90c0-ad3f-4e0d-8621-a3232d07a95e   true         10737418240   Delete           disk.csi.azure.com   csi-azuredisk-vsc     azuredisk-volume-snapshot   2m19s

[wduan@MINT snapshot]$ oc describe  volumesnapshot azuredisk-volume-snapshot
Name:         azuredisk-volume-snapshot
Namespace:    kube-system
Labels:       <none>
Annotations:  <none>
API Version:  snapshot.storage.k8s.io/v1beta1
Kind:         VolumeSnapshot
Metadata:
  Creation Timestamp:  2020-03-23T08:10:28Z
  Finalizers:
    snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection
    snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
  Generation:        1
  Resource Version:  129528
  Self Link:         /apis/snapshot.storage.k8s.io/v1beta1/namespaces/kube-system/volumesnapshots/azuredisk-volume-snapshot
  UID:               5aec90c0-ad3f-4e0d-8621-a3232d07a95e
Spec:
  Source:
    Persistent Volume Claim Name:  pvc-azuredisk
  Volume Snapshot Class Name:      csi-azuredisk-vsc
Status:
  Bound Volume Snapshot Content Name:  snapcontent-5aec90c0-ad3f-4e0d-8621-a3232d07a95e
  Creation Time:                       2020-03-23T08:10:29Z
  Ready To Use:                        true
  Restore Size:                        10Gi
Events:                                <none>

Comment 10 Wei Duan 2020-03-24 05:32:26 UTC
Got it, thanks.

Comment 12 errata-xmlrpc 2020-07-13 17:14:25 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, 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/RHBA-2020:2409


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