[PG HA] Postgres exporter fails to start on database nodes
Followup from #2880 (closed)
During the first reconfigure, postgres exporter fails to restart:
Recipe: gitlab::postgres-exporter
* service[postgres-exporter] action restart
================================================================================
Error executing action `restart` on resource 'service[postgres-exporter]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/chpst -u root /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/postgres-exporter ----
STDOUT: timeout: down: /opt/gitlab/service/postgres-exporter: 1s, normally up, want up
STDERR:
---- End output of /opt/gitlab/embedded/bin/chpst -u root /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/postgres-exporter ----
Ran /opt/gitlab/embedded/bin/chpst -u root /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/postgres-exporter returned 1
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/runit/definitions/runit_service.rb
217: service params[:name] do
218: control_cmd = node[:runit][:sv_bin]
219: if params[:owner]
220: control_cmd = "#{node[:runit][:chpst_bin]} -u #{params[:owner]} #{control_cmd}"
221: end
222: provider Chef::Provider::Service::Simple
This is because git
user does not exist on the system:
2017-10-17_10:06:06.48665 chpst: fatal: unknown user/group: gitlab-psql:git
/cc @ibaum