Is class and environment importing sensitive

Hello,

I recently got back into foreman and puppet. I upgraded my foreman instance to 1.1 stable and the puppet infra is 2.7. I don't seem to be able to import classes and environments properly in foreman. I just get the changes not detected pop up.

puppet.conf looks like this:-

cat /etc/puppet/puppet.conf

[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
confdir = /etc/puppet

[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
report = true
listen = true
environment = production

[master]
modulepath = $confdir/environments/$environment/modules:$confdir/modules
external_nodes = /etc/puppet/node.rb
node_terminus = exec
autosign = $confdir/autosign.conf { mode = 664 }
storeconfigs = true
dbadapter = mysql
dbuser = puppetier
dbpassword = piero
dbserver = localhost
rrddir=/var/lib/puppet/rrd
rrdinterval=$runinterval
rrdgraph=true
reports=log, foreman

[production]
manifest = /etc/puppet/environments/production/manifests/site.pp
modulepath = /etc/puppet/environments/production/modules

[dev]
manifest = /etc/puppet/dev/manifests/site.pp
modulepath = /etc/puppet/dev/modules
[root@shiba modules]#

which sort of works out ok when I query the API via curl I get the right answers

[root@shiba modules]# curl http://puppet.hq.meibin.net:8443/puppet/environments
["dev","dev","production","production"][root@shiba modules]#

though I am not sure why I get two of each. But these don't appear in the GUI. I tested this by adding a test environment and it won't appear in the GUI but in curl

[root@shiba modules]# curl http://puppet.hq.meibin.net:8443/puppet/environments
["dev","production","test","production","dev"][root@shiba modules]#
[root@shiba modules]#

Is the GUI sensitive to something or am I doing something wrong here and others have this sorted already. The puppet master is on the same host as foreman and the foreman-proxy has a proper puppet_conf directive.

Thanks

I think the issue is here - you've got 2 directives that read into
/etc/puppet/environments (one dynamic, one for production), so the
conf-file parser in the proxy is correctly reading all the specified
environments.

I'm not sure why that would cause it not show in the UI, but perhaps you
can track down the multi-env problem first?

Greg

··· On 25 March 2013 12:57, Luke Kearney wrote:

[master]
modulepath = $confdir/environments/$environment/modules:$confdir/modules
[production]
manifest = /etc/puppet/environments/production/manifests/site.pp
modulepath = /etc/puppet/environments/production/modules
[dev]
manifest = /etc/puppet/dev/manifests/site.pp
modulepath = /etc/puppet/dev/modules

Yes indeed - once I remove the hardcoded references to [production] and [dev] they no longer double up when I query with curl but dev still does not appear in the GUI.

··· On Mar 25, 2013, at 10:03 PM, Greg Sutcliffe wrote:

On 25 March 2013 12:57, Luke Kearney luke@kearney.jp wrote:
[master]
modulepath = $confdir/environments/$environment/modules:$confdir/modules
[production]
manifest = /etc/puppet/environments/production/manifests/site.pp
modulepath = /etc/puppet/environments/production/modules
[dev]
manifest = /etc/puppet/dev/manifests/site.pp
modulepath = /etc/puppet/dev/modules

I think the issue is here - you’ve got 2 directives that read into /etc/puppet/environments (one dynamic, one for production), so the conf-file parser in the proxy is correctly reading all the specified environments.

I’m not sure why that would cause it not show in the UI, but perhaps you can track down the multi-env problem first?

Greg