Skip to content

ENT-14169: Fixed cf-postgres.service race in hub postinstall DB setup (3.24.x)#2301

Merged
aleksandrychev merged 1 commit into
cfengine:3.24.xfrom
aleksandrychev:ENT-14169_3.24.x
Jun 8, 2026
Merged

ENT-14169: Fixed cf-postgres.service race in hub postinstall DB setup (3.24.x)#2301
aleksandrychev merged 1 commit into
cfengine:3.24.xfrom
aleksandrychev:ENT-14169_3.24.x

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

(cherry picked from commit d77517c)

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>
(cherry picked from commit d77517c)
@aleksandrychev aleksandrychev merged commit 18aa22f into cfengine:3.24.x Jun 8, 2026
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