Skip to content

Commit

Permalink
Increase timeout to 16 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Jan 14, 2025
1 parent 36f9e95 commit bb77806
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[Unit]
# If the service fails mroe than once in 10 secs without
# ever hitting an active state, we will have systemd to stop retrying
StartLimitBurst=1
StartLimitIntervalSec=10
StartLimitIntervalSec=900

[Service]
ExecStartPost=/bin/sh -c "iptables -P FORWARD ACCEPT && ip6tables -P FORWARD ACCEPT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ async def before_start(self):
async def start(self):
try:
await super().start()
timeout = 120 # We have this at 120 because HDDs are notorious and docker can take more time there
# First time when docker is started, it takes a bit more time to initialise itself properly
# and we need to have sleep here so that after start is called post_start is not dismissed
# We have a timeout for docker to start within 15 minutes of the above call, if that doesn't happen
# then we get into a failed start that docker failed to start. This has been necessary because
# HDDs have been notorious and can take quite some time for docker to start on boot.
timeout = 8 * 60 # We do 8 because we sleep for 2 secs - so in total it is 16 minutes
while timeout > 0:
if not await self.middleware.call('service.started', 'docker'):
await asyncio.sleep(2)
Expand Down

0 comments on commit bb77806

Please sign in to comment.