Issue #2107 has been updated by masterzen. Status changed from Accepted to Ready for Testing % Done changed from 0 to 100 Complexity changed from Unknown to Easy
Hi, Patch for master available in my github repository branch tickets/2107: http://github.com/masterzen/puppet/tree/tickets/2107 Patch for 0.24.x available in my github repository branch tickets/0.24.x/2107: http://github.com/masterzen/puppet/tree/tickets/0.24.x/2107 This should also solve the issue you saw in production (which I think is caused by at least a 4-fold require ala [Res[a],Res[b,c,d]]) Thanks, Brice ---------------------------------------- Bug #2107: Composite resource references cause problems http://projects.reductivelabs.com/issues/2107 Author: luke Status: Ready for Testing Priority: Normal Assigned to: masterzen Category: language Target version: 0.25.0 Complexity: Easy Affected version: 0.24.7 Keywords: This was caused in the fix for #1683 or #1691, I think. The following code does not behave as you expect: <pre> notify { foo: } notify { bar: } notify { baz: } notify { boo: require => [Notify[foo], Notify[bar, baz]] } </pre> You get: <pre> Could not find dependency Notify[bar][Notify[baz]] for Notify[boo] at /Users/luke/bin/test.pp:7 </pre> If you remove the <code>Notify[foo]</code> from the require, then you get: <pre> err: Could not create boo: Parameter require failed: Invalid relationship #<Puppet::Parser::Resource::Reference:0x18ca1e4 @title="bar", @type="Notify"> at /Users/luke/bin/test.pp:7 Parameter require failed: Invalid relationship #<Puppet::Parser::Resource::Reference:0x18ca1e4 @title="bar", @type="Notify"> at /Users/luke/bin/test.pp:7 </pre> Neither is the problem seen in the wild, which was: <pre> [#<Puppet::Parser::Resource::Reference:0x2aaaac56d250 @title="/opt/smokeping/bin/smokeping", @builtin=true, @type="File">, #<Puppet::Parser::Resource::Reference:0x2aaaac56d1d8 @title="/opt/smokeping/etc/smokemail", @builtin=true, @type="File">, #<Puppet::Parser::Resource::Reference:0x2aaaac56c418 @title="/opt/smokeping/etc/config", @builtin=true, @type="File">] /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1531:in `resource' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1531:in `validate_relationship' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1529:in `each' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1529:in `validate_relationship' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2382:in `finish' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2380:in `collect' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2380:in `finish' /usr/lib/ruby/site_ruby/1.8/puppet/node/catalog.rb:281:in `finalize' /usr/lib/ruby/site_ruby/1.8/puppet/node/catalog.rb:281:in `each' /usr/lib/ruby/site_ruby/1.8/puppet/node/catalog.rb:281:in `finalize' /usr/bin/puppet:228 wrong number of arguments (3 for 2) </pre> ---------------------------------------- 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://reductivelabs.com/redmine/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 -~----------~----~----~----~------~----~------~--~---
