Restarting the mattermost service wipes the config
Steps to repro:
Edit config file
Restart the server using systemctl restart mattermost
Repro'd consistently using mattermost 5.32.1
Tried with both Type=simple and notify
QA Test Steps
Interestingly I am not able to reproduce this, neither locally nor in a cluster. What OS are you running this on? Is it in a docker container?
Also, is it possible that some other process is accessing the config file while you are restarting? An editor/IDE for example.
To debug this further it would be extremely helpful if you could install inotify-tools and share the output of the following command while reproducing the issue (from another terminal):
inotifywait -mq /path/to/config.json
If you need more than one call to systemctl restart to trigger the issue just make sure to stop and start that command again so that we collect only the info from when the problem occurs.