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

Do not use global environmentpath #227

Merged
merged 1 commit into from
Mar 9, 2019

Conversation

mattock
Copy link
Contributor

@mattock mattock commented Sep 11, 2018

This prevents the Kafo installer from crashing if the default (global)
environment, typically /etc/puppetlabs/code/environments/production, includes a
classes array that contains classes not provided by the installer. This is often
the case when running the Kafo installer on a production Puppetmaster where
environments have been deployed.

This prevents the Kafo installer from crashing if the default (global)
environment, typically /etc/puppetlabs/code/environments/production, includes a
classes array that contains classes not provided by the installer. This is often
the case when running the Kafo installer on a production Puppetmaster where
environments have been deployed.
@theforeman-bot
Copy link
Member

Do not merge! This patch has not been tested yet.

Can an existing organization member please verify this patch?

@mattock
Copy link
Contributor Author

mattock commented Sep 11, 2018

This issue has been discussed in more detail on Foreman Support forum. The resulting puppet.conf file looks like this:

[main]
color = false
environmentpath = /tmp/kafo_hiera20180911-30532-ekc6gy
evaltrace = true
hiera_config = /tmp/kafo_hiera20180911-30532-ekc6gy/hiera.conf
noop = false
profile = false
reports =
show_diff = true

This change has only been tested on Puppet 5.5.6. However, the environmentpath parameter seems to have been available as early as Puppet 3.x.

@ares
Copy link
Member

ares commented Oct 1, 2018

Thanks for the patch, @ekohl do you think this is going to work with foreman-installer in case hiera overrides are used?

@ekohl
Copy link
Member

ekohl commented Oct 3, 2018

I'm a bit unfamiliar with this part of kafo but I don't know if we really have environments. I'm wondering if it's good to set environmentpath to empty and only set the modulepath.

@ekohl
Copy link
Member

ekohl commented Dec 3, 2018

This is still on my radar, but haven't had time to verify it yet. It does look like we should also set basemodulepath to something we control to avoid things leaking into our environment.

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.

Apologies it took me so long to get to, but I've confirmed this works with Puppet 6.3.0.

@ekohl ekohl merged commit 2f78472 into theforeman:master Mar 9, 2019
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.

4 participants