Skip to content

Commit

Permalink
HDDS-11186. First container log missing from bundle (#6952)
Browse files Browse the repository at this point in the history
(cherry picked from commit e01a57d)
  • Loading branch information
adoroszlai authored and xichen01 committed Jul 18, 2024
1 parent 955619b commit 2b67ac9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hadoop-ozone/dist/src/main/compose/testlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,10 @@ get_output_name() {

save_container_logs() {
local output_name=$(get_output_name)
local c
for c in $(docker-compose ps "$@" | cut -f1 -d' ' | tail -n +3); do
docker logs "${c}" >> "$RESULT_DIR/docker-${output_name}${c}.log" 2>&1
local id
for i in $(docker-compose ps -a -q "$@"); do
local c=$(docker ps -a --filter "id=${i}" --format "{{ .Names }}")
docker logs "${i}" >> "$RESULT_DIR/docker-${output_name}${c}.log" 2>&1
done
}

Expand Down

0 comments on commit 2b67ac9

Please sign in to comment.