Bug 1650057 - Scheduler unable to send reports via email
Summary: Scheduler unable to send reports via email
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Dávid Halász
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard: testathon
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-15 09:34 UTC by Parthvi Vala
Modified: 2019-02-12 16:50 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-12 16:50:18 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Parthvi Vala 2018-11-15 09:34:24 UTC
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'

Comment 4 Dave Johnson 2018-11-15 09:45:50 UTC
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.

Comment 11 CFME Bot 2018-11-22 16:11:29 UTC
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(-)

Comment 12 CFME Bot 2018-11-22 16:13:41 UTC
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(-)

Comment 13 CFME Bot 2018-11-26 14:35:40 UTC
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(-)

Comment 14 Parthvi Vala 2018-11-28 12:52:29 UTC
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.

Comment 17 CFME Bot 2018-12-05 08:50:39 UTC
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(-)

Comment 18 CFME Bot 2018-12-06 14:35:52 UTC
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(-)

Comment 19 Parthvi Vala 2018-12-12 13:31:16 UTC
FIXED. Works perfectly. Verified on 5.10.0.29.20181211195209_fd990a9.


Note You need to log in before you can comment on or make changes to this bug.