Bug #2810

tidy resource error: Failed to generate additional resources using 'generate': Fileset recurse parameter must not be a number anymore, please use recurselimit

Added by Tim Stoop 9 months ago. Updated 9 months ago.

Status:Closed Start:11/12/2009
Priority:Normal Due date:
Assigned to:Brice Figureau % Done:

0%

Category:RAL
Target version:0.25.2
Affected version:0.25.1 Branch:tickets/0.25.x/2810
Keywords:
Votes: 1

Description

Hi,

I use the tidy resource in a lot of places and since 0.25.1 (skipped 0.25.0 so I don’t know) it’s giving me the following error:

err: //cust::webserver/Cust::Webserver::Tomcatsite[app]/Kbp-tomcat::Project[app]/Tidy[/srv/tomcat/app/logs/]: Failed to generate additional resources using ‘generate’: Fileset recurse parameter must not be a number anymore, please use recurselimit

The tidy resource is very simple:

tidy { “/srv/tomcat/app/logs/”: matches => “*”, age => “4w”, recurse => 1, }

It’s initiated (is that the right term?) form within a define that actually also sets the Tomcat instance up and put some other files (munin plugins) in place. This worked in 0.24.8. Please let me know if you need additional information.


Related issues

related to Puppet - Bug #2856: Setting recursion depth with the recurse parameter is now... Rejected 11/25/2009

History

Updated by Tim Stoop 9 months ago

Some additional debug info, not sure if it’ll help:

/usr/lib/ruby/1.8/puppet/file_serving/fileset.rb:79:in initialize' /usr/lib/ruby/1.8/puppet/type/tidy.rb:251:innew' /usr/lib/ruby/1.8/puppet/type/tidy.rb:251:in generate' /usr/lib/ruby/1.8/puppet/transaction.rb:347:insend' /usr/lib/ruby/1.8/puppet/transaction.rb:347:in generate_additional_resources' /usr/lib/ruby/1.8/puppet/transaction.rb:375:ingenerate' /usr/lib/ruby/1.8/puppet/transaction.rb:374:in each' /usr/lib/ruby/1.8/puppet/transaction.rb:374:ingenerate' /usr/lib/ruby/1.8/puppet/transaction.rb:490:in prepare' /usr/lib/ruby/1.8/puppet/transaction.rb:282:inevaluate' /usr/lib/ruby/1.8/puppet/resource/catalog.rb:142:in apply' /usr/lib/ruby/1.8/puppet/configurer.rb:152:inrun' /usr/lib/ruby/1.8/puppet/util.rb:177:in benchmark' /usr/lib/ruby/1.8/benchmark.rb:308:inrealtime' /usr/lib/ruby/1.8/puppet/util.rb:176:in benchmark' /usr/lib/ruby/1.8/puppet/configurer.rb:151:inrun' /usr/lib/ruby/1.8/puppet/agent.rb:53:in run' /usr/lib/ruby/1.8/puppet/agent/locker.rb:21:inlock' /usr/lib/ruby/1.8/puppet/agent.rb:53:in run' /usr/lib/ruby/1.8/sync.rb:230:insynchronize' /usr/lib/ruby/1.8/puppet/agent.rb:53:in run' /usr/lib/ruby/1.8/puppet/agent.rb:130:inwith_client' /usr/lib/ruby/1.8/puppet/agent.rb:51:in run' /usr/lib/ruby/1.8/puppet/application/puppetd.rb:103:inonetime' /usr/lib/ruby/1.8/puppet/application.rb:226:in send' /usr/lib/ruby/1.8/puppet/application.rb:226:inrun_command' /usr/lib/ruby/1.8/puppet/application.rb:217:in run' /usr/lib/ruby/1.8/puppet/application.rb:306:inexit_on_fail' /usr/lib/ruby/1.8/puppet/application.rb:217:in `run' /usr/sbin/puppetd:159 err: //cust::webserver/Cust::Webserver::Tomcatsite[app]/Kbp-tomcat::Project[app]/Tidy[/srv/tomcat/app/logs/]: Failed to generate additional resources using ‘generate’: Fileset recurse parameter must not be a number anymore, please use recurselimit

Updated by James Turnbull 9 months ago

  • Status changed from Unreviewed to Accepted
  • Assigned to set to Markus Roberts
  • Target version set to 0.25.2

Updated by Brice Figureau 9 months ago

Tim Stoop wrote:

Hi,

I use the tidy resource in a lot of places and since 0.25.1 (skipped 0.25.0 so I don’t know) it’s giving me the following error:

err: //cust::webserver/Cust::Webserver::Tomcatsite[app]/Kbp-tomcat::Project[app]/Tidy[/srv/tomcat/app/logs/]: Failed to generate additional resources using ‘generate’: Fileset recurse parameter must not be a number anymore, please use recurselimit

The tidy resource is very simple:

tidy { “/srv/tomcat/app/logs/”: matches => “*”, age => “4w”, recurse => 1, }

It’s initiated (is that the right term?) form within a define that actually also sets the Tomcat instance up and put some other files (munin plugins) in place. This worked in 0.24.8. Please let me know if you need additional information.

Yes, this is my bad :–( It appeared in #1469. Markus: I think we need an integration test for all users of FileSet…

Updated by Markus Roberts 9 months ago

  • Status changed from Accepted to Needs more information
  • Assigned to changed from Markus Roberts to James Turnbull

I’m directing this to James because he accepted the ticket, but anyone else who knows is free to answer.

This looks like a simple deprecation issue (not a bug). We used to permit numeric values for recurse, but that was problematic as there was actually more information required, so it was split into two parameters (recurse and recurselimit) with recurselimit being the numeric part and recurse determining where (master, server, neither or both). The error message appears to say as much: use recurselimit instead of recurse.

What am I missing?

— Markus

Updated by James Turnbull 9 months ago

  • Assigned to deleted (James Turnbull)

Ah yes. True. Tim?

Updated by Brice Figureau 9 months ago

Markus Roberts wrote:

I’m directing this to James because he accepted the ticket, but anyone else who knows is free to answer.

This looks like a simple deprecation issue (not a bug). We used to permit numeric values for recurse, but that was problematic as there was actually more information required, so it was split into two parameters (recurse and recurselimit) with recurselimit being the numeric part and recurse determining where (master, server, neither or both). The error message appears to say as much: use recurselimit instead of recurse.

What am I missing?

— Markus

You’re missing that tidy doesn’t support both parameters, it only supports “recurse”. Using recurse with a number in FileSet is not supported anymore. To make it short: when I introduced the parameter separation, I modified the FileSet api, and put the deprecation in the File type. I forgot that there were some other use of FileSet, especially in tidy.

So, we have 2 options:

fix tidy to correctly use FileSet

enhance tidy to use both parameters: recurse, and recurselimit

I think 1) is better as 2) doesn’t add any value (there’s no need to have a recurse value different than true/false).

Updated by Brice Figureau 9 months ago

  • Category set to RAL
  • Status changed from Needs more information to Ready for Testing
  • Assigned to set to Brice Figureau
  • Branch set to tickets/0.25.x/2810

Patch sent to puppet-dev. Patch available (along with small test fixes) in tickets/0.25.x/2810 in my github repository: http://github.com/masterzen/puppet/tree/tickets/0.25.x/2810

Updated by Tim Stoop 9 months ago

The patch fixes the problem for me. Thanks for the effort!

Updated by James Turnbull 9 months ago

  • Status changed from Ready for Testing to Ready for Checkin

Updated by James Turnbull 9 months ago

  • Status changed from Ready for Checkin to Closed

Pushed in commit:“55d8ffaaa3052dd0e8e2915d974d99827a92d61e” in branch 0.25.x

Also available in: Atom PDF