linuxserver / docker-tautulli

http://linuxserver.io
GNU General Public License v3.0
214 stars 39 forks source link

Retry GitHub clone or exit container on failure #82

Closed DomiStyle closed 5 years ago

DomiStyle commented 5 years ago

Currently the container will get stuck if there is no network connectivity available on container creation.

For example, if there are DNS issues while the container is starting, this happens:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
GID/UID
User uid: 1000
User gid: 1000
------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-install: executing...
Cloning into '/app/tautulli'...
fatal: unable to access 'https://github.com/Tautulli/Tautulli.git/': Could not resolve host: github.com
chown: cannot access '/app/tautulli': No such file or directory
[cont-init.d] 30-install: exited 1.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
python: can't open file '/app/tautulli/Tautulli.py': [Errno 2] No such file or directory
python: can't open file '/app/tautulli/Tautulli.py': [Errno 2] No such file or directory
python: can't open file '/app/tautulli/Tautulli.py': [Errno 2] No such file or directory
python: can't open file '/app/tautulli/Tautulli.py': [Errno 2] No such file or directory

It would make more sense to either retry the clone command infinitely on failure or exit the container so the orchestrator can recreate the container.

There is not much use continuing to run the container if the cloning of the repository fails.

thelamer commented 5 years ago

What version of the container are you running ? This install script was ripped out ages ago.

You need to be running linuxserver/tautulli:latest

DomiStyle commented 5 years ago

Ah, looks like I was running tautulli/tautulli:latest on accident, which hasn't been updated in months. I guess the banner on startup deceived me. :)

Thanks.