Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENT-11853: Adjusted calling pg_upgrade during upgrade to include LD_LIBRARY_PATH of previous installation #1463

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

craigcomstock
Copy link
Contributor

pg_upgrade calls postgres which includes reference to libssl that may change during upgrade which will cause postgres to not be executable
Add LD_LIBRARY_PATH=$BACKUP_DIR/lib/ to address this issue.

Ticket: ENT-11853
Changelog: title

@craigcomstock craigcomstock marked this pull request as draft June 20, 2024 22:03
@craigcomstock
Copy link
Contributor Author

get a package Build Status

@craigcomstock
Copy link
Contributor Author

craigcomstock commented Jun 20, 2024

upgrade from 3.18.7 to 3.24.0a package built by jenkins worked with pg_upgrade, no mention of "cannot execute" for postgres command.

So I think this is a good change. Let's try with more platforms

@craigcomstock craigcomstock marked this pull request as ready for review June 20, 2024 22:28
@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

Before running through all platforms I needed to remove the workaround we had in place to skip presenting the log which might have had "cannot execute" for some platforms.

@cf-bottom I am now ready for jenkins to test this change

@cf-bottom
Copy link

@craigcomstock craigcomstock marked this pull request as draft June 20, 2024 23:54
@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins, go ahead, I cancelled the last one because I was considering using LD_PRELOAD instead of LD_LIBRARY_PATH but I think LD_LIBRARY_PATH is better. Either one of them can fail if the loader is in secure-execution mode (see man ld.so) but so far on one platform, debian-12, this was not the case and LD_LIBRARY_PATH did the trick and allowed pg_upgrade and postgres to execute with the old libssl1.1 and libcrypto1.1 libraries when newer versions were present in /var/cfengine/lib and would have cause a "cannot execute" to occur.

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins please, all platforms is ideal with deployment tests to check upgrades and such.

@cf-bottom
Copy link

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Nice work!

@craigcomstock craigcomstock changed the title Adjusted calling pg_upgrade during upgrade to include LD_LIBRARY_PATH of previous installation ENT-11853: Adjusted calling pg_upgrade during upgrade to include LD_LIBRARY_PATH of previous installation Jul 1, 2024
@craigcomstock
Copy link
Contributor Author

Instead of running CI/jenkins again, I'll just test the build that exists on the platforms I removed from exceptions. 👍 and then merge when I am satisfied.

@craigcomstock craigcomstock marked this pull request as ready for review July 1, 2024 18:44
… of previous installation

pg_upgrade calls postgres which includes reference to libssl that may change during upgrade which will cause postgres to not be executable
Add LD_LIBRARY_PATH=$BACKUP_DIR/lib/ to address this issue.

Ticket: ENT-11853
Changelog: title
…l library version changes during upgrades

Ticket: ENT-11853
Changelog: none
@craigcomstock
Copy link
Contributor Author

just get some packages, I made a bad edit to postinstall script that left a dangling fi

Build Status

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks!

@craigcomstock craigcomstock merged commit af9f612 into cfengine:master Jul 2, 2024
34 checks passed
@craigcomstock craigcomstock deleted the ENT-11853/master branch July 2, 2024 20:31
@craigcomstock
Copy link
Contributor Author

cherry picked to 3.21.x: #1476

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