Hello,
the following small code works, but the file /tmp/test will never be
created because the schedule is skipped because running on an host.
1. site.pp:
2. test::test_define {hallo:
3. }
4. include test
5.
6. test/init.pp:
7. class test {
8. }
9. test/test_define.pp
10. define test::test_define {
11. schedule {$name:
12. period => daily,
13. range => ''2-4'',
14. repeat => 1;
15. }
16.
17. file {''/tmp/test'':
18. ensure => present,
19. schedule => $name;
20. }
21. }
22.
23. Debug Log:
24.
25.
26. Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml;
using pson
27. Info: Caching catalog for test2.zdkwh.mlrbw.net
28. Debug: Creating default schedules
29. Debug: Loaded state in 0.07 seconds
30. Info: Applying configuration version ''1379405805''
31. Debug: /Schedule[daily]: Skipping device resources because running
on a host
32. Debug: /Schedule[monthly]: Skipping device resources because running
on a host
33. Debug: /Schedule[hourly]: Skipping device resources because running
on a host
34. Debug: /Schedule[never]: Skipping device resources because running
on a host
35. *Debug:
/Stage[main]//Node[default]/Test::Test_define[hallo]/File[/tmp/test]: Not
scheduled*
36. *Debug:
/Stage[main]//Node[default]/Test::Test_define[hallo]/Schedule[hallo]:
Skipping device resources because running on a host*
37. Debug: /Schedule[weekly]: Skipping device resources because running
on a host
38. Debug: /Schedule[puppet]: Skipping device resources because running
on a host
39. Debug: Finishing transaction 70022790653200
40. Debug: Storing state
41. Debug: Stored state in 0.17 seconds
42. Notice: Finished catalog run in 0.26 seconds
43. Debug: report supports formats: b64_zlib_yaml pson raw yaml; using
pson
Thanks in advance!
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, September 17, 2013 5:37:36 AM UTC-5, jamido wrote:> > Hello, > > the following small code works, but the file /tmp/test will never be > created because the schedule is skipped because running on an host. >You are misinterpreting the output. File[''/tmp/test''] is not applied because the schedule assigned to it does not allow it to be applied during that run. *As a separate issue*, the schedule resource itself is not applied to the target node, but that''s meaningless because schedules have no physical manifestation on nodes. You may also be misunderstanding schedules in general. In particular, they do not schedule a resource to be applied at some later time; instead, they restrict whether resources can be applied during the current run. The schedule you are using says that each resource it is attached to can be applied only between 02:00 and 04:00 local time, and at most once a day. For it to be applied at all, the agent must run during the specified time window. If you are testing outside that window then you should always see the File skipped. 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi John, sorry for the late response - of course, schedules allow resources to be applied in the window. but after upgrading puppet from 0.25.4 to 3.2.4 some schedules are always ignored and resources gets never applied. It does not happen on all hosts ~250, only on some ~5. Jan -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, October 1, 2013 2:58:36 AM UTC-5, jamido wrote:> > Hi John, > > sorry for the late response - of course, schedules allow resources to be > applied in the window. but after upgrading puppet from 0.25.4 to 3.2.4 some > schedules are always ignored and resources gets never applied. It does not > happen on all hosts ~250, only on some ~5. > >That is not what your log fragment depicts. It shows a schedule being * obeyed*, preventing the resource to which it is assigned from being applied. If the schedule were ignored then Puppet would not skip the resource. If this is happening with the manifest you presented in your initial post then I can think of only a few likely explanations: 1. You are applying the catalog outside the schedule window (02:00 - 04:00 AM, any day of the week). 2. You are applying the catalog twice within one schedule window. 3. Your nodes *think* you are applying the catalog outside the schedule window, even though you''re not. With respect to (3), time synchronization does not usually present a problem because Puppet''s SSL infrastructure prevents nodes from connecting to the master if their clocks are too far off. However, you might nevertheless have a time discrepancy if some of your nodes are configured with the wrong time zone. 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Doleschal, Jan (LGL)
2013-Oct-01 13:32 UTC
AW: [Puppet Users] Re: Puppet ignores schedules
Hi John, Fix it. It was a Problem with the ruby version. Updated ruby from 1.8.7 to ruby 2.0 everything works fine now. I can only repeat myself, scheduled resources never gets applied. The other problem was that the old puppet option ignoreschedule ignored all schedules. With puppet 3.2.4 it is called ignoreschedules. Ignoreschedule must be called with a valid schedule name... . Thanks for helping Jan ______________________________________________________________ Jan Doleschal Landesamt für Geoinformation und Landentwicklung Baden-Württemberg (LGL) Abteilung 3 - Geodatenzentrum Ref. 31 Stuttgarter Straße 161 70806 Kornwestheim Tel.: +49 7154 9598 - 628 Fax: +7154 9598 -92- 628 E-Mail: Jan.Doleschal@lgl.bwl.de http://www.lgl-bw.de <http://www.lgl-bw.de/> ______________________________________________________________ Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] Im Auftrag von jcbollinger Gesendet: Dienstag, 1. Oktober 2013 15:07 An: puppet-users@googlegroups.com Betreff: [Puppet Users] Re: Puppet ignores schedules On Tuesday, October 1, 2013 2:58:36 AM UTC-5, jamido wrote: Hi John, sorry for the late response - of course, schedules allow resources to be applied in the window. but after upgrading puppet from 0.25.4 to 3.2.4 some schedules are always ignored and resources gets never applied. It does not happen on all hosts ~250, only on some ~5. That is not what your log fragment depicts. It shows a schedule being obeyed, preventing the resource to which it is assigned from being applied. If the schedule were ignored then Puppet would not skip the resource. If this is happening with the manifest you presented in your initial post then I can think of only a few likely explanations: 1. You are applying the catalog outside the schedule window (02:00 - 04:00 AM, any day of the week). 2. You are applying the catalog twice within one schedule window. 3. Your nodes think you are applying the catalog outside the schedule window, even though you''re not. With respect to (3), time synchronization does not usually present a problem because Puppet''s SSL infrastructure prevents nodes from connecting to the master if their clocks are too far off. However, you might nevertheless have a time discrepancy if some of your nodes are configured with the wrong time zone. John -- You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/EwAA-WIvC0A/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.