Add some commands to get more partition info when setting up the GH action runner's disk for use in integration tests. This will both aid in debugging and may "jog" the system such that it will no longer need to reload the partition info when running the OSD prepare job. Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
37 lines
2.1 KiB
Bash
Executable File
37 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
# User parameters
|
|
: "${CLUSTER_NAMESPACE:="rook-ceph"}"
|
|
: "${OPERATOR_NAMESPACE:="$CLUSTER_NAMESPACE"}"
|
|
: "${LOG_DIR:="test"}"
|
|
|
|
LOG_DIR="${LOG_DIR%/}" # remove trailing slash if necessary
|
|
mkdir -p "${LOG_DIR}"
|
|
|
|
CEPH_CMD="kubectl -n ${CLUSTER_NAMESPACE} exec deploy/rook-ceph-tools -- ceph --connect-timeout 3"
|
|
|
|
$CEPH_CMD -s > "${LOG_DIR}"/ceph-status.txt
|
|
$CEPH_CMD osd dump > "${LOG_DIR}"/ceph-osd-dump.txt
|
|
$CEPH_CMD report > "${LOG_DIR}"/ceph-report.txt
|
|
|
|
kubectl -n "${OPERATOR_NAMESPACE}" logs deploy/rook-ceph-operator > "${LOG_DIR}"/operator-logs.txt
|
|
kubectl -n "${OPERATOR_NAMESPACE}" get pods -o wide > "${LOG_DIR}"/operator-pods-list.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" get pods -o wide > "${LOG_DIR}"/cluster-pods-list.txt
|
|
prepare_job="$(kubectl -n "${CLUSTER_NAMESPACE}" get job -l app=rook-ceph-osd-prepare --output name | awk 'FNR <= 1')" # outputs job/<name>
|
|
kubectl -n "${CLUSTER_NAMESPACE}" describe "${prepare_job}" > "${LOG_DIR}"/osd-prepare-describe.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" logs "${prepare_job}" > "${LOG_DIR}"/osd-prepare-logs.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" describe deploy/rook-ceph-osd-0 > "${LOG_DIR}"/rook-ceph-osd-0-describe.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" describe deploy/rook-ceph-osd-1 > "${LOG_DIR}"/rook-ceph-osd-1-describe.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" logs deploy/rook-ceph-osd-0 --all-containers > "${LOG_DIR}"/rook-ceph-osd-0-logs.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" logs deploy/rook-ceph-osd-1 --all-containers > "${LOG_DIR}"/rook-ceph-osd-1-logs.txt
|
|
kubectl get all -n "${OPERATOR_NAMESPACE}" -o wide > "${LOG_DIR}"/operator-wide.txt
|
|
kubectl get all -n "${OPERATOR_NAMESPACE}" -o wide > "${LOG_DIR}"/operator-yaml.txt
|
|
kubectl get all -n "${CLUSTER_NAMESPACE}" -o wide > "${LOG_DIR}"/cluster-wide.txt
|
|
kubectl get all -n "${CLUSTER_NAMESPACE}" -o yaml > "${LOG_DIR}"/cluster-yaml.txt
|
|
kubectl -n "${CLUSTER_NAMESPACE}" get cephcluster -o yaml > "${LOG_DIR}"/cephcluster.txt
|
|
sudo lsblk | sudo tee -a "${LOG_DIR}"/lsblk.txt
|
|
journalctl -o short-precise --dmesg > "${LOG_DIR}"/dmesg.txt
|
|
journalctl > "${LOG_DIR}"/journalctl.txt
|