No email notifications since jansa upgrade

Hi, after migrating to jansa ManageIQ seem to be unable to send notifications email (service provisioning, approval, retirement ecc)

Email test from the settings page works fine

Digging in the log I found this:

[----] I, [2020-09-28T17:48:26.177798 #6725:2ad460e8795c]  INFO -- : MIQ(GenericMailer#set_mailer_smtp) Mailer settings: {:address=>"mail.apra.it", :port=>"25", :domain=>"apra.it", :authentication=>nil, :user_name=>nil, :enable_starttls_auto=>true, :openssl_verify_mode=>"none"}
[----] I, [2020-09-28T17:48:26.177965 #6725:2ad460e8795c]  INFO -- : MIQ(GenericMailer#prepare_generic_email) options: {:to=>"miqadmin@apra.it", :from=>"manageiq@apra.it", :cc=>"", :bcc=>"", :subject=>"Request ID 2133 - Service Request received from c.mammoli@apra.it was Approved.", :content_type=>nil, :body=>"Approver,<br/><br/>Service Request received from c.mammoli@apra.it was Approved.<br/><br/>Approvers reason : Auto-Approved<br/><br/>To view this Request go to : <a href=https://srvmiq.apra.it/miq_request/show/2133>https://srvmiq.apra.it/miq_request/show/2133</a><br/><br/> Thank you,<br/> Virtualization Infrastructure Team", :sent_on=>2020-09-28 17:48:26 +0200, :attachment=>[]}
[----] E, [2020-09-28T17:48:26.179280 #6725:2ad460e8795c] ERROR -- : MIQ(GenericMailer.deliver) method: automation_notification options: {:to=>"miqadmin@apra.it", :from=>"manageiq@apra.it", :cc=>"", :bcc=>"", :subject=>"Request ID 2133 - Service Request received from c.mammoli@apra.it was Approved.", :content_type=>nil, :body=>"Approver,<br/><br/>Service Request received from c.mammoli@apra.it was Approved.<br/><br/>Approvers reason : Auto-Approved<br/><br/>To view this Request go to : <a href=https://srvmiq.apra.it/miq_request/show/2133>https://srvmiq.apra.it/miq_request/show/2133</a><br/><br/> Thank you,<br/> Virtualization Infrastructure Team", :sent_on=>2020-09-28 17:48:26 +0200, :attachment=>[]} **delivery-error Missing template generic_mailer/automation_notification with "mailer". Searched in:
* generic_mailer

Any idea??

Look in the evm.log. Are you seeing error messages about ssl/unsupported protocol?

If so, you’ll either need to downgrade your openssl config settings as per https://bugzilla.redhat.com/show_bug.cgi?id=1872358#c70

That, or update your postfix/sendmail to use TLS1.x.

If that’s not it, then please post the error (if any) you’re seeing from the logs.

Oops, not sure if you can see that comment. Basically just says update your openssl.cnf and set “CipherString = DEFAULT:@SECLEVEL=1”. It must be placed before the first ‘[…]’.

I tried but still no emails. Btw I don’t I’m hitting that bug, I can’t see any connection to my SMTP server at all, not even running tcpdump

The only error I see in the logs is the one I pasted:
ERROR – : MIQ(GenericMailer.deliver) method: automation_notification delivery-error: Missing template generic_mailer/automation_notification with “mailer”. Searched in
* “generic_mailer”

Nothing regarding SSL/TLS

Same problem here. Test emails in the settings do work but no other emails from automation go though. The only error found in logs is the one mentioned above in the previous post.

Were you able to solve the problem?

Nope, I went back to Ivanchuk

@djberg96 I looked into this, I found these commits that seem to indicate some of the various automate classes that do email were deprecated previously and removed in jansa in manageiq-content, maybe @wfitzger or @tinaafitz can comment if things need to be migrated via this comment: “Email is now in System/Notification/Email class.”

git log upstream/ivanchuk...upstream/jansa --no-merges --grep email lib content

...
commit 4f9442b9209a01d3dadef1560f040970329102f6
Date:   Mon Feb 24 17:35:39 2020 -0500

    Removed all deprecated email components from AutomationManagement namespace.
    
    Removed class and all instances and methods from
       AutomationManagement/AnsibleTower/Service/Provisioning/Email
    
    Email is now in System/Notification/Email class.
    
    @miq-bot add_label hammer/no, ivanchuk/no, changelog/yes, technical debt

commit 26f28bc708af85e1208df078ea2a25fa866bb6cb
Date:   Mon Feb 24 16:29:59 2020 -0500

    Removed all deprecated email components from Cloud namespace. Removed class and all instances and methods from 4 classes:
    
    Cloud/Orchestration/Provisioning/Email
    Cloud/Orchestration/Reconfigure/Email
    Cloud/Orchestration/Retirement/Email
    
    Cloud/VM/Provisioning/Email
    Cloud/VM/Retirement/Email
    
    Email is now in System/Notification/Email class.
    
    @miq-bot add_label hammer/no, ivanchuk/no, changelog/yes, technical debt
    Removed vm_retire_extend_spec.rb

commit 03628cfb07a72ff3bbefe3cae2ce5f460d04d2e8
Date:   Mon Feb 24 12:35:24 2020 -0500

    Removed all deprecated email components from Infrastructure namespace.
    
    Removed class and all instances and methods from 4 classes:
    
    Infrastructure/VM/Provisioning/Email
    Infrastructure/VM/Migrate/Email
    Infrastructure/VM/Reconfigure/Email
    Infrastructure/VM/Retirement/Email
    
    Email is now in System/Notification/Email class.
    
    @miq-bot add_label hammer/no, ivanchuk/no, changelog/yes, technical debt
    Removing vm_retire_extend_spec

commit 80fc774ae30337b467139775bd933a9546d0187f
Date:   Thu Feb 20 16:57:41 2020 -0500

    Removed all deprecated email components from Service namespace.
    
    Removed Service/Provisioning/Email class and all instances and methods.
    Removed Service/Retirement/Email class.
    
    Email is now in System/NotificationEmail class.

Hi @jrafanie, @djberg96, We introduced Consolidated Email in 5.10.

Here’s the start of a complete explanation. :slight_smile:

http://talk.manageiq.org/t/consolidated-email/4810

Email was working properly in 5.10 after the consolidation. We’re looking into it now.

2 Likes

With @tinaafitz and @wfitzger’s help, we tracked it down.

The missing template was a backend issue that should be resolved by including ui_dependencies in the bundler group since manageiq-ui-classic is where the template resides.

The PR was merged on master and marked for jansa backport.

Thank you all for your bug reports.