Restart PostgreSQL when quadlet env vars change#479
Conversation
|
This reads like we would benefit from a test that switches tuning profiles and checks that the values for said tuning profile are updated within the running container(s) that it applies to. |
That's what SatelliteQE/robottelo#21357 is about where this was found, yeah. I am not sure we want to test every permutation of parameters in our primary CI, as that will be expensive (time wise) |
evgeni
left a comment
There was a problem hiding this comment.
Tested with foremanctl-2.0.0-1.20260428184728543158.pr479.12.ge60ca68.el9.noarch, PostgreSQL is correctly restarted and the new max_connections value is used.
Why are you introducing these changes? (Problem description, related links)
The Deploy PostgreSQL container task updates the quadlet file with tuning-specific env vars (POSTGRESQL_MAX_CONNECTIONS, POSTGRESQL_SHARED_BUFFERS, POSTGRESQL_EFFECTIVE_CACHE_SIZE) but does not notify the Restart postgresql handler. As a result, switching tuning profiles (e.g. medium to default) updates the quadlet file and triggers daemon_reload, but PostgreSQL keeps running with stale env vars from the previous profile.
What are the changes introduced in this pull request?
notify: Restart postgresqlto the container task ensures the handler fires whenever the quadlet content changes, restarting the service with the updated env vars.How to test this pull request
Steps to reproduce:
foremanctl deploy --tuning mediumforemanctl deploy --reset-tuningChecklist