Bug 1816477

Summary: [DDF] The commands to identify PVCs for cephfs, cephrbd and noobaa don't work.
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Direct Docs Feedback <ddf-bot>
Component: documentationAssignee: Erin Donnelly <edonnell>
Status: CLOSED NOTABUG QA Contact: Anna Sandler <asandler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2CC: asandler, asriram, ebenahar, ocs-bugs, rtalur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 19:39:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1826040    

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