Upgrades fail on patroni clusters

Summary

On an existing patroni db node, installing a new gitlab version throws the following error:

There was an error running gitlab-ctl reconfigure:

ruby_block[wait for postgresql to start] (patroni::enable line 92) had an error: RuntimeError: PostgreSQL did not respond before service checks were exhausted

Steps to reproduce

  1. Install a previous version of GitLab in a patroni cluster environment
  2. Upgrade one of the patroni dbs to a newer GitLab package

What is the current bug behavior?

An error is throw because consul and patroni have been stopped during the upgrade

What is the expected correct behavior?

The upgrade should succeed