Gitlab-patroni cookbook fails provisioning new hosts
gitlab-patroni cookbook fails when provisioning a Patroni server from scratch
startup-script: [2022-01-18T13:17:16+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
startup-script: [2022-01-18T13:17:16+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
startup-script: [2022-01-18T13:17:16+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: linux_user[gitlab-psql] (gitlab-patroni::postgresql line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '12'
startup-script: ---- Begin output of ["usermod", "-d", "/var/opt/gitlab/postgresql", "-m", "gitlab-psql"] ----
startup-script: STDOUT:
startup-script: STDERR: usermod: directory /var/opt/gitlab/postgresql exists
startup-script: ---- End output of ["usermod", "-d", "/var/opt/gitlab/postgresql", "-m", "gitlab-psql"] ----
startup-script: Ran ["usermod", "-d", "/var/opt/gitlab/postgresql", "-m", "gitlab-psql"] returned 12
Acceptance criteria:
-
Fix the cookbook