-
Notifications
You must be signed in to change notification settings - Fork 838
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
Do not check if Port is already in use with --validate-config #3056
Comments
I would like to work on this. We can have a suppressor flag that can suppress the port-in-use failure. @mnietz Would you say the first option satisfies the requirement? |
@sahilnaphade sorry for a late reply. |
@CyberDem0n If I understand correctly, are we considering ignoring the |
@sahilnaphade Passing down parameters to Schema.validate() could be tricky. What should be default behavior (to check listen or not) is a good question. Now I think we better stick by default with old behavior for backward compatibility. |
@CyberDem0n Sounds good. I have raised the PR for this issue, I tested the code exactly as @mnietz explained, no error is thrown when the flag is specified. I have used the global variable approach, which, in my opinion would be easily extendable to any other use case we might have. Please review and let me know if you want any further changes made: #3138 |
Solved in #3138 |
What happened?
It's not a Bug but a Feature-Request.
When validating the Patroni-Config on a running cluster it exit with code 1 and the following messages:
This makes it not possible to validate the config prior to a restart, for example within an ansible-template using validate:
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html#parameter-validate
It would be pretty good to have a check/validate mode like nginx -t or haproxy -c that could be integrated into automation-tools.
How can we reproduce it (as minimally and precisely as possible)?
Just validate the config of an already running cluster
What did you expect to happen?
exit with 0 if config is valid
Patroni/PostgreSQL/DCS version
Patroni configuration file
n/a
patronictl show-config
n/a
Patroni log files
PostgreSQL log files
Have you tried to use GitHub issue search?
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: