Error generating must-gather: No available strategies to copy
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
ocCLI- Must-gather
Issue
-
During must-gather collection, log messages like the following ones are shown:
gather output not downloaded: No available strategies to copyerror: unable to download output from pod must-gather-XXXXX: No available strategies to copyError running must-gather collection: unable to download output from pod must-gather-XXXXX: No available strategies to copy.WARNING: rsync command not found in path. Please use your package manager to install it. WARNING: cannot use tar: tar not available in container -
Running must-gather collection in Windows fails with the following message:
WARNING: rsync command not found in path. Download cwRsync for Windows and add it to your PATH.
Resolution
-
Install the
rsyncand/ortartool on local system running theoc adm must-gathercommand. The packages on Red Hat Enterprise Linux arersyncandtar:$ sudo yum install rsync tarNote: for Windows machines, as explained in the copying files to and from containers documenation, the
cwRsyncclient should be installed and added to thePATH. -
Run the must-gather command to collect data:
$ oc adm must-gather
Root Cause
The warning log is produced by the lack of the rsync and/or tar binary in the local machine where the oc adm must-gather command runs. It does not prevent the collection of the data, but the pulling of the data from the must-gather container.
More information about the execution and outcomes of oc adm must-gather can be found in the article must-gather copy strategies.
Diagnostic Steps
While collecting data with oc adm must-gather command the following warning log appears:
$ oc adm must-gather
[...]
error: unable to download output from pod must-gather-XXXXX: No available strategies to copy.
WARNING: rsync command not found in path. Please use your package manager to install it.
WARNING: cannot use tar: tar not available in container
WARNING: cannot use tar: tar not available in container
[must-gather-XXXXX] OUT gather output not downloaded: No available strategies to copy
[...]
Error running must-gather collection:
unable to download output from pod must-gather-XXXXX: No available strategies to copy.
[...]
ClusterOperators:
All healthy and stable
[...]
error: unable to download output from pod must-gather-XXXXX: No available strategies to copy.
Check if rsync and/or tar are installed, for example in RHEL:
$ which rsync
/usr/bin/which: no rsync in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/[user]/.local/bin:/home/[user]/bin)
$ which tar
/usr/bin/which: no tar in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/[user]/.local/bin:/home/[user]/bin)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.