Hello, I am testing some schedule configurations and was wondering if I can use the schedule type in my own defines? As far as I can claim from my own tests, this is not possible? For example, the schedule "morning" does not work with my self-written define "my_crontab": ######################################### class crontab { schedule {"morning": range => "8-9", } my_crontab{"user-crontab": hostname => ''foobar001'', schedule => ''einmal'', } } ######################################### Am I missing something or is it impossible to use the schedule type with my own defines? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Feb 2, 5:18 am, Os <ozzim...@googlemail.com> wrote:> Hello, > > I am testing some schedule configurations and was wondering if I can > use the schedule type in my own defines? As far as I can claim from my > own tests, this is not possible? > > For example, the schedule "morning" does not work with my self-written > define "my_crontab": > > ######################################### > > class crontab { > schedule {"morning": > range => "8-9", > } > > my_crontab{"user-crontab": > hostname => ''foobar001'', > schedule => ''einmal'', > } > > } > > ######################################### > > Am I missing something or is it impossible to use the schedule type > with my own defines?You are missing something, I think. The ''schedule'' metaparameter can be used with any resource, including those of defined types. Could it be as simple as the fact that you name your schedule ''morning'', but assign a different, possibly missing, schedule ''einmal'' to the resource? Anyway, you didn''t specify what "does not work" means. What is the nature of the [mis]behavior you see? Is it possible that you have the wrong expectations? Schedules in Puppet limit when or how often resources are managed, but that''s modulated by when and how often the node checks in to request a catalog. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Feb 2, 3:34 pm, jcbollinger <John.Bollin...@stJude.org> wrote:> > You are missing something, I think. The ''schedule'' metaparameter can > be used with any resource, including those of defined types. > > Could it be as simple as the fact that you name your schedule > ''morning'', but assign a different, possibly missing, schedule ''einmal'' > to the resource? > > Anyway, you didn''t specify what "does not work" means. What is the > nature of the [mis]behavior you see? Is it possible that you have the > wrong expectations? Schedules in Puppet limit when or how often > resources are managed, but that''s modulated by when and how often the > node checks in to request a catalog. > > JohnAh, I am sorry. You are absolutly right! I have a typo in my example. Actually I use the schedule "morning" in my resource. Perhaps some background is useful: the define "my_crontab" is using a "cron" type in the background. When I did some tests, I inserted the schedule in the "cron" part and it worked. But when I try to use the schedule directly in the call of the define "my_crontab" (like in the example), it does not work. I am expecting in the example above that the resource my_crontab{"user- crontab"} is only activated during 8 and 9''o clock, assuming there is a puppet run at this time. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Feb 2, 9:10 am, Os <ozzim...@googlemail.com> wrote:> On Feb 2, 3:34 pm, jcbollinger <John.Bollin...@stJude.org> wrote: > > > > > You are missing something, I think. The ''schedule'' metaparameter can > > be used with any resource, including those of defined types.Hmm. That statement may have been overly optimistic. I think it''s pretty clear clear cut that schedules *should* work for defined type instances, but perhaps Puppet is buggy in that regard.> > Could it be as simple as the fact that you name your schedule > > ''morning'', but assign a different, possibly missing, schedule ''einmal'' > > to the resource? > > > Anyway, you didn''t specify what "does not work" means. What is the > > nature of the [mis]behavior you see? Is it possible that you have the > > wrong expectations? Schedules in Puppet limit when or how often > > resources are managed, but that''s modulated by when and how often the > > node checks in to request a catalog. > > > John > > Ah, I am sorry. You are absolutly right! I have a typo in my example. > Actually I use the schedule "morning" in my resource. > Perhaps some background is useful: the define "my_crontab" is using a > "cron" type in the background. > > When I did some tests, I inserted the schedule in the "cron" part and > it worked. But when I try to use the schedule directly in the call of > the define "my_crontab" (like in the example), it does not work. > I am expecting in the example above that the resource my_crontab{"user- > crontab"} is only activated during 8 and 9''o clock, assuming there is > a puppet run at this time.I don''t see anything wrong with your manifest or your expectations. I would submit a bug report / feature request. This seems to be related to, but distinct from, open (and accepted) feature request 5856: http://projects.puppetlabs.com/issues/5856. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Feb 2, 9:43 pm, jcbollinger <John.Bollin...@stJude.org> wrote:> > Hmm. That statement may have been overly optimistic. I think it''s > pretty clear clear cut that schedules *should* work for defined type > instances, but perhaps Puppet is buggy in that regard. > > I don''t see anything wrong with your manifest or your expectations. I > would submit a bug report / feature request. This seems to be related > to, but distinct from, open (and accepted) feature request 5856:http://projects.puppetlabs.com/issues/5856. > > JohnMany Thanks for the reply and the link. I will keep that in mind, For now I will simply set the schedule in the cron-resource as a workaround. Regards, Martin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, On 02/03/2012 08:38 AM, Os wrote:> On Feb 2, 9:43 pm, jcbollinger <John.Bollin...@stJude.org> wrote: >> >> Hmm. That statement may have been overly optimistic. I think it''s >> pretty clear clear cut that schedules *should* work for defined type >> instances, but perhaps Puppet is buggy in that regard. >> >> I don''t see anything wrong with your manifest or your expectations. I >> would submit a bug report / feature request. This seems to be related >> to, but distinct from, open (and accepted) feature request 5856:http://projects.puppetlabs.com/issues/5856. >> >> John > > Many Thanks for the reply and the link. I will keep that in mind, For > now I will simply set the schedule in the cron-resource as a > workaround.This reminds me a lot of http://projects.puppetlabs.com/issues/7928 Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Seemingly Similar Threads
- Puppet agent creates certificates for localhost.localdomain and does not pick up the changed hostname
- PC EU feedback: ability to remove all unmanaged resources
- How to escape exec command parameters?
- How to get an input file to a facter ?
- Thoughts about extlookup: http://blog.wl0.org/2011/05/thoughts-about-extlookup-in-puppet/