Bug 1782817

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, yinzhou
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1782814 Environment:
Last Closed: 2020-01-23 11:18:56 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: 1782814    
Bug Blocks:    

Description Maciej Szulik 2019-12-12 12:05:03 UTC
+++ This bug was initially created as a clone of Bug #1782814 +++

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.

--- Additional comment from Maciej Szulik on 2019-12-12 13:04:39 CET ---

Fixed in https://github.com/openshift/oc/pull/207

Comment 2 zhou ying 2019-12-23 03:22:23 UTC
confirmed with latest oc client, the issue has fixed:

[zhouying@dhcp-140-138 ~]$ oc version -o yaml
clientVersion:
  buildDate: "2019-12-20T11:26:44Z"
  compiler: gc
  gitCommit: 6a937dfe56ff26255d09702c69b8406040c14505
  gitTreeState: clean
  gitVersion: v4.3.0
  goVersion: go1.12.12
  major: ""
  minor: ""
  platform: linux/amd64


Make sure node certificate expired, then use `oc adm inspect` command:

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

I1223 11:15:45.593681   12615 request.go:538] Throttling request took 725.851113ms, request: GET:https://api.xxxx:6443/api/v1/namespaces/openshift-multus/pods/multus-24mmh/log?container=multus-binary-copy&insecureSkipTLSVerifyBackend=true&previous=true&timestamps=true

Comment 4 errata-xmlrpc 2020-01-23 11:18:56 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:0062