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

Fixes #36030 - Ensure HStore is enabled for Pulp 3.22 support #275

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Feb 1, 2023

Pulpcore 3.22 will start using HStore, which is in postgresql-contrib. This ensures it's installed.

This is all theoretical and I haven't tested this out yet. Just making sure this is tracked somehow.

@ianballou
Copy link
Contributor

Pulpcore 3.22 will start using HStore[1], which is in
postgresql-contrib. This ensures it's installed and enabled on the DB.
That needs to be done by a super user, so it can't be done in regular DB
migrations.

[1]: pulp/pulpcore#3427
@ekohl ekohl changed the title Ensure postgresql-contrib is installed for HStore Fixes #36030 - Ensure HStore is enabled Feb 1, 2023
@@ -14,6 +15,12 @@
before => Pulpcore::Admin['migrate --noinput'],
}

postgresql::server::extension { "hstore for ${pulpcore::postgresql_db_name}":
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like Pulp creates the extension here in their migration: https://github.com/pulp/pulpcore/pull/3427/files#diff-6bc6ee115c471f5d7f62c7cabd997b6197ae986c46cff92096f43b8264507a2dR40

With HStoreExtension()

But I'm guessing it doesn't hurt to have it in two places!

Copy link
Member Author

Choose a reason for hiding this comment

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

I went with this since the issue mentioned that it needs super user privileges on PG < 13. We're on PG 12 now.

Having it in the Django migrations will also make sure it fails if it isn't present, and do the right thing on newer PG.

@ekohl ekohl added the Enhancement New feature or request label Feb 1, 2023
Copy link
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

This worked for me on a Katello development setup!

@ekohl ekohl changed the title Fixes #36030 - Ensure HStore is enabled Fixes #36030 - Ensure HStore is enabled for Pulp 3.22 support Feb 15, 2023
@ekohl ekohl marked this pull request as ready for review February 15, 2023 15:21
@ekohl
Copy link
Member Author

ekohl commented Feb 15, 2023

https://yum.theforeman.org/pulpcore/3.22/GPG-RPM-KEY-pulpcore is missing, so it fails.

@ianballou
Copy link
Contributor

[test]

@ianballou
Copy link
Contributor

@ekohl I'm not sure how to rekick the tests, but the GPG key should be there now.

@evgeni
Copy link
Member

evgeni commented Feb 15, 2023

Still failing :(

@ekohl
Copy link
Member Author

ekohl commented Feb 15, 2023

Looks like the GPG key doesn't match what was used to actually sign the release:

  Error: Execution of '/usr/bin/dnf -d 0 -e 1 -y install pulpcore' returned 1: The GPG keys listed for the "Pulpcore 3.22" repository are already installed but they are not correct for this package.
  Check that the correct key URLs are configured for this repository.. Failing package is: python39-aiodns-3.0.0-3.el8.noarch
   GPG Keys are configured as: https://yum.theforeman.org/pulpcore/3.22/GPG-RPM-KEY-pulpcore
  Public key for python39-aiofiles-22.1.0-1.el8.noarch.rpm is not installed. Failing package is: python39-aiofiles-22.1.0-1.el8.noarch
   GPG Keys are configured as: https://yum.theforeman.org/pulpcore/3.22/GPG-RPM-KEY-pulpcore
  Public key for python39-aiohttp-3.8.3-2.el8.x86_64.rpm is not installed. Failing package is: python39-aiohttp-3.8.3-2.el8.x86_64
   GPG Keys are configured as: https://yum.theforeman.org/pulpcore/3.22/GPG-RPM-KEY-pulpcore
  Public key for python39-aioredis-2.0.1-2.el8.noarch.rpm is not installed. Failing package is: python39-aioredis-2.0.1-2.el8.noarch
   GPG Keys are configured as: https://yum.theforeman.org/pulpcore/3.22/GPG-RPM-KEY-pulpcore
  Public key for python39-aiosignal-1.3.1-1.el8.noarch.rpm is not installed. Failing package is: python39-aiosignal-1.3.1-1.el8.noarch

@ekohl
Copy link
Member Author

ekohl commented Feb 15, 2023

@Odilhao are you aware of the above error?

@Odilhao
Copy link
Member

Odilhao commented Feb 15, 2023

@Odilhao are you aware of the above error?

No, I'm not sure why it's showing gpg errors

@Odilhao
Copy link
Member

Odilhao commented Feb 15, 2023

Looking at the signature for aiosignal

warning: https://yum.theforeman.org/pulpcore/3.22/el8/x86_64/python39-aiosignal-1.3.1-1.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID b3cf4900: NOKEY
Signature   : RSA/SHA256, Mon 13 Feb 2023 07:46:54 PM UTC, Key ID 9fbe42b1b3cf4900

It shows the same Key ID as the one for Pulpcore 3.22.2

warning: https://yum.theforeman.org/pulpcore/3.22/el8/x86_64/python39-pulpcore-3.22.2-4.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID b3cf4900: NOKEY
Signature   : RSA/SHA256, Tue 14 Feb 2023 06:06:02 PM UTC, Key ID 9fbe42b1b3cf4900

@Odilhao
Copy link
Member

Odilhao commented Feb 15, 2023

[test]

@evgeni
Copy link
Member

evgeni commented Feb 15, 2023

[test] doesn't work with github actions, I kicked the failed ones for ya

@ekohl
Copy link
Member Author

ekohl commented Feb 15, 2023

It appears to be passing now. Perhaps some weird cached content in the CDN?

@Odilhao
Copy link
Member

Odilhao commented Feb 15, 2023

I think the GPG cached in the CDN had some problem, after cleaning the cache it worked.

@evgeni
Copy link
Member

evgeni commented Feb 15, 2023

Quite possible, yes.

@evgeni evgeni merged commit ef0762a into theforeman:master Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants