Upgrading Community Edition from 14.4.1 to 14.5.0 hangs with postgresql FATAL error

Hi folks, I’ve hit an issue with the upgrade of the community edition from 14.4.1 to 14.5.0. The OS is 18.04.5 LTS and the command run was :

sudo apt-get install gitlab-ce=14.5.0-ce.0 -y

The upgrade hangs here :

bash[migrate gitlab-rails database] action run

In the postgresql logs :

2021-11-24_11:13:21.86345 DETAIL: Connection matched pg_hba.conf line 70: “local all all peer map=gitlab”
2021-11-24_11:13:21.91698 LOG: no match in usermap “gitlab” for user “gitlab” authenticated as “root”
2021-11-24_11:13:21.91699 FATAL: Peer authentication failed for user “gitlab”
2021-11-24_11:13:21.91699 DETAIL: Connection matched pg_hba.conf line 70: "local all all

Other snippet that might be relevant :

  • file[/opt/gitlab/service/postgresql/log/supervise/ok] action touch (skipped due to only_if)
    • file[/opt/gitlab/service/postgresql/supervise/status] action touch
      • change owner from ‘root’ to ‘gitlab-psql’
      • change group from ‘root’ to ‘gitlab-psql’
      • update utime on file /opt/gitlab/service/postgresql/supervise/status
    • file[/opt/gitlab/service/postgresql/log/supervise/status] action touch
      • change owner from ‘root’ to ‘gitlab-psql’
      • change group from ‘root’ to ‘gitlab-psql’
      • update utime on file /opt/gitlab/service/postgresql/log/supervise/status
    • file[/opt/gitlab/service/postgresql/supervise/control] action touch (skipped due to only_if)

We’ve done over a dozen upgrades on this server and this is the first time we’ve hit an issue. Any help or guidance is much appreciated. Thanks.

Hi,

sorry about the problems. The upgrading docs for 14.5.0 mention a background migration for MR diffs which might take longer.

Though, the error message with changing the user name looks like a bug or a missing config update for pg_hba.conf. Can you open a new bug report please?

Please also share which PostgreSQL version you using :slight_smile:

I’ve found a possible workaround when googling for the error message, maybe Gitlab-ce docker on apple m1 stuck on Recipe: gitlab::database_migrations - #13 by joe-huersch helps?

Cheers,
Michael

Thanks Michael. We are on version 12.7 of PostgreSQL. I’ll try and get a bug report created this weekend or Monday at the latest. I tried updating the user map as described in the workaround post but chef removes the entry and the error continues to show.