Skip to content

Commit 348f84e

Browse files
committed
fix: fly delegated entrypoint handler fallback
1 parent 24e1af5 commit 348f84e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Diff for: docker/all-in-one/entrypoint.sh

+11-10
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function fetch_and_execute_delegated_payload {
218218

219219
if [ ! -f $DELEGATED_ARCHIVE_PATH ]; then
220220
echo "No delegated payload found, bailing"
221-
return
221+
return 1
222222
fi
223223

224224
# only extract a valid archive
@@ -238,14 +238,17 @@ function fetch_and_execute_delegated_payload {
238238
fi
239239
else
240240
echo "Invalid TAR archive"
241-
return
242241
fi
243242

244243
# Run our delegated entry script here
245244
if [ -f "$DELEGATED_ENTRY_PATH" ]; then
246245
chmod +x $DELEGATED_ENTRY_PATH
247246
bash -c "$DELEGATED_ENTRY_PATH $START_TIME"
247+
else
248+
return 1
248249
fi
250+
251+
exit 0
249252
}
250253

251254
# Increase max number of open connections
@@ -356,11 +359,9 @@ fi
356359
touch "$CONFIGURED_FLAG_PATH"
357360
run_prelaunch_hooks
358361

359-
if [ -n "${DELEGATED_INIT_LOCATION:-}" ]; then
360-
fetch_and_execute_delegated_payload
361-
else
362-
DURATION=$(calculate_duration "$START_TIME" "$(date +%s%N)")
363-
echo "E: Execution time to starting supervisor: $DURATION milliseconds"
364-
start_supervisor
365-
push_lsn_checkpoint_file
366-
fi
362+
fetch_and_execute_delegated_payload
363+
364+
DURATION=$(calculate_duration "$START_TIME" "$(date +%s%N)")
365+
echo "E: Execution time to starting supervisor: $DURATION milliseconds"
366+
start_supervisor
367+
push_lsn_checkpoint_file

0 commit comments

Comments
 (0)