ahitrin commented on code in PR #3210:
URL: https://github.com/apache/ignite-3/pull/3210#discussion_r1490539006
##########
packaging/zip/ignite3db:
##########
@@ -34,14 +36,26 @@ cd ${IGNITE_HOME} || exit
start() {
echo "Starting Ignite 3..."
+ STARTUP_LOG_FILE="${LOG_DIR}/ignite3db-startup.log"
+
CMD="${JAVA_CMD_WITH_ARGS} ${APPLICATION_ARGS}"
- $CMD >>/dev/null 2>&1 </dev/null & echo $! >${IGNITE_HOME}/pid
+ $CMD >>"${STARTUP_LOG_FILE}" 2>&1 </dev/null & echo $! >${IGNITE_HOME}/pid
rest_address_file=${WORK_DIR}/rest-address
- while [ ! -f "$rest_address_file" ]; do sleep 0.5; done
- rest_address=$(cat "$rest_address_file")
+ max_attempts=30
+ count=0
+ while [ ! -f "$rest_address_file" ] && [ "$count" -lt "$max_attempts" ]; do
+ sleep 1
+ count=$((count + 1))
+ done
- echo "Node named ${NODE_NAME} started successfully. REST addresses are
[$rest_address]"
+ if [ ! -f "$rest_address_file" ]; then
+ echo "Failure: Application did not start within the expected time frame.
Check out ${STARTUP_LOG_FILE}." >&2
Review Comment:
Optional: probably, there shouldn't be a dot after the log name (in order to
simplify copy-paste)
--
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]