-- 
Patrik Hagedorn
System Developer - Data Center Automation

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Email: patrik.haged...@profitbricks.com
URL:   https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg

>From 35ebda332f91e2001ef5c071fdb0b06f09d8a407 Mon Sep 17 00:00:00 2001
From: Patrik Hagedorn <patrik.haged...@profitbricks.com>
Date: Thu, 5 Oct 2017 15:56:00 +0200
Subject: [PATCH 3/3] Prevent reloading unicorn to shutdown gitlab.service

Unicorn has a build-in forking that allows reloads by writting the
PID of the current master into a PIDFile. The default PIDFile is
/run/gitlab/unicorn.pid as configure by the default of gitlab_pid_path
in gitlab-debian.conf. Therefore the PIDFile should be used in systemd
to enable a reload/transition from old master to the new master by
getting the new PID.

Bug-Debian: https://bug.debian.org/877778
---
 debian/gitlab.gitlab-unicorn.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/gitlab.gitlab-unicorn.service b/debian/gitlab.gitlab-unicorn.service
index 139cb75..0da4705 100644
--- a/debian/gitlab.gitlab-unicorn.service
+++ b/debian/gitlab.gitlab-unicorn.service
@@ -9,6 +9,7 @@ ReloadPropagatedFrom=gitlab.service
 
 [Service]
 Type=simple
+PIDFile=/run/gitlab/unicorn.pid
 WorkingDirectory=/usr/share/gitlab
 EnvironmentFile=/etc/gitlab/gitlab-debian.conf
 EnvironmentFile=-/etc/default/gitlab
-- 
2.11.0

Reply via email to