1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-06 07:27:28 +00:00
kata-containers/tools/packaging/kata-debug/debug.sh
Fabiano Fidêncio 38a7b5325f packaging/tools: Add kata-debug
kata-debug is a tool that is used as part of the Kata Containers CI to gather
information from the node, in order to help debugging issues with Kata
Containers.

As one can imagine, this can be expanded and used outside of the CI context,
and any contribution back to the script is very much welcome.

The resulting container is stored at the [Kata Containers quay.io
space](https://quay.io/repository/kata-containers/kata-debug) and can
be used as shown below:
```sh
kubectl debug $NODE_NAME -it --image=quay.io/kata-containers/kata-debug:latest
```

Fixes: 

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-21 14:05:30 +02:00

24 lines
634 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
echo "Let's gather Kata Containers debug information"
echo ""
echo "::group::Check Kata Containers logs"
chroot /host /bin/bash -c "sudo journalctl -xe -t kata | tee"
echo "::endgroup::"
echo ""
echo "::group::Checking the loaded kernel modules"
chroot /host /bin/bash -c "sudo lsmod"
echo "::endgroup::"
echo ""
echo "::group::Check Kata Containers deployed binaries"
tree /host/opt/kata /host/usr/local/bin
echo "::endgroup::"
echo ""
echo "::group:: Check node's dmesg"
chroot /host /bin/bash -c "sudo dmesg"
echo "::endgroup::"