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 #16844 - remove discovery image installation #486

Closed
wants to merge 1 commit into from
Closed

fixes #16844 - remove discovery image installation #486

wants to merge 1 commit into from

Conversation

mmoll
Copy link
Contributor

@mmoll mmoll commented Oct 10, 2016

This should (and is) handled in puppet-foreman_proxy. If needed, there could be even a migration to transfer the values to foreman_proxy parameters, when it was enabled for foreman.

@domcleal
Copy link
Contributor

Isn't this here too because the plugin supports either installation with or without a smart proxy plugin?

@mmoll
Copy link
Contributor Author

mmoll commented Oct 11, 2016

@lzap could you have a look here?
@domcleal on the one hand yes, but on the other, are there any usecases where one has that image on the foreman server?

@lzap
Copy link
Member

lzap commented Oct 11, 2016

I don't understand the report - why puppet fails with the duplicate declaration now? Is this some new kind of check in newer Puppet version?

Anyway, discovery works just fine without any smart-proxy, it is not required at all. So this is the reason why it's here twice. Shall we rename the resource name or something to prevent the error?

@domcleal
Copy link
Contributor

It probably fails if install_images is enabled in both the foreman::plugin::discovery and foreman_proxy::plugin::discovery classes, which is correct. Renaming the resources is somewhat pointless if they're managing the same files.

@domcleal on the one hand yes, but on the other, are there any usecases where one has that image on the foreman server?

It might be that the Foreman and proxy are on the same host, so you'd only enable the foreman::plugin::discovery class, in which case you'd use this code.

It may just need a better error message.

@mmoll
Copy link
Contributor Author

mmoll commented Oct 11, 2016

Maybe it would be better to have the discovery image installation centralized and seperated from the core and proxy plugins somewhere?

@mmoll
Copy link
Contributor Author

mmoll commented Nov 8, 2016

@lzap
Copy link
Member

lzap commented Nov 8, 2016

Feel free to move it, I have no opinion on that. I'd rather stay away from Puppet.

@ekohl
Copy link
Member

ekohl commented Dec 15, 2016

@mmoll what's the plan for this?

@mmoll
Copy link
Contributor Author

mmoll commented Dec 17, 2016

There was no real consensus reached, the current situation is not optimal, but the error described in the issue only occurs when setting things manually.

@tuxmea
Copy link
Contributor

tuxmea commented Aug 27, 2017

theforeman/puppet-foreman_proxy#367 is not directly related to this issue.
This issue is due to duplicate resource declaration.

We can use the same pattern: switch from foreman::remote_file { <title>: ...} to ensure_resource('foreman::remote_file', ...)
On the other hand: why not make use of voxpupuli-archive?

@mmoll
Copy link
Contributor Author

mmoll commented Aug 27, 2017

The relation is that discovery (image) related things are in puppet-foreman and puppet-foreman_proxy

@tuxmea
Copy link
Contributor

tuxmea commented Aug 28, 2017

Yes. we have two options:

  1. use ensure_resource also on the define foreman::remote_file in both discovery classes
  2. move the discovery.pp to a separate place and include the class in puppet-foreman and puppet-foreman_proxy

Which option do you prefer?
Personally I would prefer option 2 as this removes duplicate code.

@mmoll
Copy link
Contributor Author

mmoll commented Aug 28, 2017

@lzap http://projects.theforeman.org/issues/9543 - what did you have exactly in mind there?

@lzap
Copy link
Member

lzap commented Aug 29, 2017

See #253 (comment)

@ekohl
Copy link
Member

ekohl commented Aug 29, 2017

Personally I still think the discovery plugin should only handle images on a proxy host and not the foreman (only) host. That's this PR and I think we should revisit this.

ekohl added a commit to ekohl/puppet-foreman that referenced this pull request Aug 31, 2017
The image downloading is tied to tftp and handled by the proxy. Since
puppet-foreman_proxy is already able to download images there's no sense
in duplicating the code here.

Based on theforeman#486

Closes theforemanGH-580
Closes theforemanGH-581
mmoll pushed a commit that referenced this pull request Aug 31, 2017
The image downloading is tied to tftp and handled by the proxy. Since
puppet-foreman_proxy is already able to download images there's no sense
in duplicating the code here.

Based on #486

Closes GH-580
Closes GH-581
@mmoll mmoll deleted the wipe_discovery_image branch August 31, 2017 15:16
cegeka-jenkins pushed a commit to cegeka/puppet-foreman that referenced this pull request Jul 24, 2019
The image downloading is tied to tftp and handled by the proxy. Since
puppet-foreman_proxy is already able to download images there's no sense
in duplicating the code here.

Based on theforeman#486

Closes theforemanGH-580
Closes theforemanGH-581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants