zalando / zalando/postgres-operator
Patroni config params are not reverting to their default values upon removal from PostgreSQL configuration
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using?
http://ghcr.io/zalando/postgres-operator:v1.13.0 - Where do you run it - cloud or metal?
OpenShift & GKE - Are you running Postgres Operator in production?
yes - Type of issue?
Bug
Due to an issue with the my environment, it was necessary to increase the following values of loop_wait, retry_timeout, and ttl.
This was done by updating PostgreSQL configuration as follows
oc get postgresql postgres -o json | jq -r '.spec.patroni' { "loop_wait": 60, "retry_timeout": 60, "ttl": 180 }
All changes were correctly applied without any manual intervention.
Upon resolution of environmental issue, same set of values was removed from PostgreSQL configuration.
Problem is that the those values were not removed from the Patroni configuration, they remained the same. This was tested by checking patronictl show-config output and directly in postgres.yml
Expectation was that they would be assigned to their corresponding default values.
https://patroni.readthedocs.io/en/latest/dynamic_configuration.html
Is this expected behaviour or a bug?
Once, when Patroni configuration is specified within the PostgreSQL configuration, is it necessary for us to manage it manually, or can the operator ensure that the correct values are applied when such configuration is removed?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the change using the PostgreSQL configuration and compare patronictl show-config with the generated postgres.yml before and after removing loop_wait, retry_timeout, and ttl. Start by tracing how the operator applies the spec.patroni values; done means removing a value restores its corresponding Patroni default without manual intervention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100