Puppet: System Administration Automated

Support

Ticket #705 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

cron fails in 0.23.0

Reported by: ghislain Assigned to: luke
Priority: normal Milestone: beaker
Component: client Version: 0.23.0
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Unknown

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.

Change History

07/03/07 11:03:29 changed by ghislain

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.

07/04/07 21:39:07 changed by luke

  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.
  • milestone set to beaker.

07/12/07 06:33:43 changed by luke

At least the first part of this is fixed in [2680].

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

07/14/07 23:14:21 changed by luke

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [2697]. 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.