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 13, 2025
1 parent 36f9e95 commit 96b2b28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/freenas/etc/systemd/system/docker.service.d/override.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[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

[Service]
ExecStartPost=/bin/sh -c "iptables -P FORWARD ACCEPT && ip6tables -P FORWARD ACCEPT"
TimeoutStartSec=900
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 96b2b28

Please sign in to comment.