Bug 1726583

Summary: `oc adm must-gather` command contain errors
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Luis Sanchez <sanchezl>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jokerman, maszulik, mfojtik, sttts, tnozicka
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-13 21:51:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
full err info none

Description zhou ying 2019-07-03 08:43:07 UTC
Description of problem:
When run `oc adm must-gather` command, see errors like: unable to gather container /healthz: forbidden: User "system:anonymous" cannot get path "/healthz/log", unable to gather container /metrics: forbidden: Use
r "system:anonymous" cannot get path "/metrics"

Version-Release number of selected component (if applicable):
[root@dhcp-140-138 ose]# oc version --short
Client Version: v4.1.4
Server Version: v1.13.4+c3b23cb
Payload: 4.1.0-0.nightly-2019-07-02-101812

How reproducible:
Always

Steps to Reproduce:
1. Export the KUBECONFIG;
2. Run command `oc adm must-gather` command;

Actual results:
2. Will see errors like :
[unable to gather container /healthz: forbidden: User "system:anonymous" cannot get path "/healthz/log", unable to gather container /metrics: forbidden: User "system:anonymous" cannot get path "/metrics"], one o
r more errors ocurred while gathering pod-specific data for namespace: openshift-apiserver

Expected results:
2. No errors.



Additional info:

Comment 1 zhou ying 2019-07-03 08:46:06 UTC
Created attachment 1586980 [details]
full err info

Comment 2 Tomáš Nožička 2019-07-04 16:40:27 UTC
can you verify you are logged in? (I am not sure which of those endpoints are authenticated from top of my head)
`oc whoami`?

Comment 4 zhou ying 2019-07-10 09:43:25 UTC
[root@dhcp-140-138 ~]# oc whoami 
kube:admin

Comment 6 Maciej Szulik 2020-02-25 14:34:54 UTC
I think this should be working fine by now, moving to qa for verification.

Comment 9 zhou ying 2020-02-26 10:11:48 UTC
Confirmed with latest oc client, can't reproduce the issue now:
[root@dhcp-140-138 ~]# oc version -o yaml 
clientVersion:
  buildDate: "2020-02-21T10:22:28Z"
  compiler: gc
  gitCommit: 9353dc4631653a8de08d4b2508f1820a1fd0f15e
  gitTreeState: clean
  gitVersion: v4.4.0
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64

Comment 11 errata-xmlrpc 2020-05-13 21:51:51 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:0581