Mattermost settings from gitlab.rb not written to config.json (but mattermost runs ok)
Summary
The settings for Mattermost which are configured in gitlab.rb
are not written to the mattermost config file at /var/opt/gitlab/mattermost/config.json
Steps to reproduce
- Change a setting for mattermost in
gitlab.rb
, fore example activate the sql driver and change it to postgres:mattermost['sql_driver_name'] = 'postgres'
- Run
gitlab-ctl reconfigure
- Look at the
SqlSettings
block in/var/opt/gitlab/mattermost/config.json
What is the current bug behavior?
/var/opt/gitlab/mattermost/config.json
shows:
"SqlSettings": {
"DriverName": "mysql",
"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",
"DataSourceReplicas": [],
"DataSourceSearchReplicas": [],
"MaxIdleConns": 20,
"ConnMaxLifetimeMilliseconds": 3600000,
"MaxOpenConns": 300,
"Trace": false,
"AtRestEncryptKey": "sr93dw7qayn5ugu9mrjjifa9k1hz6hxb",
"QueryTimeout": 30
},
The generated config cannot be used with the mattermost cli:
$ sudo /opt/gitlab/embedded/bin/mattermost team add -c /var/opt/gitlab/mattermost/config.json test ***
{"level":"info","ts":1567610586.6984339,"caller":"utils/i18n.go:83","msg":"Loaded system translations for 'en' from '/opt/gitlab/embedded/service/mattermost/i18n/en.json'"}
{"level":"info","ts":1567610586.6988313,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1567610586.7019591,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL master database"}
{"level":"error","ts":1567610606.7050793,"caller":"sqlstore/supplier.go:236","msg":"Failed to ping DB retrying in 10 seconds err=dial tcp: lookup dockerhost on 10.128.20.45:53: server misbehaving"}
What is the expected correct behavior?
It should show something with postgres
Relevant logs
The strange thing is that mattermost runs ok and it uses the postgres db.
Relevant logs
// /var/log/gitlab/mattermost/mattermost.log {"level":"info","ts":1567555455.1633806,"caller":"app/server.go:214","msg":"Enterprise Enabled: false"} {"level":"info","ts":1567555455.1633997,"caller":"app/server.go:216","msg":"Current working directory is /opt/gitlab/embedded/service/mattermost"} {"level":"info","ts":1567555455.1634173,"caller":"app/server.go:217","msg":"Loaded config","source":"file:///var/opt/gitlab/mattermost/config.json"}
Details of package version
Provide the package version installation details
ii gitlab-ce 12.2.3-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
Environment details
- Operating System:
Ubuntu 16.04 LTS
- Installation Target, remove incorrect values:
- Bare Metal Machine
- Installation Type, remove incorrect values:
- New Installation
- Is there any other software running on the machine: system installed nginx
- Is this a single or multiple node installation? single
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
mattermost['sql_driver_name'] = 'postgres'