adoroszlai commented on code in PR #5011:
URL: https://github.com/apache/ozone/pull/5011#discussion_r1249433447
##########
hadoop-ozone/dist/src/main/compose/testlib.sh:
##########
@@ -158,13 +158,12 @@ start_docker_env(){
export OZONE_SAFEMODE_MIN_DATANODES="${datanode_count}"
docker-compose --ansi never down
- if ! { docker-compose --ansi never up -d --scale
datanode="${datanode_count}" \
- && wait_for_safemode_exit \
- && wait_for_om_leader ; }; then
- [[ -n "$OUTPUT_NAME" ]] || OUTPUT_NAME="$COMPOSE_ENV_NAME"
- stop_docker_env
- return 1
- fi
+
+ trap stop_docker_env EXIT HUP INT TERM
+
+ docker-compose --ansi never up -d --scale datanode="${datanode_count}"
Review Comment:
Thanks @smengcl for the review.
> whoever calls `start_docker_env` **_last_** would have to call
`stop_docker_env` in order to have the logs collected
It's like a `ShutdownHook` in Java. The shell calls `stop_docker_env` when
the test script exits. `start_docker_env` just sets it up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]