Description of problem: Emails triggered by CFME does not contain anything in the body Version-Release number of selected component (if applicable): 5.4.0.0.14.20150325124454_9e339f3 How reproducible: 100% Steps to Reproduce: Send/Trigger an email from CFME using any means. For example from Control policies and actions or say from Cloud Intelligence ==> Reports ==> Schedule Reports Actual results: Email body is blank Expected results: Should contain the email body explaining the details. For example, email details from alert trigger from policy profile used to display message something like this: Alert Triggered Alert 'VM Silver and CPU > 1', triggered Event: Alert condition met Entity: (VmRedhat) test-ramesh-prov Additional info: No Error is found in the evm.log file for not sending the email
I also noticed that the VM provisioning e-mails have no body while they used to have the body before.
Madhu - I would suggest trying to triage this in Milan's environment if it is available. Tina would be able to help with this as well.
Hello, Can we get a copy of the evm.log and automation.log file. Thanks Madhu
This problem started happening since we converted from era's to haml's. The email body is sent using views defined in app/views/generic_mailer. When we converted from views defined in erb to haml, the only change that needs to be made is require 'haml-rails' Today we include this file only for the ui worker, defined in vmdb/lib/vmdb/initializer.rb if MiqEnvironment::Process.is_web_server_worker? require 'haml-rails' So only the web server worker can send emails with body, since all the other workers are still looking for the erb files, they can't send emails with body. Deep inside the action mailer the UI worker shows the following handlers :handlers => {.erb,.builder,.jbuilder,.rjs,.haml,} While the other workers show clearly missing the .haml file :handlers=>[:erb, :builder, :jbuilder, :rjs]} Adding a require 'haml-rails' to the app/mailers/generic_mailer.rb solves the problem but the bigger question is can we fix the initializer.rb to do an unconditional require 'haml-rails'
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/62c2563fe3392ee24b2424ca5d432feb6c52926f commit 62c2563fe3392ee24b2424ca5d432feb6c52926f Author: Madhu Kanoor <mkanoor> AuthorDate: Mon Apr 13 13:59:49 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Mon Apr 13 13:59:49 2015 -0400 Non UI workers can't send email bodies Only the UI worker had the require 'haml-rails' so emails sent from the UI had the body, but if a non ui worker like automate sent the email it wont have the body. The specs have the require 'haml-rails' so they always worked. https://bugzilla.redhat.com/show_bug.cgi?id=1209557 vmdb/app/mailers/generic_mailer.rb | 1 + 1 file changed, 1 insertion(+)
Good to go. Verified and working fine in 5.4.0.0.22.20150420163946_26004d1
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html