Issue #4850 has been updated by Chuck Schweizer.

What I was trying to say is:
1)  The client will follow the schedule if you use " puppet apply mynotify.pp "
     a)  ie.  it will not run because it is outside the window.
2)  If you run this code using " puppet agent " (executing from a puppetmaster) 
  it will ignore the schedule.
     a) ie.  it WILL run even though it is outside the window.

The question is which is the bug
1)  the client not running the code outside the window
or
2)  the master running the code outside the window

It is expected when you include "schedule" when calling a definition that is 
passes as a variable? or that it acts on it as a schedule?  The "apply" and 
"agent" respond differently and should be the same.

----------------------------------------
Bug #4850: Schedule does not always work as expected when executed via 
puppetmaster/client
http://projects.puppetlabs.com/issues/4850

Author: Chuck Schweizer
Status: Needs more information
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected version: 2.6.1
Keywords: 
Branch: 


The following code works correctly when run on a puppet client via  "puppet 
apply".  But if the same code is used from a puppetmaster it does not follow 
the schedule.

    class mynotify {
        $projects="TEST"
        schedule {
        sched_15to20:
        period => daily,
        range => "15 - 20",
        repeat => 48;
      }
      if ($projects) {
        mynotify::myproject { $projects:
        schedule => "sched_15to20";
      }
      }
      define myproject() {
        notify { "found $name": }
      } 
    }

Here is the output when run from a puppet master

    $ date
    Mon Sep 27 11:12:44 CDT 2010
    $ puppet apply -v --test
    info: Retrieving plugin
    info: Caching catalog for puppetcleint1
    info: Applying configuration version '1285603757'
    notice: found TEST
    notice: /Stage[main]/Mynotify/Mynotify::Myproject[TEST]/Notify[found 
TEST]/message: defined 'message' as 'found TEST'
    notice: Finished catalog run in 7.65 seconds

This message does not produce output if run via puppet apply


    - &id131 !ruby/object:Puppet::Relationship
      source: *id012
      target: &id017 !ruby/object:Puppet::Resource
        catalog: *id001
        exported: false
        file: 
/var/opt/puppet/environments/os_test_env/modules/mynotify/manifests/init.pp
        line: 9
        parameters:
          !ruby/sym range: 15 - 20
          !ruby/sym repeat: "48"
          !ruby/sym period: daily
        tags:
          - schedule
          - sched_15to20
          - class
          - mynotify
          - node
          - basenode
        title: sched_15to20
        type: Schedule
    - &id135 !ruby/object:Puppet::Relationship
      source: *id012
      target: &id013 !ruby/object:Puppet::Resource
        catalog: *id001
        exported: false
        file: 
/var/opt/puppet/environments/os_test_env/modules/mynotify/manifests/init.pp
        line: 14
        parameters:
          !ruby/sym schedule: sched_15to20
        tags:
          - mynotify::myproject
          - mynotify
          - myproject
          - test
          - class
          - node
          - basenode
        title: TEST
        type: Mynotify::Myproject




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to