28.3. Manually gathering logs with SSH access to your host(s)
Manually gather logs in situations where must-gather or automated collection methods do not work.
By default, SSH access to the OpenShift Container Platform nodes is disabled on the Red Hat OpenStack Platform (RHOSP) based installations.
Conditions préalables
- You must have SSH access to your host(s).
Procédure
Collect the
bootkube.serviceservice logs from the bootstrap host using thejournalctlcommand by running:journalctl -b -f -u bootkube.service
$ journalctl -b -f -u bootkube.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the bootstrap host’s container logs using the podman logs. This is shown as a loop to get all of the container logs from the host:
for pod in $(sudo podman ps -a -q); do sudo podman logs $pod; done
$ for pod in $(sudo podman ps -a -q); do sudo podman logs $pod; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, collect the host’s container logs using the
tailcommand by running:tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
# tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.logCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the
kubelet.serviceandcrio.serviceservice logs from the master and worker hosts using thejournalctlcommand by running:journalctl -b -f -u kubelet.service -u crio.service
$ journalctl -b -f -u kubelet.service -u crio.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the master and worker host container logs using the
tailcommand by running:sudo tail -f /var/log/containers/*
$ sudo tail -f /var/log/containers/*Copy to Clipboard Copied! Toggle word wrap Toggle overflow