Bug 1816477 - [DDF] The commands to identify PVCs for cephfs, cephrbd and noobaa don't work.
Summary: [DDF] The commands to identify PVCs for cephfs, cephrbd and noobaa don't work.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenShift Container Storage
Classification: Red Hat Storage
Component: documentation
Version: 4.2
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: ---
Assignee: Erin Donnelly
QA Contact: Anna Sandler
URL:
Whiteboard:
Depends On:
Blocks: 1826040
TreeView+ depends on / blocked
 
Reported: 2020-03-24 05:02 UTC by Direct Docs Feedback
Modified: 2020-05-14 10:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 19:39:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Direct Docs Feedback 2020-03-24 05:02:07 UTC
These commands don't seem to work. 

In my experiments, I found that the string after double equal sign cannot be in double quotes. JsonPath recommends that strings in filter expressions be single quoted. 

What worked for me though, is replacing the double equal sign with a " CONTAINS " filter.

Reported by: rtalur

https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.2/html/deploying_openshift_container_storage/uninstalling-openshift-container-storage_rhocs#annotations:615af246-8366-44a8-bdfd-18be800760f6

Comment 5 Anna Sandler 2020-05-04 16:35:52 UTC
yes, the command 
oc get pvc -o=jsonpath='{range .items[?(@.spec.storageClassName=='ocs-storagecluster-ceph-rbd')]}{"Name: "}{@.metadata.name}{" Namespace: "}{@.metadata.namespace}{"\n"}{end}' --all-namespaces|grep -v db-noobaa-core-0 
doesnt work because what happeins is that this part is seen like one full quote '{range .items[?(@.spec.storageClassName=='

this is the correct one:
oc get pvc -o=jsonpath='{range .items[?(@.spec.storageClassName=="ocs-storagecluster-ceph-rbd")]}{"Name: "}{@.metadata.name}{" Namespace: "}{@.metadata.namespace}{"\n"}{end}' --all-namespaces|grep -v db-noobaa-core-0


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