Skip to content

ENT-14169: Fixed cf-postgres.service race in hub postinstall DB setup#2292

Draft
aleksandrychev wants to merge 1 commit into
cfengine:masterfrom
aleksandrychev:ENT-14169
Draft

ENT-14169: Fixed cf-postgres.service race in hub postinstall DB setup#2292
aleksandrychev wants to merge 1 commit into
cfengine:masterfrom
aleksandrychev:ENT-14169

Conversation

@aleksandrychev
Copy link
Copy Markdown
Contributor

The %post scriptlet starts its own PostgreSQL instance to initialize/migrate database, but cf-postgres.service has Restart=always, so systemd races it for port 5432 and the data directory. The scriptlet's subsequent pg_ctl stop fails with PID file does not exist and aborts under set -e.

Ticket: ENT-14169

The %post scriptlet starts its own PostgreSQL instance to initialize/migrate database,
but cf-postgres.service has `Restart=always`, so systemd races it for port 5432 and the data directory.
The scriptlet's subsequent `pg_ctl stop` fails with `PID file does not exist` and aborts under `set -e`.

Ticket: ENT-14169
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
@aleksandrychev
Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins please

@aleksandrychev aleksandrychev marked this pull request as draft June 4, 2026 11:51
@cf-bottom
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants