Bug 1858188

Summary: [OCS 4.3, 4.4 and 4.5][DDF] $ oc logs csi-rbdplugin-d98dz command return error as pod has multiple containers
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Direct Docs Feedback <ddf-bot>
Component: documentationAssignee: Disha Walvekar <dwalveka>
Status: CLOSED CURRENTRELEASE QA Contact: Neha Berry <nberry>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: assingh, dwalveka, mrajanna, nberry, ocs-bugs
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: 2021-08-25 14:53:33 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: 1889244    

Description Direct Docs Feedback 2020-07-17 07:07:04 UTC
$ oc logs csi-rbdplugin-d98dz 
Error from server (BadRequest): a container name must be specified for pod csi-rbdplugin-d98dz, choose one of: [driver-registrar csi-rbdplugin liveness-prometheus]

Since we have multiple containers inside particular pod, we need to specify the required container OR all containers.

If so, we need exact commands documented for all the log collection commands stated in 

section :
Chapter 3. Commonly required logs for troubleshooting



Reported by: rhn-support-jjose

https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.4/html/troubleshooting_openshift_container_storage/commonly-required-logs_rhocs#annotations:895dd99e-5268-4d0d-82f1-3c7583e0c378

Comment 7 Neha Berry 2020-10-27 14:35:15 UTC
Thanks Disha,

Few change requests

1. Typo in below command in all the 3 guides 

>> Generating logs for plugin pods like cephfs or rbd to detect any problem in the PVC mount of the app-pod:

>> $ oc logs csi-cephfsplugin-<ID> -n openshift-storage -c csi-cephfsplug 

>> Correct : $ oc logs csi-cephfsplugin-<ID> -n openshift-storage -c csi-cephfsplugin

2. Please add the same information/content to OCS 4.6 docs too.

Moving to assigned state, while requesting above changes

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Current content
----------------------

Generating logs for plugin pods like cephfs or rbd to detect any problem in the PVC mount of the app-pod:

$ oc logs csi-cephfsplugin-<ID> -n openshift-storage -c csi-cephfsplug
$ oc logs csi-rbdplugin-<ID> -n openshift-storage -c csi-rbdplugin
To generate logs for all the containers in the CSI pod:

$ oc logs csi-cephfsplugin-<ID> -n openshift-storage --all-containers
$ oc logs csi-rbdplugin-<ID> -n openshift-storage --all-containers
Generating provisioner cephfs or rbd logs if PVC is not in BOUND state

$ oc logs csi-cephfsplugin-provisioner-<ID> -n openshift-storage -c csi-cephfsplugin
$ oc logs csi-rbdplugin-provisioner-<ID> -n openshift-storage -c csi-rbdplugin
To generate logs for all the containers in the CSI pod:

$ oc logs csi-cephfsplugin-provisioner-<ID> -n openshift-storage --all-containers
$ oc logs csi-rbdplugin-provisioner-<ID> -n openshift-storage --all-containers

Comment 9 Neha Berry 2020-10-29 16:25:59 UTC
NP Disha

Thanks for making the changes and  adding in OCS 4.6 docs as well

One query

Can we rephrase this to align with other steps?

Generating provisioner cephfs or rbd logs if PVC is not in BOUND state

to

Generating logs for cephfs or rbd provisioner pods to detect problems if PVC is not in BOUND state



Thanks