mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +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
|
done
|
||||||
|
|
||||||
failed_nodes=()
|
failed_nodes=()
|
||||||
for node in "${NON_LOGEXPORTED_NODES[@]:-}"; do
|
# The following if is needed, because defaulting for empty arrays
|
||||||
echo "Logexporter didn't succeed on node ${node}. Queuing it for logdump through SSH."
|
# seems to treat them as non-empty with single empty string.
|
||||||
failed_nodes+=("${node}")
|
if [[ -n "${NON_LOGEXPORTED_NODES:-}" ]]; then
|
||||||
done
|
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.
|
# Delete the logexporter resources and dump logs for the failed nodes (if any) through SSH.
|
||||||
"${KUBECTL}" get pods --namespace "${logexporter_namespace}" || true
|
"${KUBECTL}" get pods --namespace "${logexporter_namespace}" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user