FS#67175 - [gitlab] systemd RuntimeDirectory option breaks secondary service sockets on restart

Attached to Project: Community Packages
Opened by Matt Stickney (mtstickney) - Thursday, 02 July 2020, 06:33 GMT
Last edited by Anatol Pomozov (anatolik) - Wednesday, 08 July 2020, 05:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The gitlab-puma service sets RuntimeDirectory=gitlab, but per the systemd docs "[i]n case of RuntimeDirectory= the innermost subdirectories are removed when the unit is stopped". This means that stopping the gitlab-puma service deletes /run/gitlab, and the sockets of other running services like gitlab-gitaly along with it. These services will still be running, and will have their socket files open, but the files will have been unlinked from the filesystem, and gitlab-puma will be unable to connect to any of them (the service will start, but you'll get errors like being unable to clone a repo over https).

Adding RuntimeDirectoryPreserve=yes appears to solve the problem, by not removing /run/gitlab when the service is stopped.

Additional info:
13.1.1-1

Steps to reproduce:
1. Start gitlab-gitaly
2. Start gitlab-puma
3. Stop gitlab-puma
4. Note that /run/gitlab is now missing

Optionally:
5. Start gitlab-puma, note that /run/gitlab exists, but /run/gitlab/gitlab-gitaly.socket does not
6. Attempt to clone a repo over http(s), note failure
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Wednesday, 08 July 2020, 05:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  SVN revision 660464
Comment by Anatol Pomozov (anatolik) - Wednesday, 08 July 2020, 05:12 GMT
Adding "RuntimeDirectoryPreserve=yes" sounds reasonable to me. I am going to add it to the puma service

Thank you very much for your bug report.

Loading...