-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
improve error handling in /etc/matrix-synapse/conf.d #7322
Comments
Hi @pedro-nonfree, and thanks for your report! I've opened #7341 to prevent Synapse from hitting a fatal error if it's given an empty or malformed YAML file, instead it will print, e.g.:
when starting up.
If a file is ignored, Synapse will say so when starting up, e.g. by reproducing your examples I can see:
in Synapse's output. I just did some testing on a production homeserver I run that's been installed using the Debian packages and it looks like it pipes correctly into
Any file that isn't mentioned in a message ending with "IGNORING" at the start of Synapse should be considered as parsed and its settings processed as long as they're valid Synapse settings (as long as they're provided to Synapse using |
thanks @babolivier , I liked a lot your proposal in #7341 and your solution is neat in my opinion I had this issue while understanding what was the configuration synapse was using after reading all the files and executing the service. I still have this question. How can ensure what is the value for a key, if that key is in some files. |
There is no way to do that currently, apart from making sure you don't have duplicates between your configuration files (which you should do anyway). |
If the admin adds a `.yaml` file that's either empty or doesn't parse into a dict to a config directory (e.g. `conf.d` for debs installs), stuff like #7322 would happen. This PR checks that the file is correctly parsed into a dict, or ignores it with a warning if it parses into any other type (including `None` for empty files). Fixes #7322
#7341 has been merged so I'm closing this issue. If you have more questions about Synapse, feel free to join #synapse:matrix.org and ask them there :) |
…7341) If the admin adds a `.yaml` file that's either empty or doesn't parse into a dict to a config directory (e.g. `conf.d` for debs installs), stuff like matrix-org#7322 would happen. This PR checks that the file is correctly parsed into a dict, or ignores it with a warning if it parses into any other type (including `None` for empty files). Fixes matrix-org#7322
Description
/etc/matrix-synapse/conf.d
is an important section because there you can do whatever you want and upgrade debian-based package for matrix in a good mannerSteps to reproduce
OK?
FAILS (it also files if all lines in that file are commented), error says
OK? I have a question, how can I verify that the running synapse has my variable enabled? Maybe this file is not taken in account by synapse
Version information
Homeserver: matrix.guifi.net
Version:
Install method: debian package
Platform: debian stable 10 buster proxmox VM
The text was updated successfully, but these errors were encountered: