[discourse-web/flathub: 3/3] FIX: Always remove pids on boot (https://github.com/discourse/discourse_docker/commit/ca39457ffc10c8
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discourse-web/flathub: 3/3] FIX: Always remove pids on boot (https://github.com/discourse/discourse_docker/commit/ca39457ffc10c8
- Date: Wed, 7 Oct 2020 10:42:29 +0000 (UTC)
commit 7ded639afe8b89af6bf352f5c4cec8e2dd966d32
Author: iposadat <ismael posada trobo cern ch>
Date: Fri Sep 25 10:15:13 2020 +0200
FIX: Always remove pids on boot
(https://github.com/discourse/discourse_docker/commit/ca39457ffc10c8eedc9843fe541a7265cc4e888c)
Change unicorn_pid_path to uniform instances.
run-discourse.sh | 6 ++++++
templates/discourse-cern.yaml | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/run-discourse.sh b/run-discourse.sh
index af7bfba..f62cfa9 100644
--- a/run-discourse.sh
+++ b/run-discourse.sh
@@ -1,5 +1,11 @@
#!/bin/bash
+# Previously if unicorn stopped abruptly we could have a situation where pids were left around
+# This could lead to Sidekiq not booting, and blocking prometheus with an address bind being used.
+# This will ensure that on boot our state is clean.
+# For next generation of the infra we can consider set up an emptyDir for cleaning when pod goes down.
+/bin/rm -f ${HOME}/tmp/pids/*.pid
+
# Replace environment variables
echo "--> Overwritting env variables ..."
envsubst < /tmp/discourse-configmap/discourse.conf > /discourse/config/discourse.conf
diff --git a/templates/discourse-cern.yaml b/templates/discourse-cern.yaml
index 2441660..d8d7889 100644
--- a/templates/discourse-cern.yaml
+++ b/templates/discourse-cern.yaml
@@ -545,7 +545,8 @@ objects:
LANG: "en_US.UTF-8"
SIDEKIQ_CONCURRENCY_KEY: "5"
UNICORN_BIND_ALL: "true"
- UNICORN_PID_PATH: "/var/run/unicorn.pid"
+ # To be removed on next iterations of the infra
+ UNICORN_PID_PATH: "/discourse/tmp/pids/unicorn.pid"
UNICORN_PORT: "3000"
UNICORN_SIDEKIQS: "1"
UNICORN_WORKERS: "1"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]