Custom unicorn socket gets overwritten by Puma for Workhorse

Summary

Since !4620 (merged), the default Puma socket (even if not set) is overwriting any Unicorn custom socket. It also seems to be overwriting the custom gitlab_workhorse['auth_socket'] (which, I assume makes sense unless auth_backend is specified, since the socket would need to come from either Puma or Unicorn).

Steps to reproduce

  1. Use the following gitlab.rb:

    puma['enable'] = false
    unicorn['socket'] = "/var/opt/gitlab/gitlab-rails/sockets/unicorn-custom.socket"
    gitlab_workhorse['auth_socket'] = "/var/opt/gitlab/gitlab-rails/sockets/workhorse-custom.socket"
  2. Reconfigure, and notice the socket used is: /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket

Workaround

Set puma['socket'] to the desired_path, even if Puma is disabled.

What is the current bug behavior?

Custom unicorn socket is not used by Workhorse, resulting in downtime when upgrading to 13.5+ when using Unicorn with custom sockets.

What is the expected correct behavior?

The custom unicorn socket should be properly set in Workhorse.

Relevant logs

Relevant logs
{"correlation_id":"KKRz29c3n06","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory","level":"error","method":"GET","msg":"error","time":"2020-12-06T21:00:26Z","uri":"/"}
Assignee Loading
Time tracking Loading