Summary
Add a command-line option to validate an xrpld configuration without starting the server.
For example:
xrpld --conf /etc/xrpld/xrpld.cfg --check-config
The command should exit with 0 if the configuration is valid, and with a non-zero exit code and a useful error message if validation fails.
Motivation
For automated deployments, it would be useful to validate a configuration before restarting a running node.
Right now, a bad setting or a problem with a referenced file may only be discovered during startup. That can turn a configuration change into a failed restart.
A validation-only mode would make it possible to use xrpld itself as a preflight check in CI, Ansible, systemd ExecStartPre, or similar deployment workflows.
Solution
Add a validation-only CLI mode that uses the same configuration parsing and validation logic as normal startup, but exits before starting the server.
Ideally, it should:
- validate
xrpld.cfg and local files referenced by it;
- return
0 when validation succeeds;
- return a non-zero exit code with the relevant error when validation fails;
- avoid opening network ports or connecting to peers;
- avoid modifying databases or other persistent node state.
For example, it could be used with systemd like this:
ExecStartPre=/usr/bin/xrpld --conf /etc/xrpld/xrpld.cfg --check-config
Paths Not Taken
An external script could validate the config before deployment, but that would duplicate xrpld's configuration logic and could drift from the actual behavior of xrpld.
Another option is to restart xrpld and rely on startup errors, but that makes validation part of the deployment instead of a safe preflight check.
Summary
Add a command-line option to validate an
xrpldconfiguration without starting the server.For example:
The command should exit with
0if the configuration is valid, and with a non-zero exit code and a useful error message if validation fails.Motivation
For automated deployments, it would be useful to validate a configuration before restarting a running node.
Right now, a bad setting or a problem with a referenced file may only be discovered during startup. That can turn a configuration change into a failed restart.
A validation-only mode would make it possible to use
xrplditself as a preflight check in CI, Ansible, systemdExecStartPre, or similar deployment workflows.Solution
Add a validation-only CLI mode that uses the same configuration parsing and validation logic as normal startup, but exits before starting the server.
Ideally, it should:
xrpld.cfgand local files referenced by it;0when validation succeeds;For example, it could be used with systemd like this:
ExecStartPre=/usr/bin/xrpld --conf /etc/xrpld/xrpld.cfg --check-configPaths Not Taken
An external script could validate the config before deployment, but that would duplicate
xrpld's configuration logic and could drift from the actual behavior ofxrpld.Another option is to restart
xrpldand rely on startup errors, but that makes validation part of the deployment instead of a safe preflight check.