From c9df18f042dedb10a0fefc19e5c1aff94e75f1fd Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Nov 10 2019 21:21:07 +0000 Subject: docker: fix already running httpd issue on distgit I was trying to hackishly fix this in 6ae31277, but it probably won't help, because `pidof httpd` is none. [root@distgit /]# pidof httpd [root@distgit /]# /usr/sbin/httpd -DFOREGROUND httpd (pid 35) already running The mentioned PID is of the following process /usr/libexec/git-core/git-daemon --base-path=/var/lib/dist-git/git \ --export-all --user-path=public_git --syslog --inetd --verbose Which is started by our supervisord. The question is, do we really need it? I don't think so, since we can just remove it and the docker compose environment works just fine. --- diff --git a/docker/distgit/files/etc/supervisord.conf b/docker/distgit/files/etc/supervisord.conf index 37d3f7c..0c5d1ea 100644 --- a/docker/distgit/files/etc/supervisord.conf +++ b/docker/distgit/files/etc/supervisord.conf @@ -125,11 +125,6 @@ serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL for a ; interpreted as relative to this file. Included files *cannot* ; include files themselves. -[program:dist-git] -command=/usr/libexec/git-core/git-daemon --base-path=/var/lib/dist-git/git --export-all --user-path=public_git --syslog --inetd --verbose -user=root -group=root - [program:copr-dist-git] environment=PYTHONPATH=/usr/share/copr/ command=/usr/bin/importer_runner.py diff --git a/docker/distgit/files/usr/bin/run.sh b/docker/distgit/files/usr/bin/run.sh index b4f28ea..21e4462 100755 --- a/docker/distgit/files/usr/bin/run.sh +++ b/docker/distgit/files/usr/bin/run.sh @@ -9,11 +9,4 @@ cat <<-EOF echo "#########################################################" EOF -# We have a recurring problem with httpd, which manifests itself -# in the following way -# 1. httpd is running, while supervisorctl thinks it failed -# 2. It is not accessible e.g. via curl and returns "connection refused" -# 3. Killing httpd and starting it again fixes the issue -kill -9 `pidof httpd` && supervisorctl start httpd - /bin/bash