Issue #4294 has been reported by Alan Harder.

----------------------------------------
Bug #4294: Separate nested defines get error that they are duplicates
http://projects.puppetlabs.com/issues/4294

Author: Alan Harder
Status: Unreviewed
Priority: High
Assigned to: 
Category: parser
Target version: 
Affected version: 2.6.0rc4
Keywords: 
Branch: 


<pre>class foo {
    define foodef($foovar) {
        notify { "foodef_$foovar": }
    }
    foodef { 'foo_test': foovar => 'foo' }
}

class bar {
    define bardef($barvar) {
        notify { "bardef_$barvar": }
    }
    bardef { 'bar_test': barvar => 'bar' }
}

node default {
  include foo
  include bar
}</pre>

The above test case on 2.6.0rc4 (with #4233 note-9 and #4285 note-8 and #4287 
note-2 patches) on Solaris 10 / ruby 1.8.7 gets this error trace:

<pre>debug: catalog supports formats: b64_zlib_yaml dot marshal pson raw yaml; 
using pson
/opt/csw/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:57:in `deserialize'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:71:in `find'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:193:in `find'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/indirector.rb:50:in `find'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:225:in 
`retrieve_new_catalog'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:414:in `thinmark'
/opt/csw/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/util.rb:413:in `thinmark'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:224:in 
`retrieve_new_catalog'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:102:in `retrieve_catalog'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/configurer.rb:143:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/opt/csw/lib/ruby/1.8/sync.rb:229:in `synchronize'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:101:in `with_client'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:171:in `call'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:171:in `controlled_run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:114:in `onetime'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:88:in `run_command'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:301:in `run'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:398:in `exit_on_fail'
/opt/csw/lib/ruby/site_ruby/1.8/puppet/application.rb:301:in `run'
/opt/csw/bin/puppetd:4
err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate definition: Bar::Bardef[bar_test] is already defined in file 
/etc/opt/csw/puppet/manifests/nodes.pp at line 5; cannot redefine at 
/etc/opt/csw/puppet/manifests/nodes.pp:12 on node ...</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://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