Skip to content

Commit

Permalink
Increase some Docker and Fedora wait timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
elohanlon committed Dec 14, 2024
1 parent 16739cf commit fa3990a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker/fedora/setup-and-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ if [ ! -f /opt/fedora/tomcat/bin/catalina.sh ]; then

# Give Fedora some time to start up and create various first-time startup files
# We're waiting until we get a 200 status (with maximum timeout wait time)
timeout 20s bash -c 'until curl --output /dev/null --silent --head --fail http://localhost:8081/fedora/; do sleep 1; done'
timeout 30s bash -c 'until curl --output /dev/null --silent --head --fail http://localhost:8081/fedora/; do sleep 1; done'

# Stop Fedora so that we can apply some overrides
/opt/fedora/tomcat/bin/catalina.sh stop

# Give Fedora some time to stop (with maximum timeout wait time)
timeout 20s bash -c 'while pgrep "java" > /dev/null; do sleep 1; done'
timeout 30s bash -c 'while pgrep "java" > /dev/null; do sleep 1; done'

# Revert server.xml change so that Fedora will run on port 8080 the next time we start it up.
rm /opt/fedora/tomcat/conf/server.xml
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/hyacinth/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace :hyacinth do
expected_port = docker_compose_config['services']['solr']['ports'][0].split(':')[0]
url_to_check = "http://localhost:#{expected_port}/solr/hyacinth/admin/system"
puts "Waiting for Solr to become available (at #{url_to_check})..."
Timeout.timeout(20, Timeout::Error, 'Timed out during Solr startup check.') do
Timeout.timeout(30, Timeout::Error, 'Timed out during Solr startup check.') do
loop do
begin
sleep 0.25
Expand All @@ -35,7 +35,7 @@ namespace :hyacinth do
expected_port = docker_compose_config['services']['fedora']['ports'][0].split(':')[0]
url_to_check = "http://localhost:#{expected_port}/fedora/describe"
puts "Waiting for Fedora to become available (at #{url_to_check})..."
Timeout.timeout(60, Timeout::Error, 'Timed out during Fedora startup check.') do
Timeout.timeout(90, Timeout::Error, 'Timed out during Fedora startup check.') do
loop do
begin
sleep 0.25
Expand Down

0 comments on commit fa3990a

Please sign in to comment.