Skip to content

Fix Mattermost SSO setup

This is a proposed fix of #1217 (closed).

Why the problem exists

As was investigated in #1217 (closed):

Mattermost is tried to be configured before database is ready.

This happens because Chef has compilation and execution phases of recipe. Code here /files/gitlab-cookbooks/gitlab/recipes/mattermost.rb:91-101 shows that MattermostHelper.authorize_with_gitlab is executed during compilation phase, while databases are created during execution phase. As the result, it always fails to be configured at first run (which is common for running Docker containers).

Proposed solution

Calling MattermostHelper.authorize_with_gitlab at execution phase of Chef recipe.

Merge request reports