On 11/12/12 17:21, Roman Shaposhnik wrote:
> Hi!
> 
> all of a sudden the puppet code that deploys Hadoop
> clusters in Bigtop started to trigger:
>     err: /Stage[main]/Hadoop_head_node/Solr::Server[solrcloud
> server]/Solr::Solrcloud_config[collection1]/Exec[ZK collection1 config
> upload]: Could not evaluate: Puppet::Util::Log requires a message
> 
> The behavior is not 100% reproducible and it doesn't
> happen with the same resource in different runs, but
> within the entire run it is almost guaranteed to happen.
> So far -- I've seen it triggered for Exec and Package
> resources.
> 
> This happens with quite a few different Puppet versions
> I tried (2.6.X, 2.7.X) on various Linux distros (RHEL, SLES)
> so I suspect this is a combination of a Puppet issue (perhaps
> this one: http://projects.puppetlabs.com/issues/17887 )
> and something in my code that is triggering it.
> 
> Taking a hint from the proposed fix to the bug report
> I quoted above, I was able to generate the stacktrace
> at the point where it happens (attached).

During a run is odd, since I normally see it in a test harness where
rspec/mocha performs some sort of quick exit, bypassing the exception
routines.

Have you tried applying the patch I wrote for the issue?

https://github.com/puppetlabs/puppet/pull/1307/files
https://github.com/domcleal/puppet/commit/6662ef4.patch

> Here's the snippet of code I inserted in puppet/util/log.rb
> 
> begin
>   raise ArgumentError, "Puppet::Util::Log requires a message" unless msg
>   @message = msg.to_s
> rescue => e
>   @message = "EMPTY MESSAGE: " + e.backtrace.to_s
> end
> 
> and here's the resulting stack trace (as you can see it is now failing
> in a different resources but failing nonetheless):
> 
> notice: 
> /Stage[main]/Hadoop_head_node/Hadoop::Create_hdfs_dirs[/var/log]/Exec[HDFS
> init /var/log]/returns: EMPTY MESSAGE:
> /usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:222:
> in `message='/usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:203
> in `initialize'/usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:81

That's the trouble with the error, it's triggered from within the
logging code and so it doesn't show you the context of what's happening
inside the run.

> in `new'/usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:81
> in `create'/usr/lib/ruby/site_ruby/1.8/puppet/util/logging.rb:7
> in `send_log'/usr/lib/ruby/site_ruby/1.8/puppet/transaction/event.rb:38
> in 
> `send_log'/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:126

This looks like the same area (while applying a property change), try
the patch.

-- 
Dominic Cleal
Red Hat Engineering

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to