Error generating must-gather: No available strategies to copy

Solution Verified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • oc CLI
  • Must-gather

Issue

  • During must-gather collection, log messages like the following ones are shown:

    gather output not downloaded: No available strategies to copy
    
    error: unable to download output from pod must-gather-XXXXX: No available strategies to copy
    
    Error 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

  1. Install the rsync and/or tar tool on local system running the oc adm must-gather command. The packages on Red Hat Enterprise Linux are rsync and tar:

    $ sudo yum install rsync tar
    

    Note: for Windows machines, as explained in the copying files to and from containers documenation, the cwRsync client should be installed and added to the PATH.

  2. 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)
SBR
Components
Category

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.