Route gitlab-shell through Workhorse instead of Unicorn
Summary
Spawned from gitlab-org/omnibus-gitlab#4583 (closed)
From https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7168#note_193976203, we discovered that gitlab-shell talks directly to Unicorn instead of Workhorse. As a result, we don't get the queue_duration
field in the logs to track how long the request sat in the queue before being processed. In /var/opt/gitlab/gitlab-shell/config.yml
, my test instance has:
# Url to gitlab instance. Used for api calls. Should end with a slash.
gitlab_url: "http://127.0.0.1:8080"
cc @stanhu @jacobvosmaer-gitlab
Proposed change
Move the gitlab-shell config.yml.erb
to point to the Workhorse container of the Unicorn (Puma in future) pod.
We should do two things.
- Rename
unicorn
properties toworkhorse
- Templatize the Workhorse port globally
Doing this will also allow it to be easily interchanged when we support Puma. This will allow us to collect additional metrics for logging and troubleshooting.
Current behavior
unicorn:
serviceName: unicorn
# host: '0.0.0.0'
# serviceName: 'unicorn'
# port: 8080
gitlab_url: "http://{{ template "gitlab.unicorn.host" . }}:{{ default 8080 .Values.unicorn.port }}/"
Expected behavior
workhorse:
# by default, Workhorse is a part of the Unicorn Pods / Service
serviceName: unicorn
# host: '0.0.0.0'
# port: 8081
gitlab_url: "http://{{ template "gitlab.workhorse.host" . }}:{{ template "gitlab.workhorse.port" . }}/"
Versions
- Chart: master @ 6a335647
- Platform: N/A
- Kubernetes: N/A
- Helm: N/A