This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Document config parser utility #8160
Copy link
Copy link
Closed
Labels
A-ConfigConfiguration, or the documentation thereofConfiguration, or the documentation thereofA-Docsthings relating to the documentationthings relating to the documentationP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Help-WantedWe know exactly how to fix this issue, and would be grateful for any contributionWe know exactly how to fix this issue, and would be grateful for any contribution
Description
We have a utility to run Synapse's config parsing code without starting a homeserver, which can be quite helpful, but it's undocummented and it looks like it was pretty much forgotten about.
We should document it.
The script currently requires the user to provide a config key to print after the config has been parsed, which we sometimes don't care about, so we should make this bit optional.
As a POI, this config check is run like this (in a Synapse venv):
python -m synapse.config read <config key to print> -c <path to config>
More generally, everything after the config key to print is passed to the config parser, so the usage of that bit (which in my example is -c <path to config>) is actually:
usage: __main__.py [-h] [-c CONFIG_FILE] [--keys-directory DIRECTORY] [-D] [--print-pidfile] [--manhole PORT] [-d SQLITE_DATABASE_PATH] [-n] [--enable-registration]
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-path CONFIG_FILE
Specify config file. Can be given multiple times and may specify directories containing *.yaml files.
--keys-directory DIRECTORY
Where files such as certs and signing keys are stored when their location is not given explicitly in the config. Defaults to the directory containing the last config file
server:
-D, --daemonize Daemonize the homeserver
--print-pidfile Print the path to the pidfile just before daemonizing
--manhole PORT Turn on the twisted telnet manhole service on the given port.
database:
-d SQLITE_DATABASE_PATH, --database-path SQLITE_DATABASE_PATH
The path to a sqlite database to use.
logging:
-n, --no-redirect-stdio
Do not redirect stdout/stderr to the log
registration:
--enable-registration
Enable registration for new users.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ConfigConfiguration, or the documentation thereofConfiguration, or the documentation thereofA-Docsthings relating to the documentationthings relating to the documentationP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Help-WantedWe know exactly how to fix this issue, and would be grateful for any contributionWe know exactly how to fix this issue, and would be grateful for any contribution