Skip to content

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

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

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

@aleksandrychev
Copy link
Copy Markdown
Contributor Author

Build Status

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

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

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

makes sense. thanks!

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