Issue #3220 has been updated by Todd Zullinger.

I don't have a strong opinion there, I could see it argued both ways.  Ideally, 
you only ever have resources from puppet to worry about. To make everyone happy 
you almost need a param to control that. Maybe the purge param could learn 
something like "all" to purge unmanaged but puppet created jobs as well as 
random jobs that were never added by puppet.  That's probably best left for a 
seperate bug/feature request though.

The main problem here is that puppet doesn't handle it gracefully when there 
are non-managed resources present.  In the example crontab above, the "# Puppet 
Name: echo_test" entry was made manually.  Puppet should tell me that it's 
present and should be absent (or remove it if I drop the noop => true).  It 
doesn't do that though, since it chokes while trying to parse the crontab.
----------------------------------------
Bug #3220: err: //crontab::cleaner/Resources[cron]: Failed to generate 
additional resources using 'generate'
https://projects.puppetlabs.com/issues/3220

Author: Rob Terhaar
Status: Needs More Information
Priority: Normal
Assignee: Todd Zullinger
Category: cron
Target version: 
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


Hello-

Bit of background first, we're using CentOS5 machines with puppet/puppetmaster 
25.4 from EPEL packages.
 
For some reason that I cannot determine, the following code[1] (which works on 
our development system) fails[2] on our staging system:

[1]
class crontab::cleaner {
  resources { cron: purge => true }
}

Our intent is to remove all non-managed crontab entries. 

However, when I run puppetd --test, I receive this error:

err: //crontab::cleaner/Resources[cron]: Failed to generate additional 
resources using 'generate': You must specify a name or title for resources

--trace --debug --verbose on puppetmaster and on the puppetd client[3] do not 
give any further information about the problem.

[3]
debug: Creating default schedules
debug: Finishing transaction -607717888 with 0 changes
debug: Loaded state in 0.01 seconds
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1054:in `hash2resource'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1888:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1016:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1016:in `instances'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1006:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1006:in `instances'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1005:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1005:in `instances'
/usr/lib/ruby/site_ruby/1.8/puppet/type/resources.rb:101:in `generate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:349:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:349:in 
`generate_additional_resources'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:378:in `generate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:377:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:377:in `generate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:493:in `prepare'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:284:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:142:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:169:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:177:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:168:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:53:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:134:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:51:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/puppetd.rb:103:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:226:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/sbin/puppetd:159
err: //crontab::cleaner/Resources[cron]: Failed to generate additional 
resources using 'generate': You must specify a name or title for resources
debug: Prefetching parsed resources for sshkey
debug: Prefetching crontab resources for cron
debug: Prefetching yum resources for package
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'



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