Bug 1782814 - oc adm inspect should use the InsecureSkipTLSVerifyBackend to scrape the logs when possible
Summary: oc adm inspect should use the InsecureSkipTLSVerifyBackend to scrape the logs...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.4.0
Assignee: Maciej Szulik
QA Contact: zhou ying
Depends On:
Blocks: 1782817
TreeView+ depends on / blocked
Reported: 2019-12-12 12:02 UTC by Maciej Szulik
Modified: 2020-05-04 11:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1782817 (view as bug list)
Last Closed: 2020-05-04 11:19:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:20:27 UTC

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 
  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.


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