Bug 1702353

Summary: must-gather should be based on cli image so that cli commands can be run in scripts.
Product: OpenShift Container Platform Reporter: Eric Rich <erich>
Component: MasterAssignee: Luis Sanchez <sanchezl>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jokerman, mfojtik, mmccomas, yinzhou
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:47:50 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:

Description Eric Rich 2019-04-23 14:44:17 UTC
Description of problem: Today the only binary we can take advantage of within our 'gather' script of the must-gather images is the openshift-must-gather binary. 

It would help (us extend capabilities) if the image was based on the cli images (as we could do one-off data collection pieces) or use oc adm commands. 


Version-Release number of selected component (if applicable): 4.1


https://coreos.slack.com/archives/CFDM5CQMN/p1555965429018700

>David Eads
>@Luis Sanchez There should be a blocker bug for using the CLI image (there is a jira card). I think it's updated here: https://github.com/openshift/must-gather/blob/master/Dockerfile#L7 so that @Eric stops bugging us

Comment 1 Luis Sanchez 2019-04-25 17:10:42 UTC
Fixed with https://github.com/openshift/release/pull/3560

Can verify that oc is available by running (for example):

oc adm must-gather -- /bin/bash -c 'oc > /must-gather/help.txt'

Comment 2 zhou ying 2019-05-09 05:54:52 UTC
Confirmed with latest ocp , the issue has fixed:
[root@dhcp-140-138 home]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-0.nightly-2019-05-08-131137   True        False         122m    Cluster version is 4.1.0-0.nightly-2019-05-08-131137


[root@dhcp-140-138 home]# oc adm must-gather -- /bin/bash -c 'oc > /must-gather/help.txt'
namespace/openshift-must-gather-rpsxf created
clusterrolebinding.rbac.authorization.k8s.io/must-gather-ccndq created
receiving incremental file list
created directory must-gather.local.4335995885763405327
./
help.txt

sent 46 bytes  received 1,233 bytes  511.60 bytes/sec
total size is 1,123  speedup is 0.88
clusterrolebinding.rbac.authorization.k8s.io/must-gather-ccndq deleted
namespace/openshift-must-gather-rpsxf deleted

Comment 4 errata-xmlrpc 2019-06-04 10:47:50 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-2019:0758