Bug #705

cron fails in 0.23.0

Added by ghislain - almost 5 years ago. Updated almost 5 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:-
Target version:0.23.1
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

Description

hi,

All was ok on .22.4 but now i got cron errors:

debug: Prefetching crontab resources for cron
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/cron/crontab.rb:99:in @match'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/cron/crontab.rb:88:in @each'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/cron/crontab.rb:88:in @match'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/parsedfile.rb:186:in @prefetch'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/parsedfile.rb:182:in @each'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/provider/parsedfile.rb:182:in @prefetch'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/transaction.rb:488:in @prefetch'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/transaction.rb:485:in @each'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/transaction.rb:485:in @prefetch'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/transaction.rb:500:in @prepare'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/transaction.rb:291:in @evaluate'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/network/client/master.rb:68:in @apply'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/network/client/master.rb:312:in @run'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/util.rb:212:in @benchmark'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in @measure'
/usr/local/lib/ruby/1.8/benchmark.rb:307:in @realtime'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/util.rb:211:in @benchmark'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/network/client/master.rb:311:in @run'
/usr/local/lib/ruby/1.8/sync.rb:229:in @synchronize'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/lib/puppet/network/client/master.rb:297:in @run'
/usr/local/lib/ruby/gems/1.8/gems/puppet-0.23.0/bin/puppetd:426
/usr/local/bin/puppetd:18:in @load'
/usr/local/bin/puppetd:18
err: Could not prefetch "NilClass"rovider crontab: undefined method @each' for nil:NilClass

i am on:

facterversion => 1.3.7 hardwaremodel => i386 kernel => FreeBSD kernelrelease => 4.7-RELEASE-p28 puppetversion => 0.23.0 rubysitedir => /usr/local/lib/ruby/site_ruby/1.8 rubyversion => 1.8.6

It seems that the cron are created anyway even with this error.

regards, Ghislain.

History

Updated by ghislain - almost 5 years ago

in fact it does not only crete them. They are created again and again until they are found hundreds of times in the crontab.

it also duplicate the ENV lines like crazy :)

MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=cron@aqueos.com
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

also i have a lot of update of the cron even when nothing change. It seems that puppet cron type see changes when there is none:

info: //xxxxxxxxxxxx/majos/Cron[apt-get-cron-update]/command: command changed 
'/usr/bin/sudo /usr/bin/apt-get -qq update' 
to 
'/usr/bin/sudo /usr/bin/apt-get  -qq  update'

seems the double space is a problem here ?

regards, Ghislain.

Updated by Luke Kanies almost 5 years ago

  • Status changed from 1 to 2

Updated by Luke Kanies almost 5 years ago

At least the first part of this is fixed in r2680.

Life would be much easier if separate bugs were opened in separate tickets.

Updated by Luke Kanies almost 5 years ago

  • Status changed from 2 to Closed
  • 7 set to fixed

Fixed in r2697. I was not able to reproduce the problems with environment handling.

From now on, please file all bugs separately, and please title bugs so that the specific failure is in the name of the bug. Any bug information added to existing bugs will be ignored.

Also available in: Atom PDF