More Puppet 3.0 upgrade issues: rest.rb and runinterval ?

159 views
Skip to first unread message

Forrie

unread,
Oct 1, 2012, 5:04:08 PM10/1/12
to puppet...@googlegroups.com
The last issue I had was missing init.d scripts and the removed "puppetmaster" in favor of "puppet master".   I upgraded back to 3.0, uninstalled the old versions to avoid conflict.  Puppet master starts, but the client is choking on this error:

Oct  1 16:55:46 central puppet-agent[26980]: Could not autoload puppet/indirector/certificate/rest: Invalid duration format '"900 # 15 mins"' for parameter: runinterval
Oct  1 16:55:46 central puppet-agent[26980]: Could not prepare for execution: Could not autoload puppet/indirector/certificate/rest: Invalid duration format '"900 # 15 mins"' for parameter: runinterval


Here's the code to rest.rb


require 'puppet/ssl/certificate'
require 'puppet/indirector/rest'

class Puppet::SSL::Certificate::Rest < Puppet::Indirector::REST
  desc "Find and save certificates over HTTP via REST."

  use_server_setting(:ca_server)
  use_port_setting(:ca_port)
  use_srv_service(:ca)

  def find(request)
    return nil unless result = super
    result.name = request.key unless result.name == request.key
    result
  end


I have a very simple setup.  Here is my puppet.conf:

[main]
server=my.server.com
vardir = /var/lib/puppet

logdir = /var/log/puppet

rundir = /var/run/puppet

ssldir = $vardir/ssl


[agent]
classfile = $vardir/classes.txt

localconfig = $vardir/localconfig

runinterval = 900 # 15 mins
syslogfacility = local4
report = true
listen = true


[master]
syslogfacility = local4
modulepath = /etc/puppet/modules:/usr/share/puppet/modules
report = true


So I am guessing the "runinterval = 900" is triggering the problem.  But as I recall, this was set in the default puppet.conf file that was shipped.



Thanks.

Forrie

unread,
Oct 1, 2012, 5:07:33 PM10/1/12
to puppet...@googlegroups.com
I fixed the problem.  Seems puppet isn't smart enough to parse out a hash comment at the end of the line... that should be fixed.  So, changing it from

runinterval = 900 # 15 mins" to:

# 15 mins
runinterval = 900

fixed the problem.  I'll consider filing a bug report.

Branan Purvine-Riley

unread,
Oct 1, 2012, 5:30:58 PM10/1/12
to puppet...@googlegroups.com
If that syntax worked in Puppet 2.7, then this is a regression.
Opening a bug report would be hugely appreciated.

Thanks,
Branan

Jeff McCune

unread,
Oct 1, 2012, 6:54:43 PM10/1/12
to puppet...@googlegroups.com
This is definitely a bug in 3.0.0.

I've filed http://projects.puppetlabs.com/issues/16676 to track it.
Please update with any additional information you may have.

Thanks,
-Jeff

On Mon, Oct 1, 2012 at 2:07 PM, Forrie <for...@gmail.com> wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/uAaknTj5y-0J.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
Reply all
Reply to author
Forward
0 new messages