This is an automated email from the ASF dual-hosted git repository.
sammichen 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 7e9d3c0473 HDDS-8985. Intermittent timeout exiting safe mode in HA
secure tests (#5033)
7e9d3c0473 is described below
commit 7e9d3c04734a16d73cfcd0d2c157577327008ff8
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sun Jul 9 13:27:18 2023 +0200
HDDS-8985. Intermittent timeout exiting safe mode in HA secure tests (#5033)
---
hadoop-ozone/dist/src/main/compose/testlib.sh | 38 +++++----------------------
1 file changed, 7 insertions(+), 31 deletions(-)
diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh
b/hadoop-ozone/dist/src/main/compose/testlib.sh
index 085f448dea..83a8dd6b3b 100755
--- a/hadoop-ozone/dist/src/main/compose/testlib.sh
+++ b/hadoop-ozone/dist/src/main/compose/testlib.sh
@@ -72,38 +72,14 @@ find_tests(){
## @description wait until safemode exit (or 240 seconds)
wait_for_safemode_exit(){
- # version-dependent
- : ${OZONE_SAFEMODE_STATUS_COMMAND:=ozone admin safemode status --verbose}
-
- #Reset the timer
- SECONDS=0
-
- #Don't give it up until 240 seconds
- while [[ $SECONDS -lt 240 ]]; do
-
- #This line checks the safemode status in scm
- local command="${OZONE_SAFEMODE_STATUS_COMMAND}"
- if [[ "${SECURITY_ENABLED}" == 'true' ]]; then
- status=$(docker-compose exec -T ${SCM} bash -c "kinit -k
HTTP/[email protected] -t /etc/security/keytabs/HTTP.keytab && $command" || true)
- else
- status=$(docker-compose exec -T ${SCM} bash -c "$command")
- fi
-
- echo "SECONDS: $SECONDS"
-
- echo $status
- if [[ "$status" ]]; then
- if [[ ${status} == "SCM is out of safe mode." ]]; then
- #Safemode exits. Let's return from the function.
- echo "Safe mode is off"
- return
- fi
- fi
+ local cmd="ozone admin safemode wait -t 240"
+ if [[ "${SECURITY_ENABLED}" == 'true' ]]; then
+ wait_for_port kdc 88 60
+ cmd="kinit -k HTTP/[email protected] -t /etc/security/keytabs/HTTP.keytab
&& $cmd"
+ fi
- sleep 2
- done
- echo "WARNING! Safemode is still on. Please check the docker-compose files"
- return 1
+ wait_for_port ${SCM} 9860 120
+ execute_commands_in_container ${SCM} "$cmd"
}
## @description wait until OM leader is elected (or 120 seconds)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]