client not seeing changes made on puppetmaster

39 views
Skip to first unread message

Mike Reed

unread,
Sep 4, 2014, 3:28:10 PM9/4/14
to puppet...@googlegroups.com
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.




Brian Wilkins

unread,
Sep 4, 2014, 4:57:05 PM9/4/14
to puppet...@googlegroups.com
You might want to file a bug, as this was supposed to be fixed in Puppet 2.7

http://projects.puppetlabs.com/issues/5318

José Luis Ledesma

unread,
Sep 5, 2014, 4:08:51 AM9/5/14
to puppet...@googlegroups.com


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0b060bc0-fb2e-4d72-80e9-063111dbf8ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
José Luis Ledesma

Antoine Cotten

unread,
Sep 5, 2014, 8:10:38 AM9/5/14
to puppet...@googlegroups.com
Hi Mike,

It's very likely due to Directory Environments caching. By the default the environment timeout 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

Mike Reed

unread,
Sep 5, 2014, 3:19:53 PM9/5/14
to puppet...@googlegroups.com
@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.
Reply all
Reply to author
Forward
0 new messages