Bug 1782814

Summary: oc adm inspect should use the InsecureSkipTLSVerifyBackend to scrape the logs when possible
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, jokerman, mfojtik
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:
: 1782817 (view as bug list) Environment:
Last Closed: 2020-05-04 11:19:53 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:
Bug Depends On:    
Bug Blocks: 1782817    

Description Maciej Szulik 2019-12-12 12:02:07 UTC
InsecureSkipTLSVerifyBackend was backported to origin to be able to read the logs even when certificate is broken. This ensure that we can almost always read the logs.

Comment 1 Maciej Szulik 2019-12-12 12:04:39 UTC
Fixed in https://github.com/openshift/oc/pull/207

Comment 3 zhou ying 2019-12-18 06:51:01 UTC
Confirmed with latest oc client, the issue has fixed:

[root@dhcp-140-138 logs]# oc version -o yaml 
clientVersion:
  buildDate: "2019-12-16T10:31:48Z"
  compiler: gc
  gitCommit: ff590d4496deedc069232984c20b4e5159c43b28
  gitTreeState: clean
  gitVersion: v4.4.0
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64


oc adm inspect co network --loglevel=9 |& tee /tmp/ins

Check the logs, could see: 

I1218 14:16:29.653401   23210 request.go:538] Throttling request took 1.100721319s, request: GET:https://api.xiyuan-12167.qe.devcluster.openshift.com:6443/api/v1/namespaces/openshift-sdn/pods/ovs-8hhmr/log?container=openvswitch&insecureSkipTLSVerifyBackend=true&previous=true&timestamps=true
I1218 14:16:29.653482   23210 round_trippers.go:423] curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: oc/v0.0.0 (linux/amd64) kubernetes/$Format" 'https://api.xiyuan-12167.qe.devcluster.openshift.com:6443/api/v1/namespaces/openshift-sdn/pods/ovs-8hhmr/log?container=openvswitch&insecureSkipTLSVerifyBackend=true&previous=true&timestamps=true'

Comment 5 errata-xmlrpc 2020-05-04 11:19:53 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