On Tuesday, December 29, 2015 at 2:00:29 PM UTC-6, Aaron Russell wrote:
>
> When using notify to restart a service after a directory sync (File 
> resource with recurse) and tags the service never restarts. 
> I tried to look through the puppet bugs but could not find any. 
> Does anyone have any ideas?
>
> Code i tested with. 
> class test {
>   tag 'blue'
>    
>     file { "/tmp/foo":
>       ensure   => directory,
>       recurse  => true,
>       source   => 'puppet:///modules/test',
>       notify   => Service["bluetooth"],
>     }
>     service { 'bluetooth' :
>       ensure    => running,
>     }
> }
> include test
>
>
> Using either --tags test or --tags blue also tried --tags blue,test the 
> service Bluetooth wont restart. 
>
> Here is a snippet of debug log
> Debug: Caching environment 'production' (ttl = 0 sec)
> Notice: /Stage[main]/Test/File[/tmp/foo]/ensure: current_value absent, 
> should be directory (noop)
> Debug: /Stage[main]/Test/File[/tmp/foo]: The container /tmp/foo will 
> propagate my refresh event
> Notice: /Stage[main]/Test/File[/tmp/foo/test]/ensure: current_value 
> absent, should be directory (noop)
> Debug: /Stage[main]/Test/File[/tmp/foo/test]: The container /tmp/foo will 
> propagate my refresh event
> Notice: /Stage[main]/Test/File[/tmp/foo/test/one]/ensure: current_value 
> absent, should be file (noop)
> Debug: /Stage[main]/Test/File[/tmp/foo/test/one]: The container /tmp/foo 
> will propagate my refresh event
> Debug: /tmp/foo: Not tagged with blue
> Debug: /tmp/foo: Resource is being skipped, unscheduling all events
> Info: /tmp/foo: Unscheduling all events on /tmp/foo
> Debug: Executing: '/usr/bin/systemctl is-active bluetooth'
> Debug: Class[Test]: Not tagged with blue
> Debug: Class[Test]: Resource is being skipped, unscheduling all events
> Debug: Stage[main]: Not tagged with blue
> Debug: Stage[main]: Resource is being skipped, unscheduling all events
>
>

Something is very strange here.  Leaving the File resource aside, this ...

class test {
  tag 'blue'
  ...
}



... is inconsistent with ...


Debug: Class[Test]: Not tagged with blue
>


My first guess would be that you have a caching issue, so that the master 
is not using the latest version of your class.  If you have configured a 
cache timeout for the environment in question then you can wait at least 
that long after changing any classes to ensure that the latest versions 
will be seen.  Whether you have configured a timeout or not performing a 
[graceful] server restart will definitely effect cache clearing.


John

-- 
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/f8a316f4-0236-453f-a2ef-254b0657cee7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to