mattermost / mattermost-helm

Mattermost Helm charts for Kubernetes
Apache License 2.0
165 stars 148 forks source link

Update from 5.5.1 to 6.0.0 failed with postgres error #289

Closed DennisCodeBuds closed 2 years ago

DennisCodeBuds commented 2 years ago

Hello,

I recently upgraded from 5.4.0 to 5.5.1 which worked straight away. I then tried to upgrade to 6.0.0 using

helm upgrade --install mattermost mattermost/mattermost-team-edition -n default -f helms/mattermost/values.production.yaml --version=6.0.0

This makes the pood repeatedly fail indicating a postgres error :

"level":"fatal","msg":"Failed to alter column type.","caller":"sqlstore/store.go:860","error":"pq: must be owner of table posts"

Reading through the changelog I noticed some warnings on database changes but found nothing related to the error I am getting.

Do you have any idea where this might be coming from ?

Versions

DennisCodeBuds commented 2 years ago

I finally got it to work.

The issue was that the owner of the database and the tables was gitlab_mattermost but the user that wanted to connect was gitlab.

To get the update to run correctly I changed the owner of the database and the tables (in order to do so I had to connect with the psql root user) :

ALTER DATABASE mattermost_production OWNER TO gitlab;
REASSIGN OWNED BY gitlab_mattermost TO gitlab;

I will now close this issue