Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collection-scripts/gather_ctlplane_resources
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ function gather_ctlplane_resources {
.metadata.name as $pod |
(.status |
(
if has("initContainerStatuses") then .initContainerStatuses[] else empty end |
if has("initContainerStatuses") then .initContainerStatuses[] | select(.state | has("running") or has("terminated")) else empty end |
"\($pod) \(.name) \(has("lastState") and (.lastState | has("terminated"))) true"
),
(
if has("containerStatuses") then .containerStatuses[] else empty end |
if has("containerStatuses") then .containerStatuses[] | select(.state | has("running") or has("terminated")) else empty end |
"\($pod) \(.name) \(has("lastState") and (.lastState | has("terminated"))) false"
)
)
Expand Down
14 changes: 8 additions & 6 deletions collection-scripts/gather_sos
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ gather_node_sos () {
mkdir -p \"${TMPDIR}\" && \
sudo podman rm --force toolbox-osp; \
sudo --preserve-env podman pull --authfile /var/lib/kubelet/config.json $SUPPORT_TOOLS && \
toolbox sos report --batch --all-logs $SOS_LIMIT --tmp-dir=\"${TMPDIR}\" && \
toolbox sos report --batch --all-logs $SOS_LIMIT --tmp-dir=\"/host${TMPDIR}\" && \
if [[ \"\$(ls /var/log/pods/*/{*.log.*,*/*.log.*} 2>/dev/null)\" != '' ]]; then tar --ignore-failed-read --warning=no-file-changed -cJf \"${TMPDIR}/podlogs.tar.xz\" --transform 's,^,podlogs/,' /var/log/pods/*/{*.log.*,*/*.log.*} || true; fi"

# shellcheck disable=SC2181
Expand Down Expand Up @@ -118,11 +118,13 @@ gather_node_sos () {

# if we are decompressing the sos report, remove the original sos archive
if [[ ${SOS_DECOMPRESS} -eq 1 ]]; then
mkdir "${SOS_PATH_NODES}/sosreport-$node"
tar -i --one-top-level="${SOS_PATH_NODES}/sosreport-$node" --strip-components=1 --exclude='*/dev/null' -Jxf "${sos_file}"
rm "${sos_file}"
# Ensure write access to the sos reports directories so must-gather rsync doesn't fail
chmod +w -R "${SOS_PATH_NODES}/sosreport-$node/"
if tar -i -C "${SOS_PATH_NODES}" --one-top-level="sosreport-$node" --strip-components=1 --exclude='*/dev/null' -Jxf "${sos_file}"; then
rm "${sos_file}"
# Ensure write access to the sos reports directories so must-gather rsync doesn't fail
chmod +w -R "${SOS_PATH_NODES}/sosreport-$node/"
else
echo "Failed to decompress SOS report for ${node}, keeping compressed archive"
fi
fi

sleep 1
Expand Down
1 change: 1 addition & 0 deletions pyscripts/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ envlist =
mypy
stestr
pytest
skip_missing_interpreters = true
skipsdist = true
passenv =
LANG
Expand Down
Loading