smengcl commented on code in PR #5011:
URL: https://github.com/apache/ozone/pull/5011#discussion_r1249425460
##########
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:
IIUC, with the changes in this PR:
1. `copy_daemon_logs` and `stop_docker_env` calls are removed from
`execute_robot_test()`
2. `copy_daemon_logs` is now called by `stop_docker_env()`
3. `stop_docker_env` is now called from `start_docker_env()`
Thus whoever calls `start_docker_env` **_last_** would have to call
`stop_docker_env` in order to have the logs collected, right?
--
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]