Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

improve error handling in /etc/matrix-synapse/conf.d #7322

@pedro-nonfree

Description

@pedro-nonfree

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 manner

Steps to reproduce

cd /etc/matrix-synapse/conf.d
touch test1
systemctl restart matrix-synapse

OK?

cd /etc/matrix-synapse/conf.d
touch test2.yaml
systemctl restart matrix-synapse

FAILS (it also files if all lines in that file are commented), error says

matrix-synapse[23419]: Traceback (most recent call last):
matrix-synapse[23419]:   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
matrix-synapse[23419]:     "__main__", mod_spec)
matrix-synapse[23419]:   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
matrix-synapse[23419]:     exec(code, run_globals)
matrix-synapse[23419]:   File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 651, in <module>
matrix-synapse[23419]:     main()
matrix-synapse[23419]:   File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 646, in main
matrix-synapse[23419]:     hs = setup(sys.argv[1:])
matrix-synapse[23419]:   File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 324, in setup
matrix-synapse[23419]:     "Synapse Homeserver", config_options
matrix-synapse[23419]:   File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/config/_base.py", line 623, in load_or_generate_config
matrix-synapse[23419]:     config_dict = read_config_files(config_files)
matrix-synapse[23419]:   File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/config/_base.py", line 670, in read_config_files
matrix-synapse[23419]:     specified_config.update(yaml_config)
matrix-synapse[23419]: TypeError: 'NoneType' object is not iterable
systemd[1]: matrix-synapse.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: matrix-synapse.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Synapse Matrix homeserver.
cd /etc/matrix-synapse/conf.d
touch test3.yml
systemctl restart matrix-synapse

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:

curl http://localhost:8008/_synapse/admin/v1/server_version
{
    "python_version": "3.5.3",
    "server_version": "1.12.3"
}
  • Install method: debian package

  • Platform: debian stable 10 buster proxmox VM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions