Skip to content

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

Merged
aleksandrychev merged 1 commit into
cfengine:masterfrom
aleksandrychev:ENT-14169
Jun 8, 2026
Merged

ENT-14169: Fixed cf-postgres.service race in hub postinstall DB setup#2292
aleksandrychev merged 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

@aleksandrychev

Copy link
Copy Markdown
Contributor Author

Build Status

@aleksandrychev
aleksandrychev marked this pull request as ready for review June 5, 2026 13:37

@craigcomstock craigcomstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. thanks!

@aleksandrychev
aleksandrychev merged commit 86dbe11 into cfengine:master Jun 8, 2026
32 of 33 checks passed
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.

3 participants