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-10710: Fixed issue with using pg_upgrade on ubuntu-16 hub installer upgrade #1306

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

craigcomstock
Copy link
Contributor

Ticket: ENT-10710
Changelog: title

@craigcomstock
Copy link
Contributor Author

try another package with a "workaround" though I'm not sure of the values of OS_VERSION and OS_NAME so added a debug: Build Status

@craigcomstock craigcomstock marked this pull request as draft September 29, 2023 15:53
Issue is that ubuntu-16 has problems with pg_upgrade due to backup/bin/postgres
"cannot execute" during it's checks.
This is fine since we have other ways to migrate that work.

Ticket: ENT-10710
Changelog: title
@craigcomstock craigcomstock marked this pull request as ready for review September 29, 2023 16:26
@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

bootstrap and sequential tests are ssh exchange flakes and restorecon issues, known. ubu16 hub upgrade from 3.18.5 to master worked as expected: pg_upgrade fails but doesn't fail the test due to us now not tailing the pg_upgrade failure logs

14:40:03 34.253.181.170	(Reading database ... 67041 files and directories currently installed.)
14:40:03 34.253.181.170	Preparing to unpack .../cfengine-nova-hub_3.23.0a.e3f612e29~29213.ubuntu16_amd64.deb ...
14:40:03 34.253.181.170	Attempting to migrate Mission Portal database. This can break stuff.
14:40:03 34.253.181.170	Copy will be created in /var/cfengine/state/pg/backup dir.
14:40:03 34.253.181.170	It can be disabled by shutting down CFEngine and removing/renaming /var/cfengine/state/pg/data prior to upgrade.
14:40:03 34.253.181.170	Press Ctrl-C in the next 15 seconds if you want to cancel...
14:40:03 34.253.181.170	Ok, moving on...
14:40:03 34.253.181.170	Moving old data and copying old binaries to /var/cfengine/state/pg/backup
14:40:03 34.253.181.170	A previous version of CFEngine Mission Portal was found,
14:40:03 34.253.181.170	creating a backup of it at /tmp/cfengine-htdocs.tar.gz
14:40:03 34.253.181.170	Purging old version from /var/cfengine/httpd/htdocs
14:40:03 34.253.181.170	Keeping only what's listed in preserve_during_upgrade.txt file
14:40:03 34.253.181.170	Unpacking cfengine-nova-hub (3.23.0a.e3f612e29~29213.ubuntu16) over (3.18.5-1.ubuntu16) ...
14:40:03 34.253.181.170	dpkg: warning: unable to delete old directory '/var/cfengine/httpd/php/lib/php/extensions/no-debug-non-zts-20200930': Directory not empty
14:40:03 34.253.181.170	Setting up cfengine-nova-hub (3.23.0a.e3f612e29~29213.ubuntu16) ...
14:40:03 34.253.181.170	cfapache folder already exists, deleting it
14:40:03 34.253.181.170	Warning: not enough total memory needed to use the CFEngine
14:40:03 34.253.181.170	recommended PostgreSQL configuration, using the defaults.
14:40:03 34.253.181.170	Installing the PostgreSQL default postgresql.conf file as /var/cfengine/state/pg/data/postgresql.conf.new.
14:40:03 34.253.181.170	Please review it and update /var/cfengine/state/pg/data/postgresql.conf accordingly.
14:40:03 34.253.181.170	Migrating database using pg_upgrade utility...
14:40:03 34.253.181.170	
14:40:03 34.253.181.170	Migration using pg_upgrade failed.
14:40:03 34.253.181.170	
14:40:03 34.253.181.170	Installing the PostgreSQL default postgresql.conf file as /var/cfengine/state/pg/data/postgresql.conf.new.
14:40:03 34.253.181.170	Please review it and update /var/cfengine/state/pg/data/postgresql.conf accordingly.
14:40:03 34.253.181.170	Migrating database using dumpall | psql way...
14:40:03 34.253.181.170	Migration done, cleaning up
14:40:03 34.253.181.170	Processing triggers for ureadahead (0.100.0-19.1) ...
14:40:03 34.253.181.170	Processing triggers for systemd (229-4ubuntu21.22) ...

I think this is nearly "ready to go". I might check the github CI failure, seeing exit 42 makes me think it ran an old version of the code maybe as I had put an "exit 42" in there to debug.

@craigcomstock
Copy link
Contributor Author

maybe the BUILDSCRIPTS sha didn't change properly for the package and the package was cached

CORE_SHA: e3f612e
ENTERPRISE_SHA: 7230983
NOVA_SHA: 61f4b516
MASTERFILES_SHA: c6c78bd
MISSION_PORTAL_SHA: b028370d
BUILDSCRIPTS_SHA: b028370d
PACKAGE_SHA=0455c22d

yep

Cache restored successfully
Cache restored from key: packages-0455c22d

Will see if I can fix since I am here in buildscripts already. :)

Ticket: none
Changelog: none
@craigcomstock
Copy link
Contributor Author

cherry picks: #1307 and #1308

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.

Weird. But I'd do minimum required on Ubuntu 16 and wait for it to be gone soon. So ACK.

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

the upgrade works fine, just uses a fall-back method

  • ref slack

ACK

@craigcomstock craigcomstock merged commit 43003bd into master Oct 2, 2023
2 checks passed
@craigcomstock craigcomstock deleted the ENT-10710/master branch October 2, 2023 13:19
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