mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #65694 from wojtek-t/fix_logexporter
Automatic merge from submit-queue (batch tested with PRs 65094, 65533, 63522, 65694, 65702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix dumping logs with logexporter
This commit is contained in:
commit
165b8dab14
@ -365,10 +365,14 @@ function dump_nodes_with_logexporter() {
|
||||
done
|
||||
|
||||
failed_nodes=()
|
||||
for node in "${NON_LOGEXPORTED_NODES[@]:-}"; do
|
||||
echo "Logexporter didn't succeed on node ${node}. Queuing it for logdump through SSH."
|
||||
failed_nodes+=("${node}")
|
||||
done
|
||||
# The following if is needed, because defaulting for empty arrays
|
||||
# seems to treat them as non-empty with single empty string.
|
||||
if [[ -n "${NON_LOGEXPORTED_NODES:-}" ]]; then
|
||||
for node in "${NON_LOGEXPORTED_NODES[@]:-}"; do
|
||||
echo "Logexporter didn't succeed on node ${node}. Queuing it for logdump through SSH."
|
||||
failed_nodes+=("${node}")
|
||||
done
|
||||
fi
|
||||
|
||||
# Delete the logexporter resources and dump logs for the failed nodes (if any) through SSH.
|
||||
"${KUBECTL}" get pods --namespace "${logexporter_namespace}" || true
|
||||
|
Loading…
Reference in New Issue
Block a user