Bootstrap FreeKB - OpenShift - Create an SOS report
OpenShift - Create an SOS report

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

The sosreport (Red Hat 7) and sos report (Red Hat 8) commands are used to create a file that contains debugging information that can be provided to Red Hat support. 

Sometimes, Red Hat may want an sos report of an OpenShift server jump box. In this scenario, you will want to run the sosreport or sos report command on the command line of the jump box.

sos report

 

Or, if Red Hat wants some debugging information for an OpenShift node, use the oc get nodes command to return the list of nodes.

~]# oc get nodes
NAME                 STATUS    ROLES     AGE       VERSION
dev001-infra-4k6z9   Ready     infra     273d      v1.11.0+d4cacc0
dev001-master-0      Ready     master    273d      v1.11.0+d4cacc0
dev001-worker-5n4fj  Ready     worker    273d      v1.11.0+d4cacc0

 

The oc debug command to start a node in debug mode. This will provide you with a command line prompt in a "debug" pod in the node that can be used for debugging purposes.

~]# oc debug node/dev001-worker-5n4fj
Starting pod/dev001-worker-5n4fj-debug ...
sh-4.4#

 

Use the chroot command to become root with a bash shell.

sh-4.4# chroot /host bash

 

Issue the toolbox command.

[root@lab001-worker-hsjrp /]# toolbox

 

If you get something like this . . . 

[root@dev001-worker-4smgr /]# toolbox
Trying to pull registry.redhat.io/rhel9/support-tools:latest...
WARN[0060] Failed, retrying in 1s ... (1/3). Error: initializing source docker://registry.redhat.io/rhel9/support-tools:latest: pinging container registry registry.redhat.io: Get "https://registry.redhat.io/v2/": dial tcp 23.12.19.13:443: i/o timeout

 

You can create the /root/.toolboxrc file . . . 

vi /root/.toolboxrc

 

And update the /root/.toolboxrc file to contain something like this.

REGISTRY=registry.example.com
IMAGE=rhel8/support-tool

 

Use the sosreport command to create the SOS report, which should create a file such as sosreport-ip-<host IP address>-yyyy-mm-dd.tar.xz.

[root@lab001-worker-hsjrp /]# sosreport
Your sosreport has been generated and saved in:
  /host/var/tmp/sosreport-ip-10-0-132-143-111111-2022-07-13-ilulmnh.tar.xz

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 309546 in the box below so that we can be sure you are a human.