Bug 1810959 - `oc adm inspect namespace` doesn't collect pod logs
Summary: `oc adm inspect namespace` doesn't collect pod logs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.z
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: 4.3.z
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On: 1810987
Blocks: 1810939
TreeView+ depends on / blocked
 
Reported: 2020-03-06 10:13 UTC by Ashish Ranjan
Modified: 2020-03-24 14:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-24 14:35:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 290 0 None closed Bug 1810959: `oc adm inspect namespace` doesn't collect pod logs 2020-03-19 20:40:06 UTC
Red Hat Bugzilla 1810939 0 urgent CLOSED [Tracking #1810959] must-gather with latest-4.3 doesn't collect openshift-storage pod logs 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:0858 0 None None None 2020-03-24 14:35:16 UTC

Description Ashish Ranjan 2020-03-06 10:13:12 UTC
Description of problem:
The `oc adm inspect namespace` doesn't collect logs of all pods running presently in the namespace. 

Version-Release number of selected component (if applicable):
v4.3.0

How reproducible:
Run `oc adm inspect ns/<ns-name>` for a namespace having more the 10 pods and verify the logs.


Actual results:
The logs are missing for some of the pods present in the namespace.

Expected results:
The logs must must be present for the pods present in the namespace.


Additional info:

Comment 3 zhou ying 2020-03-12 02:26:11 UTC
Confirmed with latest oc clients , the issue has fixed:
[root@dhcp-140-138 ~]# oc version -o yaml 
clientVersion:
  buildDate: "2020-03-11T06:07:36Z"
  compiler: gc
  gitCommit: 62c8ccacf15e6e26b428c818b1a319384ad0b57e
  gitTreeState: clean
  gitVersion: 4.3.6-202003110601-62c8cca
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64


[root@dhcp-140-138 ~]# oc get po -n zhouy
NAME               READY   STATUS      RESTARTS   AGE
ruby-ex-1-build    0/1     Completed   0          18m
ruby-ex-1-deploy   0/1     Completed   0          17m
ruby-ex-2-4rlzj    1/1     Running     0          14m
ruby-ex-2-build    0/1     Completed   0          15m
ruby-ex-2-deploy   0/1     Completed   0          14m
[root@dhcp-140-138 ~]# oc logs -f po/ruby-ex-2-4rlzj -n zhouy
[1] Puma starting in cluster mode...
[1] * Version 3.12.0 (ruby 2.5.5-p157), codename: Llamas in Pajamas
[1] * Min threads: 0, max threads: 16
[1] * Environment: production
[1] * Process workers: 2
[1] * Phased restart available
[1] * Listening on tcp://0.0.0.0:8080
[1] Use Ctrl-C to stop
[1] - Worker 1 (pid: 18) booted, phase: 0
[1] - Worker 0 (pid: 16) booted, phase: 0


[root@dhcp-140-138 ~]# cat inspect.local.6490309304484978702/namespaces/zhouy/pods/ruby-ex-2-4rlzj/ruby-ex/ruby-ex/logs/current.log 
2020-03-12T02:10:10.61555874Z [1] Puma starting in cluster mode...
2020-03-12T02:10:10.61555874Z [1] * Version 3.12.0 (ruby 2.5.5-p157), codename: Llamas in Pajamas
2020-03-12T02:10:10.61555874Z [1] * Min threads: 0, max threads: 16
2020-03-12T02:10:10.61555874Z [1] * Environment: production
2020-03-12T02:10:10.61555874Z [1] * Process workers: 2
2020-03-12T02:10:10.61555874Z [1] * Phased restart available
2020-03-12T02:10:10.61555874Z [1] * Listening on tcp://0.0.0.0:8080
2020-03-12T02:10:10.61555874Z [1] Use Ctrl-C to stop
2020-03-12T02:10:10.655172987Z [1] - Worker 1 (pid: 18) booted, phase: 0
2020-03-12T02:10:10.665735875Z [1] - Worker 0 (pid: 16) booted, phase: 0

Comment 5 errata-xmlrpc 2020-03-24 14:35:06 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:0858


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