The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #17554

runinterval ignored on Windows

Added by Aristarkh Zagorodnikov over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:windows
Target version:3.0.2
Affected Puppet version:2.7.12 Branch:https://github.com/puppetlabs/puppet/pull/1292
Keywords:windows

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

%ProgramData%\PuppetLabs\puppet\etc\puppet.conf:
...
[agent]
runinterval=300

Restarting service.

Testing the configured run interval:

cd <puppet bin directory>
puppet agent --configprint runinterval
300

Then I check both the puppetmaster logs and the client event log — it still runs every 30 minutes.


Related issues

Related to Puppet - Bug #16189: puppet config print and --configprint disagree Closed 08/30/2012
Related to Puppet - Bug #7316: puppet face applications (subcommands) delivered via modu... Closed 05/02/2011
Related to Puppet - Feature #2935: Settings should use 'agent' and 'server' in addition to e... Closed 12/15/2009

History

#1 Updated by Josh Cooper over 3 years ago

  • Description updated (diff)
  • Status changed from Unreviewed to Investigating

#2 Updated by Josh Cooper over 3 years ago

  • Status changed from Investigating to Accepted
  • Keywords set to windows

Hi Aristarkh, so it looks to be a bad interaction between run_mode, settings and the config face, see also #2935, #7316.

If the runinterval setting is in the agent section (as it should be), then puppet config print runinterval won’t “see” it. As a result, the puppet service doesn’t run every 300 seconds as you’ve specified.

If you move the runinterval setting to the main section, or in C:\Program Files (x86)\Puppet Labs\Puppet\service\daemon.rb change the line to:

        runinterval = %x{ "#{puppet}" agent --configprint runinterval }.to_i

Things should work as expected.

Also, for future reference, if you stop the puppet service and restart it with the --debug flag:

sc start puppet --debug

In %ProgramData%\PuppetLabs\puppet\var\log\windows.log, you should see something like:

Mon Nov 12 15:02:02 -0800 2012 Puppet (notice): Starting service: --debug
Mon Nov 12 15:02:02 -0800 2012 Puppet (notice): Service running
Mon Nov 12 15:02:02 -0800 2012 Puppet (debug): Using 'C:/Program Files (x86)/Puppet Labs/Puppet/bin/puppet.bat'
Mon Nov 12 15:02:13 -0800 2012 Puppet (debug): Process created: 2148
Mon Nov 12 15:02:13 -0800 2012 Puppet (debug): Service waiting for 300 seconds

Note this file is only created when the service starts in debug mode.

#3 Updated by Aristarkh Zagorodnikov over 3 years ago

Thanks for the detailed information. Since we have separate puppet.conf template for Windows boxes (configuring puppet with puppet is cool!), adding “runinterval=…” to the “main” section looks like a solid workaround, thanks again for your help with this.

#4 Updated by Josh Cooper over 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Target version set to 3.0.2
  • Affected Puppet version changed from 3.0.1 to 2.7.12
  • Branch set to https://github.com/puppetlabs/puppet/pull/1292

Since this was so trivial to fix, I’m targeting this for 3.0.2

#5 Updated by Anonymous over 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#6 Updated by Matthaus Owens over 3 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.0.2-rc1

Also available in: Atom PDF