@Antoine you are exactly correct.  After creating an environment.conf file 
for my 'test' environment and setting 'environment_timeout = 0', it seems 
the cache is being cleared after each run and the appropriate changes are 
being reflected on my test clients.  I opted to create a .conf file for my 
specific environment and not change it globally as that seemed appropriate.

Thank you to the folks who took their own time to post suggestions and 
solutions to this one.

Cheers,

m.

On Friday, September 5, 2014 5:10:38 AM UTC-7, Antoine Cotten wrote:
>
> Hi Mike,
>
> It's very likely due to Directory Environments caching. By the default the 
> environment 
> timeout 
> <https://docs.puppetlabs.com/references/3.7.latest/configuration.html#environmenttimeout>
>  
> is 3m, which means you whole environment will cached during this time.
>
> You can enforce the value of this parameter to 0 if you do some testing 
> (make sure to restart your master), either per environment or globally in 
> your puppet.conf file.
>
> More information here: 
> https://docs.puppetlabs.com/puppet/latest/reference/environments_configuring.html#environmenttimeout
>
> Cheers,
>
> Toni
>
>
>
> On Thursday, September 4, 2014 9:28:10 PM UTC+2, Mike Reed wrote:
>>
>> Greetings,
>>
>> I have a class for which I would like to simply print a few parameters 
>> about a node, before actually running any additional modules on the client 
>> itself.  The problem I'm seeing is that after making changes to the class, 
>> I don't see them being propagated to the puppet client.  Occasionally if I 
>> restart puppet services on both client and master, the changes will get 
>> pulled down.  In other occasions, after a certain amount of time, the 
>> changes will just magically appear to get pulled down by the client.  Does 
>> anybody know why this may be occurring?  It's driving me mad.
>>
>> I have a vanilla puppet client running puppet 3.6.2 and a puppet master 
>> running version 3.6.2. and both have been recently built.
>>
>> *Site.pp:*
>>
>> # test node
>> node seanconnery-01 {
>>   include role
>> }
>>
>> class role {
>>   include profile::base
>> }
>>
>> class profile::base {
>>   include sys_ident
>> }
>>
>>
>> *sys_ident/init.pp*
>>
>> class sys_ident {
>>   notify { 'system hostname':
>>     withpath => true,
>>     name     => "my fqdn is $fqdn",
>>     }
>>
>>   notify {'network location':
>>     withpath => true,
>>     name     => "my network is ${network}",
>>   }
>> }
>>
>> *Upon running the client, I get the expected output:*
>> seanconnery-01:~$ sudo puppet agent -tv
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts in /var/lib/puppet/lib/facter/network.rb
>> Info: Caching catalog for seanconnery-01.domain
>> Info: Applying configuration version '1409858463'
>> Notice: /Stage[main]/Sys_ident/Notify[network location]/message: my 
>> network is greenzone
>> Notice: /Stage[main]/Sys_ident/Notify[network location]/message: defined 
>> 'message' as 'my network is greenzone'
>> Notice: /Stage[main]/Sys_ident/Notify[system hostname]/message: my fqdn 
>> is seanconnery-01.domain
>> Notice: /Stage[main]/Sys_ident/Notify[system hostname]/message: defined 
>> 'message' as 'my fqdn is seanconnery-01.domain
>> Notice: Finished catalog run in 0.04 seconds
>>
>> *However, if I add another notify to the sys_ident/init.pp like so:*
>>
>> class sys_ident {
>>   notify { 'system hostname':
>>     withpath => true,
>>     name     => "my fqdn is $fqdn",
>>     }
>>
>>   notify {'network location':
>>     withpath => true,
>>     name     => "my network is ${network}",
>>   }
>>
>>   notify {'swapfree':
>>     withpath => true,
>>     name     => "my swap is ${swapfree}",
>>   }
>> }
>>
>> *I get the following on my client:*
>> seanconnery-01:~$ sudo puppet agent -tv
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts in /var/lib/puppet/lib/facter/network.rb
>> Info: Caching catalog for seanconnery-01.domain
>> Info: Applying configuration version '1409858679'
>> Notice: /Stage[main]/Sys_ident/Notify[network location]/message: my 
>> network is greenzone
>> Notice: /Stage[main]/Sys_ident/Notify[network location]/message: defined 
>> 'message' as 'my network is greenzone'
>> Notice: /Stage[main]/Sys_ident/Notify[system hostname]/message: my fqdn 
>> is seanconnery-01.domain'
>> Notice: /Stage[main]/Sys_ident/Notify[system hostname]/message: defined 
>> 'message' as 'my fqdn is seanconnery-01.domain'
>> Notice: Finished catalog run in 0.04 seconds
>>
>> After a certain amount of undetermined time, the client will finally 
>> pickup the changes but there's no rhyme or reason to it.
>> Has anybody else ever seen this behavior?  I can't for the life of me 
>> figure it out.
>>
>> As always, your help is much appreciated.
>>
>> m.
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e4ba4ed1-e3d9-4baf-af1b-cfc1e8cabfe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to