Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-55324: Apply learnings from Mattermost config review #706

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deployment/terraform/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ func (t *Terraform) updateAppConfig(siteURL string, sshc *ssh.Client, jobServerE
// Setting to * is more of a quick fix. A proper fix would be to get the DNS name of the first
// node or the proxy and set that.
cfg.ServiceSettings.AllowCorsFrom = model.NewString("*")
cfg.ServiceSettings.EnableOpenTracing = model.NewBool(false) // Large overhead, better to disable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also set to false by default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more a safety measure, in case it is enabled by default at some point, but we can remove it if you have a strong opinion.

cfg.ServiceSettings.EnableTutorial = model.NewBool(false) // Makes manual testing easier
cfg.ServiceSettings.EnableOnboardingFlow = model.NewBool(false) // Makes manual testing easier

cfg.EmailSettings.SMTPServer = model.NewString(t.output.MetricsServer.PrivateIP)
cfg.EmailSettings.SMTPPort = model.NewString("2500")

Expand Down Expand Up @@ -599,8 +603,10 @@ func (t *Terraform) updateAppConfig(siteURL string, sshc *ssh.Client, jobServerE
cfg.SqlSettings.DataSourceReplicas = readerDSN
cfg.SqlSettings.MaxIdleConns = model.NewInt(100)
cfg.SqlSettings.MaxOpenConns = model.NewInt(100)
cfg.SqlSettings.Trace = model.NewBool(false) // Can be enabled for specific tests, but defaulting to false to declutter logs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's anyways set to false by default. I guess we are being explicit here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like it to beg explicit in case a user wants to change it at some point.


cfg.TeamSettings.MaxUsersPerTeam = model.NewInt(50000)
cfg.TeamSettings.MaxUsersPerTeam = model.NewInt(200000) // We don't want to be capped by this limit
cfg.TeamSettings.MaxChannelsPerTeam = model.NewInt64(200000) // We don't want to be capped by this limit
cfg.TeamSettings.EnableOpenServer = model.NewBool(true)
cfg.TeamSettings.MaxNotificationsPerChannel = model.NewInt64(1000)

Expand Down
24 changes: 24 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,32 @@ Two considerations:
- Due to [this issue](https://github.com/grafana/grafana/issues/32585), you need to be logged in to access the Snapshot option in the Share dialog. Although logging in is not usually needed in these temporal instances, you can still do so for this purpose with the credentials `admin`/`admin`.
- Note that a snapshot, although very useful for reference, is not a fully-functioning dashboard, so you will not be able to query new data using it. Take a look at the example above to understand how it works.

### Can I stress test the ElasticSearch jobs?
ElasticSearch schedules a daily job for aggregating posts. For configuring this, one needs to modify the Mattermost server's setting `ElasticsearchSettings.PostsAggregatorJobStartTime`, which accepts a hard-coded time (local to the machine running the server) formatted as a string like `"15:04"`.
If you want to stress test this specific job during a load-test, you can use the [config patch](config/deployer.md#mattermost-config-patch-file) setting in the deployer config to change it to a time where the test will be running, using a partial Mattermost config like the following one:

```json
{
"ElasticSearchSettings": {
"PostsAggregatorJobStartTime": "19:34"
}
}
```
## Troubleshooting

### Increase debugging level

For troubleshooting purposes, the first step should be increasing the debugging level of both the Mattermost server and the agents:
- For the Mattermost server, a [config patch](config/deployer.md#mattermost-config-patch-file) can be used, with a partial config that can contain the following:
```json
{
"LogSettings": {
"FileLevel": "DEBUG"
}
}
```
- For the agents, the [`LogSettings.FileLevel` setting of the config.json file](config/config.md#file-level) should be set to `"DEBUG"` as well.

### Users are not connecting

Make sure that both `Enable Account Creation` and `Enable Open Server` settings are set to `true` in MM System Console.
Expand Down
Loading