How to collect ODF must-gather in a Disconnected Environment?
Environment
- Red Hat Openshift Data Foundation (RHODF)
- 4
Issue
- Running
oc adm must-gatherin a disconnected environment, the command fails withErrImagePull
Resolution
It is needed to mirror the ODF must-gather image to the disconnected registry. A manual way for doing it is described below. It is also possible to copy the image to the control plane nodes following the same procedure.
-
While ssh'd into the node hosting the internal image registry:
a. Pull the image with
podmanordocker(please specify your current ODF version in place of "4.x"):# podman pull registry.redhat.io/odf4/odf-must-gather-rhel9:v4.xb. Get the image ID
# podman images | grep must-gather registry.redhat.io/ocs4/ocs-must-gather-rhel8 v4.7 84c712fdc2d1 5 weeks ago 466 MBc. Save the image to a tar file
# podman save 84c712fdc2d1 -o ocsmg.tard. Load the image to the disconnected registry
# podman load < ocsmg.tar
Note: if the mirror registry doesn't have connectivity to
registry.redhat.io, it will be needed to pull the image in a different machine and then copy it to the mirror registry or directly to the OpenShift control plane nodes.
-
Run must-gather
$ oc adm must-gather --image=my/image:tag
If it is not possible to copy the image to the mirror or to the nodes, it is still possible to collect ODF data as explained in capturing Data via CLI Terminal When The OpenShift Data Foundation Must-Gather Fails.
Root Cause
It is possible to manually copy the image to the registry or even to the control plane nodes with podman save and podman load.
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.