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.service
service logs from the bootstrap host using thejournalctl
command by running:journalctl -b -f -u bootkube.service
$ journalctl -b -f -u bootkube.service
Copy 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; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, collect the host’s container logs using the
tail
command by running:tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
# tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the
kubelet.service
andcrio.service
service logs from the master and worker hosts using thejournalctl
command by running:journalctl -b -f -u kubelet.service -u crio.service
$ journalctl -b -f -u kubelet.service -u crio.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the master and worker host container logs using the
tail
command by running:sudo tail -f /var/log/containers/*
$ sudo tail -f /var/log/containers/*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow