This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 3e70cf4165 HDDS-11106. Save logs for stopped containers (#6908)
3e70cf4165 is described below
commit 3e70cf4165995cca34195f18d610554948004967
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Jul 8 17:25:39 2024 +0200
HDDS-11106. Save logs for stopped containers (#6908)
---
hadoop-ozone/dist/src/main/compose/testlib.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh
b/hadoop-ozone/dist/src/main/compose/testlib.sh
index d4ad22e58e..ff676dc2a5 100755
--- a/hadoop-ozone/dist/src/main/compose/testlib.sh
+++ b/hadoop-ozone/dist/src/main/compose/testlib.sh
@@ -212,7 +212,7 @@ execute_robot_test(){
"$SMOKETEST_DIR_INSIDE/$TEST"
local -i rc=$?
- FULL_CONTAINER_NAME=$(docker-compose ps | grep "[-_]${CONTAINER}[-_]" | head
-n 1 | awk '{print $1}')
+ FULL_CONTAINER_NAME=$(docker-compose ps -a | grep "[-_]${CONTAINER}[-_]" |
head -n 1 | awk '{print $1}')
docker cp "$FULL_CONTAINER_NAME:$OUTPUT_PATH" "$RESULT_DIR/"
if [[ ${rc} -gt 0 ]] && [[ ${rc} -le 250 ]]; then
@@ -251,7 +251,7 @@ create_stack_dumps() {
## @description Copy any 'out' files for daemon processes to the result dir
copy_daemon_logs() {
local c f
- for c in $(docker-compose ps | grep "^${COMPOSE_ENV_NAME}[_-]" | awk '{print
$1}'); do
+ for c in $(docker-compose ps -a | grep "^${COMPOSE_ENV_NAME}[_-]" | awk
'{print $1}'); do
for f in $(docker exec "${c}" ls -1 /var/log/hadoop 2> /dev/null | grep -F
-e '.out' -e audit); do
docker cp "${c}:/var/log/hadoop/${f}" "$RESULT_DIR/"
done
@@ -305,7 +305,7 @@ 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
+ 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
done
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]