Bug 1854388

Summary: must-gather very often fails on timeout
Product: OpenShift Container Platform Reporter: Artyom <alukiano>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: medium    
Version: 4.6CC: aos-bugs, dshchedr, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:12:24 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 Artyom 2020-07-07 11:41:30 UTC
Description of problem:
Running the command 
oc adm must-gather --image=registry.stage.redhat.io/openshift4/performance-addon-operator-must-gather-rhel8
on the first try ends with the error
[must-gather      ] OUT namespace/openshift-must-gather-7z6lf deleted
error: gather did not start for pod must-gather-7tkkg: timed out waiting for the condition

The command ended on timeout because it takes time to fetch the new image and it does not look that the timeout argument works properly.

Under the code, I can see that we provide arguments in the wrong order - https://github.com/openshift/oc/blob/41ac95217bc52c10b114d2f5d9225ebd0c59e694/pkg/cli/admin/mustgather/mustgather.go#L428, we provide the timeout as the first argument when it should be the interval.

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

How reproducible:
Always

Steps to Reproduce:
1. Run 
oc adm must-gather --image=registry.stage.redhat.io/openshift4/performance-addon-operator-must-gather-rhel8
2.
3.

Actual results:
On the first try, the command is failing on the timeout after the minute when the default timeout is 10 minutes.

Expected results:
The command should succeed or fail only after 10 minutes.

Additional info:

Comment 4 zhou ying 2020-07-14 10:04:05 UTC
Can't reproduce the issue with [root@dhcp-140-138 ~]# oc version --client
Client Version: 4.6.0-202007100531.p0-9060d2f
. 


[root@dhcp-140-138 ~]# oc adm must-gather --image=registry.stage.redhat.io/openshift4/performance-addon-operator-must-gather-rhel8   --node-name='ying0714-5xwxf-master-0'
[must-gather      ] OUT Using must-gather plugin-in image: registry.stage.redhat.io/openshift4/performance-addon-operator-must-gather-rhel8
[must-gather      ] OUT namespace/openshift-must-gather-q6hb4 created
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-blqsq created
.....
[must-gather-zcvcv] OUT nodes/ying0714-5xwxf-worker-2/ying0714-5xwxf-worker-2_logs_kubelet
[must-gather-zcvcv] OUT 
[must-gather-zcvcv] OUT sent 774 bytes  received 272,863,222 bytes  3,267,832.29 bytes/sec
[must-gather-zcvcv] OUT total size is 272,793,297  speedup is 1.00
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-blqsq deleted
[must-gather      ] OUT namespace/openshift-must-gather-q6hb4 deleted

Comment 6 errata-xmlrpc 2020-10-27 16:12:24 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 (OpenShift Container Platform 4.6 GA Images), 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:4196