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

Direct use of puppet::server::config causes variable problems #44

Closed
supine opened this issue Mar 6, 2013 · 6 comments
Closed

Direct use of puppet::server::config causes variable problems #44

supine opened this issue Mar 6, 2013 · 6 comments

Comments

@supine
Copy link

supine commented Mar 6, 2013

I was testing installation of foreman-proxy using another foreman server as ENC and also using the modules theforeman/puppet-apache, theforeman/puppet-puppet and theforeman/puppet-passenger

If I assigned the class foreman_proxy to this new host I would get the error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find template '' at /etc/puppet/environments/foreman/modules/puppet/manifests/config.pp:8 on node

and on the master would be:

(Scope(Class[Puppet::Config])) Could not look up qualified variable 'puppet::dir'; class puppet has not been evaluated

and

(Scope(Class[Puppet::Config])) Could not look up qualified variable 'puppet::agent_template'; class puppet has not been evaluated

This appears to be a result of foreman_proxy calling out directly to puppet::server::config
in manifests/config.pp

This wasn't an issue on the foreman server as I had an explicit node config and chained from puppet -> puppet::master -> foreman -> foreman_proxy but this is not something you can do with an ENC.

@domcleal
Copy link
Contributor

domcleal commented Mar 6, 2013

I'm trying to reproduce this (slightly differently, I admit) with puppet apply and can't:

# puppet apply --modulepath /nfs/code/foreman/foreman-installer -e 'include foreman_proxy' --noop
Notice: /Stage[main]/Xinetd::Install/Package[xinetd]/ensure: current_value absent, should be present (noop)
Notice: Class[Xinetd::Install]: Would have triggered 'refresh' from 1 events

and so on. Can you check the ENC output and see if there are any other classes included?

The stuff in foreman_proxy/manifests/config.pp is only referencing puppet::server::config if it exists, so it shouldn't be instantiating it.

@supine
Copy link
Author

supine commented Mar 6, 2013

If I strip it back to to just having the foreman_proxy class applied then I don't get this error.

However this server needs to have a puppet master managed as well. As soon as I put back the class puppet::server the above error is generated.

@domcleal
Copy link
Contributor

domcleal commented Mar 6, 2013

Ah, perhaps that's it. Try adding "puppet" as well as "puppet::server".

@supine
Copy link
Author

supine commented Mar 6, 2013

No luck.

classes:
"puppet::server":
puppet:
foreman_proxy:

Gives same error as above.

@supine
Copy link
Author

supine commented Mar 6, 2013

Tried with a bunch of combinations and it's actually just including puppet::server that triggers it, even without foreman_proxy.

Perhaps we should move this issue over there?

@domcleal
Copy link
Contributor

domcleal commented Mar 6, 2013

Agreed, it's a puppet::server -> puppet dependency that's the issue. Feel free to move the issue if you like, I don't mind.

@supine supine closed this as completed Mar 6, 2013
ehelms pushed a commit to ehelms/puppet-foreman_proxy that referenced this issue Aug 25, 2017
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

No branches or pull requests

2 participants