Skip to content

Commit

Permalink
Merge pull request #605 from geoadmin/fix_readiness_probe
Browse files Browse the repository at this point in the history
fix flaky cron start when running multiple pods in parallel
  • Loading branch information
ltclm authored Feb 2, 2024
2 parents 26f0ae9 + f1289e4 commit ba1ca00
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/docker-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ rsync --update --delete -av --exclude "*.tmp.*" --stats "${SPHINXINDEX_EFS}" ${S
service cron start || exit 1
envsubst < docker-crontab | crontab # DBSTAGING will be read from container environment

# starting the searchd service
# will load the sphinx indexes from EFS --sync--> Volume --> into memory
echo -e "${green}starting searchd service ...${NC}"

# prepare the applogs for output on /proc/1/fd/1
tail --pid $$ -F /var/log/sphinxsearch/searchd.log &
tail --pid $$ -F /var/log/sphinxsearch/query.log &
Expand All @@ -43,5 +39,10 @@ tail --pid $$ -F /var/log/sphinxsearch/query.log &
tail -f /tmp/stdout &
tail -f /tmp/stderr >&2 &

# starting the searchd service
# will load the sphinx indexes from EFS --sync--> Volume --> into memory
# activate stdout fifo
echo -e "${green}starting searchd service ...${NC}" > /tmp/stdout

# searchd will own pid 1
exec /usr/bin/searchd --nodetach "$@"

0 comments on commit ba1ca00

Please sign in to comment.