Skip to content

Fixed hub install aborting when there is no PostgreSQL backup to preserve - #2398

Open
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:ENT-11934/master
Open

Fixed hub install aborting when there is no PostgreSQL backup to preserve#2398
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:ENT-11934/master

Conversation

@nickanderson

@nickanderson nickanderson commented Aug 5, 2026

Copy link
Copy Markdown
Member

The hub postinstall took the "preserve the old pg_*.conf" branch on any upgrade, but preinstall.sh only makes that backup for a PostgreSQL major version migration with an existing data directory. Without one the glob matched nothing and aborted the scriptlet under set -e.

Ticket: ENT-11934

@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.

seems reasonable, try it through a full jenkins run maybe?

Comment thread packaging/common/cfengine-hub/postinstall.sh Outdated
…erve

init_postgres_dir() took the "preserve the old pg_*.conf" branch on any
upgrade, but preinstall.sh only populates $BACKUP_DIR/data when a PostgreSQL
major version migration is needed and $PREFIX/state/pg/data exists. Upgrading
within a major version, or after removing the data directory as preinstall.sh
suggests to skip the migration, made the glob match nothing and aborted the
whole scriptlet under `set -e`.

Ticket: ENT-11934
Changelog: title
@nickanderson

Copy link
Copy Markdown
Member Author

Converted the comment into a cf_console echo and force pushed.

@cf-bottom jenkins please

@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.

3 participants