Finally found the issue
I never looked into the /etc/puppet directory(my bad), there was the issue,
a strange one although but here is what happened, in there were two
files(wish I knew why there were that second if we use puppet 0.24.8):
puppet.conf
puppetd.conf
Same content, nothing different, I don't declare the environment in there as
I use it in /etc/sysconfig/puppet
[app02 ~]$ grep environment /etc/puppet/puppet.conf /etc/puppet/puppetd.conf
[app02 ~]$ diff /etc/puppet/puppet.conf /etc/puppet/puppetd.conf
[app02 ~]# /usr/sbin/puppetd -t --environment=*development*
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
info: Retrieving plugins
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
info: mount[localhost]: Mounted /
info: mount[modules]: Mounted
info: mount[plugins]: Mounted
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
info: Sent transaction report in 1.47 seconds
notice: Finished catalog run in 16.85 seconds
[app02 ~]# grep -m2 -P "development|production"
/var/lib/puppet/localconfig.yaml
file: /opt/puppet/*production*/classes/yumrepos.pp
file: /opt/puppet/*production*/classes/yumrepos.pp
Fixing:
*[app02 ~]# rm /etc/puppet/puppetd.conf*
*rm: remove regular file `/etc/puppet/puppetd.conf'? y*
[app02 ~]# /usr/sbin/puppetd -t --environment=*development*
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
info: Retrieving plugins
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
info: mount[localhost]: Mounted /
info: mount[modules]: Mounted
info: mount[plugins]: Mounted
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
info: Loading fact drac
info: Loading fact rhelver
info: Loading fact sserial
notice:
//Node[app02.example.com]/common::ldap/Sudo::Config[standard]/Package[sudo-ldap]/ensure:
removed
notice:
//Node[app02.example.com]/common::ldap/Sudo::Config[standard]/Package[sudo]/ensure:
created
info: Sent transaction report in 0.37 seconds
notice: Finished catalog run in 18.09 seconds
[app02 ~]# grep -m2 -P "development|production"
/var/lib/puppet/localconfig.yaml
file: /opt/puppet/*development*/site.pp
file: /opt/puppet/*development*/classes/common.pp
So what is doing puppetd is reading both files and for some reason ignoring
the --environment flag via command line or the flag in the
/etc/sysconfig/puppet when bringing up the daemon with the
/etc/init.d/puppet script.
Doing a strace I see both files are being opened with puppetd:
open("/etc/puppet/puppetd.conf", O_RDONLY) = 3
open("/etc/puppet/puppet.conf", O_RDONLY) = 4
I assume it attempts to read puppetd.conf as it was the old config file, but
should it ignore the environment flag as it's doing it?
Thanks
On Thu, Mar 18, 2010 at 10:24 AM, Tony G. <[email protected]> wrote:
> When no environment is defined it uses production, per my notes:
>
>
> environments = production,testing,development
> manifest = /opt/puppet/production/site.pp
> modulepath = /opt/puppet/production/modules
>
> This is part of [main].
>
>
>
> On Wed, Mar 17, 2010 at 5:00 PM, Rob McBroom <[email protected]>wrote:
>
>> How is the environment determined when you don’t specify one? On my
>> systems, it seems that the `--environment` option is completely ignored. I
>> imagine this is because the external information (from LDAP in my case)
>> always takes precedence.
>>
>> --
>> Rob McBroom
>> <http://www.skurfer.com/>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<puppet-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
>
> --
> Tony
>
--
Tony
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.