Description of problem: Scheduler is not able to send a report via email. Seems to be an issue with pdf-string conversion. Version-Release number of selected component (if applicable): 5.10.0.22 How reproducible: 100% Steps to Reproduce: 1. Navigate to `Configuration`, and configure the appliance to send emails. 2. Set the tenant quota, since we're using tenant quota reports for testing. 3. Navigate to `Cloud Intel` > `Reports` > `All Reports`. 4. Select `Tenants/Tenant Quotas/Tenant Quotas` report. 5. Click on `Configuration` and select `Add a new schedule`. 6. Check `Send an E-mail` and add an email address. 7. Uncheck `Send if Report is Empty`. 8. Click on `Add`. 9. Queue the schedule to run now. Actual results: No error in the UI, but no email is sent and errors in the `evm.log`. Expected results: Email should be sent. Additional info: Any report can be used for testing, but the report must not be empty. Attaching evm.log. Error Log: [----] E, [2018-11-15T04:03:47.747194 #15173:7ecf84] ERROR -- : MIQ(MiqQueue#deliver) Message id: [456], Error: [undefined method `find_asset' for nil:NilClass] [----] E, [2018-11-15T04:03:47.747624 #15173:7ecf84] ERROR -- : [NoMethodError]: undefined method `find_asset' for nil:NilClass Method:[block (2 levels) in <class:LogProxy>] [----] E, [2018-11-15T04:03:47.747852 #15173:7ecf84] ERROR -- : /var/www/miq/vmdb/lib/pdf_generator.rb:48:in `stylesheet_file_path'
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low.
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/7e6b90569193ad20ccfcca4adb8827658dc6b2be commit 7e6b90569193ad20ccfcca4adb8827658dc6b2be Author: Dávid Halász <dhalasz> AuthorDate: Wed Nov 21 01:34:09 2018 -0500 Commit: Dávid Halász <dhalasz> CommitDate: Wed Nov 21 01:34:09 2018 -0500 Move the backend-generated PDF report's styling from the frontend Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650057 lib/pdf_generator.rb | 2 +- lib/pdf_generator/pdf_report.css | 159 + 2 files changed, 160 insertions(+), 1 deletion(-)
New commit detected on ManageIQ/manageiq/hammer: https://github.com/ManageIQ/manageiq/commit/48e0ca76b810b4b4d640cc4c64bdf406a4dd657e commit 48e0ca76b810b4b4d640cc4c64bdf406a4dd657e Author: Martin Povolny <mpovolny> AuthorDate: Thu Nov 22 07:51:39 2018 -0500 Commit: Martin Povolny <mpovolny> CommitDate: Thu Nov 22 07:51:39 2018 -0500 Merge pull request #18226 from skateman/pdf-report-stylesheet-path Move the backend-generated PDF report's styling from the frontend (cherry picked from commit 3129ad7d06980e6c9bde69a664f4a01cdc5b0435) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650057 lib/pdf_generator.rb | 2 +- lib/pdf_generator/pdf_report.css | 159 + 2 files changed, 160 insertions(+), 1 deletion(-)
NOT FIXED. Verified on 5.10.0.26.20181127164839_ee46c90. Followed the same steps as mentioned in the original comment and encountered the same error. I can see the new code in the appliance, but for some reason, I am still encountering the same error.
https://github.com/ManageIQ/manageiq/pull/18236
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/1c1bd95634578ea42a8e92a3748f77865b4385fc commit 1c1bd95634578ea42a8e92a3748f77865b4385fc Author: Dávid Halász <dhalasz> AuthorDate: Wed Nov 28 08:56:31 2018 -0500 Commit: Dávid Halász <dhalasz> CommitDate: Wed Nov 28 08:56:31 2018 -0500 Do not rely on the asset pipeline when calling backend PDF generation Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650057 lib/asset_writer.rb | 33 - lib/pdf_generator/prince_pdf_generator.rb | 11 +- 2 files changed, 1 insertion(+), 43 deletions(-)
New commit detected on ManageIQ/manageiq/hammer: https://github.com/ManageIQ/manageiq/commit/2f9fa80e8513b100014bf40f4cdcd7f8a0d325e6 commit 2f9fa80e8513b100014bf40f4cdcd7f8a0d325e6 Author: Martin Povolny <mpovolny> AuthorDate: Wed Dec 5 03:45:51 2018 -0500 Commit: Martin Povolny <mpovolny> CommitDate: Wed Dec 5 03:45:51 2018 -0500 Merge pull request #18236 from skateman/asset-pipeline-pdf Do not rely on the asset pipeline when calling backend PDF generation (cherry picked from commit ce0cd617bd1a98a9f8d266529d01e878231528ef) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650057 lib/asset_writer.rb | 33 - lib/pdf_generator/prince_pdf_generator.rb | 11 +- 2 files changed, 1 insertion(+), 43 deletions(-)
FIXED. Works perfectly. Verified on 5.10.0.29.20181211195209_fd990a9.