Skip to content

Adjusted hub upgrade database migration to show only actionable logs - #1511

Merged
craigcomstock merged 2 commits into
cfengine:masterfrom
craigcomstock:ENT-12383-3/master
Oct 16, 2024
Merged

Adjusted hub upgrade database migration to show only actionable logs#1511
craigcomstock merged 2 commits into
cfengine:masterfrom
craigcomstock:ENT-12383-3/master

Conversation

@craigcomstock

Copy link
Copy Markdown
Contributor

If pg_upgrade fails it is OK because we have several other options which we try during hub package upgrade.

It is likely that pg_upgrade will fail when upgrading major versions of postgresql during the hub package upgrade.

Sadly, since we build postgresql to link to /var/cfengine/lib (WORKDIR/lib) the pg_upgrade utility can fail due to old-bin binaries trying to use the newer libraries and missing symbols.

If we followed the pattern of placing each set of postgresql binaries, libraries, etc in a major-versioned directory this would not be an issue.

However, making that change seems too large and doesn't handle previous versions of CFEngine hub package well.

To see the errors, run the upgrade with DEBUG=1 defined as an environment variable.

Ticket: ENT-12383
Changelog: title

@craigcomstock
craigcomstock marked this pull request as draft October 15, 2024 18:12
@craigcomstock

Copy link
Copy Markdown
Contributor Author

Build Status

@craigcomstock

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins

@craigcomstock

Copy link
Copy Markdown
Contributor Author

Will wait on jenkins results before opening for review.

@cf-bottom

Copy link
Copy Markdown

@craigcomstock

Copy link
Copy Markdown
Contributor Author

only one selenium failure, probably unrelated but I will check more closely. upgrade tests passed!

@craigcomstock
craigcomstock marked this pull request as ready for review October 16, 2024 11:19

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

  • a trailing libre in the commit message.

And I'd split the changes into two commits -- one changing the output and a separate one messing with LD_LIBRARY_PATH.

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

@nickanderson nickanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems ok to me.

If pg_upgrade fails it is OK because we have several other options which we try during hub package upgrade.

To see any errors, run the upgrade with DEBUG=1 defined as an environment variable.

Ticket: ENT-12383
Changelog: title
…ARY_PATH of previous installation"

In the case of 3.21.5 (postgresql 15.6) to 3.25.0a (master, postgresql 17.0) pg_upgrade seems to work fine with the removal of LD_LIBRARY_PATH pointed at the backup.

In other cases we will simply ignore pg_upgrade failures and allow the subsequent migration methods to proceed.
This reverts commit e39924c.
@craigcomstock
craigcomstock merged commit 3242a5d into cfengine:master Oct 16, 2024
@craigcomstock
craigcomstock deleted the ENT-12383-3/master branch October 16, 2024 19:38
@craigcomstock

Copy link
Copy Markdown
Contributor Author

cherry picks
3.21.x: #1513
3.24.x: #1512

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.

4 participants