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

Generate/regenerate Yum repository metadata GPG signatures #322

Closed
wants to merge 1 commit into from

Conversation

PaulSD
Copy link
Contributor

@PaulSD PaulSD commented Jun 13, 2018

This is related to theforeman/puppet-certs#188

If a yum repomd GPG key is configured on an existing Pulp server that already has published repositories, then repomd signatures will need to be generated for those existing repositories.

manifests/repomd_signatures.pp Outdated Show resolved Hide resolved
@PaulSD PaulSD force-pushed the sign_repomd branch 2 times, most recently from 1d03d57 to 5ebd83f Compare July 31, 2018 23:19
@PaulSD
Copy link
Contributor Author

PaulSD commented Jul 31, 2018

I don't think these new test failures are caused by my changes...

@ekohl
Copy link
Member

ekohl commented Aug 15, 2018

Could you rebase on master? That should fix the tests.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

This will not be idempotent but I'm not sure I see an easy way to make it so. Perhaps if you extract the existing sig test to a separate script and add that as an unless to exec.

manifests/init.pp Outdated Show resolved Hide resolved
manifests/repomd_signatures.pp Outdated Show resolved Hide resolved
manifests/repomd_signatures.pp Outdated Show resolved Hide resolved
manifests/repomd_signatures.pp Outdated Show resolved Hide resolved
manifests/repomd_signatures.pp Outdated Show resolved Hide resolved
@PaulSD
Copy link
Contributor Author

PaulSD commented Aug 16, 2018

This will not be idempotent but I'm not sure I see an easy way to make it so. Perhaps if you extract the existing sig test to a separate script and add that as an unless to exec.

I'm not quite sure what you mean by this.
This script does nothing if the gpg signature files already exist, so by definition the script is idempotent.
However, this exec will always run even if the script isn't going to do anything, so puppet itself can't determine when changes are actually made by the script. Is that what you mean by "will not be idempotent"? If so, then yes, I can add an unless to exec to fix that problem.

@ehelms
Copy link
Member

ehelms commented Nov 18, 2019

Apologies for it having been a long time since addressing this. I will admittedly be a bit slow cycling on it but I will try to track this better to reduce that cycle time.

Can you explain a bit more about why the installer puppet module needs to handle signing the metadata? I would expect Pulp to handle this rather than having to make a change after Pulp has synced content to a location.

@PaulSD
Copy link
Contributor Author

PaulSD commented Nov 19, 2019

Pulp normally signs the metadata when publishing a repository:
https://github.com/pulp/pulp_rpm/blob/2.21-release/plugins/pulp_rpm/plugins/distributors/yum/metadata/repomd.py#L49

However, if metadata signing is enabled on an existing server (that already has published repositories), then the installer puppet module needs to generate signatures for those existing repositories.

@ekohl
Copy link
Member

ekohl commented May 11, 2021

At this point Katello has removed Pulp 2 and this module is only here to support Katello 3.18. No new features are added to that. That's why I'm closing this. This feature does IMHO belong in Pulp 3, but that's maintained in https://github.com/theforeman/puppet-pulpcore. Apologies for not properly prioritizing this in the Pulp 2 lifecycle.

@ekohl ekohl closed this May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants