Skip to content

Commit

Permalink
HDDS-11186. First container log missing from bundle (apache#6952)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai authored Jul 17, 2024
1 parent abf3a0a commit e01a57d
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 -a "$@" | 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 e01a57d

Please sign in to comment.