adoroszlai commented on code in PR #10722:
URL: https://github.com/apache/ozone/pull/10722#discussion_r3564049891
##########
hadoop-ozone/dist/src/main/compose/common/replicas-test.sh:
##########
@@ -66,6 +66,23 @@ for dn_container in ${datanodes}; do
wait_for_datanode "${dn_container}" HEALTHY 60
done
+# A datanode reporting HEALTHY only means SCM sees its heartbeat again; the
+# write pipelines it belonged to are not necessarily re-established yet. Wait
+# for an OPEN RATIS THREE pipeline before running the debug test, whose
+# "Write keys" suite setup writes RATIS THREE and EC keys and otherwise fails
+# with a non-zero exit when no pipeline is available after the restart above.
+echo "Waiting for an OPEN RATIS THREE pipeline before writing keys"
+SECONDS=0
+until [[ "$(docker-compose exec -T ${SCM} bash -c \
+ "ozone admin pipeline list --state OPEN --type RATIS --replication THREE
--json" 2>/dev/null \
+ | jq -r 'length')" -ge 1 ]]; do
+ if [[ $SECONDS -ge 180 ]]; then
+ echo "Timed out waiting for an OPEN RATIS THREE pipeline" >&2
+ exit 1
+ fi
+ sleep 2
+done
Review Comment:
Please add a function in `testlib.sh` for single check for pipeline (e.g.
`pipeline_exists`), and use `retry` to repeat it.
```bash
RETRY_ATTEMPTS=60 retry pipeline_exists RATIS THREE
```
--
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]