Issue #9290 has been updated by jared jennings. File resource-fix.diff added
I had this same problem, with Puppet 2.7.6 and Rails 3.2.6. I tried downgrading Rails, but it didn't initially work, and it's been a long time since Rails 3.0.x, hasn't it? So I decided to find out what the problem was. By adding a print statement to the `Puppet::Rails::Resource.parameter` method, I found that the parameter causing the infinite loop was `id`. After staring at the backtrace for a long time, I thought it was odd that after fifteen calls inside ActiveRecord it would suddenly call back into Puppet: <pre> ... /usr/lib/ruby/site_ruby/1.8/puppet/rails/resource.rb:186:in `parameter' /usr/lib/ruby/site_ruby/1.8/puppet/rails/resource.rb:95:in `[]' /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.6/lib/active_record/associations/association_scope.rb:70:in `add_constraints' /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:202:in `each_with_index' ... </pre> So I changed the `[]` method as in the attached diff. Everything appeared to suddenly work, and my node began configuring itself. The node having succeeded once, it kept working even after I put the code back to the original, until I nuked the storedconfig database. Perhaps this is a clue as to the nature of the bug. I don't fully understand the change I've made. I haven't run any of the tests. I haven't made a pull request, because I can't push to GitHub from the network I'm on. Maybe later. The code I changed originated in commit:6314745c three years ago, and still exists in the master branch today, so this patch would probably apply to any recent Puppet version. ---------------------------------------- Bug #9290: Puppet master fails with 'stack level too deep' error when storeconfigs = true with rails stack 3.1.0 https://projects.puppetlabs.com/issues/9290#change-67588 Author: Mark Stanislav Status: Accepted Priority: High Assignee: Category: Rails Target version: Affected Puppet version: 2.7.3 Keywords: storeconfigs rails activerecord 3.1.0 Branch: Out of nowhere, a known-working Puppet stack build script started to fail. The tell-tale error is 'stack level too deep' which from other historical bug reports always seems related to Ruby directly. After many hours of digging around, I checked for updated gem versions on the system. There was an update to rails 3.1.0 (and activerecord, etc.) which apparently is breaking the Puppet master when working with storeconfigs = true. Disabling storeconfigs immediately works as expected again. When reverting from rails and friends 3.1.0 to 3.0.10, Puppet again works as expected. I don't have any insight into where exactly this is all failing, only the version which is causing the issue and the condition to emulate it. This was only tested again Puppet 2.7.3 using the gem install with both webrick and Apache+Passenger. Attached is a debug output. -- 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.
