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

include all pulpcore plugins conditionally #311

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jan 4, 2021

No description provided.

Comment on lines +408 to +409
if $enable_docker {
include pulpcore::plugin::container
Copy link
Member Author

Choose a reason for hiding this comment

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

wasn't exactly sure about this one

@evgeni
Copy link
Member Author

evgeni commented Jan 4, 2021

and should certguard only be loaded if deb or rpm are enabled?

@ekohl
Copy link
Member

ekohl commented Jan 4, 2021

and should certguard only be loaded if deb or rpm are enabled?

If deb / rpm require certguard, the actual classes could require them, right? So https://github.com/theforeman/puppet-pulpcore/blob/master/manifests/plugin/rpm.pp. I'm not sure if it should be done unconditionally though. Not too familiar with the actual internals.

@evgeni
Copy link
Member Author

evgeni commented Jan 4, 2021

Well, they don't require it. Without you still can do unprotected repos, but when you want sub-man "protection", you need certguard.

Maybe @jlsherrill has an opinion?

@ekohl
Copy link
Member

ekohl commented Jan 4, 2021

Oh yes, I recall that conversation. With Puppet you can repeat include statements, so it's fine to have:

if $rpm {
  include pulpcore::plugin::rpm
  include pulpcore::plugin::certguard
}

if $deb {
  include pulpcore::plugin::deb
  include pulpcore::plugin::certguard
}

@evgeni
Copy link
Member Author

evgeni commented Jan 5, 2021

But that only works as long as you do include and not pass params to class, so IMHO the most future proof way is

if ($rpm || $deb) {
  include …
}

@jlsherrill
Copy link
Contributor

Generally makes sense to me. I think for now we should likely always deploy certguard. For things like smart proxy syncing, we always just try to create one if it doesn't exist. we could enhance this to only create it if there's at least one yum or deb repo to be synced, but today thats not the case

Copy link
Member

@ehelms ehelms left a comment

Choose a reason for hiding this comment

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

Based on @jlsherrill comment, I think this can go in as is.

@ekohl
Copy link
Member

ekohl commented Jan 12, 2021

@jlsherrill is there a reason to have certguard if you don't have RPMs nor debs?

@jlsherrill
Copy link
Contributor

jlsherrill commented Jan 12, 2021

@ekohl the reason is that katello today expects rhsm certguard to be present when 'syncing' a smart proxy. It tries to create one via the api. We can enhance katello to be smarter about this (feel free to file an issue), but its not there today.

Aside from today's behavior, no, there is no reason

@ekohl
Copy link
Member

ekohl commented Jan 12, 2021

That is useful information to document somewhere. Either in this module's README, in init.pp as a description of what the module does or inline in the code. Maybe there's even a better place that I haven't thought of.

@ehelms
Copy link
Member

ehelms commented Jan 12, 2021

To move this along and save some time, I opened #312 so at least when looking at the code its clear. I think if that works, then we can pull these in and I can update my big Pulp 3 PR.

@ehelms ehelms merged commit f91166a into theforeman:master Jan 12, 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.

5 participants