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.

4 Likes

Hi guys,

are there any news here`?
Is this issue already solved for Jansa 2?

There is a fix for the error:

Missing template generic_mailer/generic_notification with "mailer".

If that is what you’re seeing in your evm.log, it was this issue.

It was fixed on master and
backported to jansa. It was in jansa-2 so please check your logs for errors/warnings as you may be hitting a different failure .

git tag --contains 758ffeb22e0a6f130665961cb4811133c55d6e25
jansa-2

Hi @jrafanie, first of all thanks for the tip.
atm, we are using Jansa2: * Version jansa-2.20

“Unfortunately” we do not have any Generic mail errors, but every time we use email method in evm log we get this kind of errors:
MIQ(MiqAeEngine.deliver) Error delivering for object [ServiceTemplateProvisionTask.id_number] with state [checkprovisioned] to Automate:
Test SMTP mail is working properly.
Could you advice here something?

Best regards,
M

I don’t see an actual error message in that log line, only that a generic error occurred. Please review the around that log line and also the automation.log for the same timeframe. Perhaps there is a more specific error and a backtrace in those locations.

@tinaafitz have you seen anything like that?

Hi @jrafanie,

You’re exactly right that the log line is a generic error message indicating that it had a problem in the checkprovisioned state.

The automation.log and evm.log for the same timeframe should have more details.

Hi guys thank you for the help.
We solved the problem by turning the notifier on (on every appliance).
Best regards

1 Like

Hi @mmirak,

I’m so glad to hear that your problem has been resolved. :slight_smile:

Great to hear @mmirak.