Issue #3142 has been reported by Josh Anderson.
----------------------------------------
Bug #3142: Tagmail reporting barfs on call to Time.now.rfc2822()
http://projects.reductivelabs.com/issues/3142
Author: Josh Anderson
Status: Unreviewed
Priority: Normal
Assigned to:
Category: reports
Target version:
Affected version: 0.25.4
Keywords:
Branch:
After upgrading from 0.24.7 to 0.25.3, I noticed that I was no longer getting
tagmail reports. My MTA logs were full of "Error reading SMTP packet" entries,
so I started looking at tagmail.rb.
What I found is that tagmail is barfing on calling Time.now.rfc2822():
<pre>
smtp.open_message_stream(Puppet[:reportfrom], *emails) do |p|
p.puts "From: #{Puppet[:reportfrom]}"
p.puts "Subject: Puppet Report for %s" % self.host
p.puts "To: " + emails.join(", ")
p.puts "Date: " + Time.now.rfc2822 <----- NoMethodError here!
p.puts
p.puts messages
end
</pre>
The problem is that you can call Time.now() without a "require 'time'"
statement, but you can't call Time.rfc2822() without first requiring the module.
You can see this if you run the following in irb:
<pre>
>> Time.now
=> Tue Feb 02 15:41:29 -0800 2010
>> Time.now.rfc2822
NoMethodError: undefined method `rfc2822' for Tue Feb 02 15:41:34 -0800
2010:Time
from (irb):2
>> require 'time'
=> true
>> Time.now.rfc2822
=> "Tue, 02 Feb 2010 15:42:00 -0800"
>>
</pre>
Because this happens after a fork(), no error messages are logged.
Adding a "require 'time'" statement to tagmail.rb resolves this issue.
--
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.