Issue #11407 has been updated by Oliver Hookins.

Status changed from Re-opened to Closed

The actual code looks like this:

<pre>

  # Start listening for events.  We're pretty much just listening for
  # timer events here.
  def start
    # Create our timer.  Puppet will handle observing it and such.
    timer = EventLoop::Timer.new(:interval => Puppet[:runinterval], :tolerance 
=> 1, :start? => true) do
      run
    end

    # Run once before we start following the timer
    timer.sound_alarm
  end
</pre>

So there should be one run before the timer is followed. The timer is always 
running so Puppet simply triggers when the run interval has elapsed regardless 
of how long the last run took (although if a run is still in progress another 
cannot start immediately).

You can more or less derive the rest of Puppet's behaviour from the fact that 
it is a separate timer running rather than something the Puppet run is 
coordinating. If you want more specifics it may be interesting to look at the 
EventLoop library that is used.

As James says, the mailing list is really the better place for this though.
----------------------------------------
Bug #11407: How does puppet agent calculate the time to check in?
https://projects.puppetlabs.com/issues/11407

Author: Jo Rhett
Status: Closed
Priority: Normal
Assignee: 
Category: agent
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Can we please get some documentation for how puppet calculates the time to 
check in?  Is it:

* Is the timing information stored in a file somewhere?
* Can we run a command to find out when the next check time will be?
* Run shortly after startup and every 30 minutes after that?
* Run 30 minutes after the last run started?
* Run 30 minutes after the last run completed?

Can we influence this in any way?

# Does stopping and starting the agent restart the timer, or will it keep the 
same time across restarts?
# Does running puppet agent --onetime affect the timer?
# Is there anything else we can do (besides 'splay') to influence the timer on 
a system?


-- 
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