Skip to content

Commit

Permalink
Fix fork failures (#56)
Browse files Browse the repository at this point in the history
* Also ignore OSError when waiting for supervisor

* Run container with --init
  • Loading branch information
gabriel-v authored and mgax committed Jul 18, 2019
1 parent d76cf2c commit c75b3f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ DOCKERGROUPID="$(getent group docker | cut -d: -f3)"
set -x
docker run --detach \
--restart always \
--init \
--name $name \
--env USERID=$USERID \
--env GROUPID=$GROUPID \
Expand Down
4 changes: 2 additions & 2 deletions cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ def wait_for_supervisor():
try:
supervisor_pid()
break
except subprocess.CalledProcessError as e:
log.warning(e)
except (OSError, subprocess.CalledProcessError) as e:
log.warning('waiting for supervisor: %s', e)
sleep(2)
else:
raise RuntimeError('supervisord did not start')
Expand Down

0 comments on commit c75b3f3

Please sign in to comment.