Notification mail not working

automate

#1

Trying set up notification mails for vm provisioning. Already created own domain and configured mail IDs but still mails are not received…

Observed no errors in automation.log, SMTP setting working fine for test mails, checked junk mails too no mail received

After recreating users and groups properly and provisioning VM, automation Log say :

[----] I, [2018-09-28T10:39:35.915617 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/Profile/DHS_Self#get_state_machine ManageIQ/Infrastructure/VM/Provisioning]
[----] I, [2018-09-28T10:39:35.966772 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Instance [/ManageIQ/Infrastructure/VM/Provisioning/Profile/DHS_Self] not found in MiqAeDatastore - trying [.missing]
[----] I, [2018-09-28T10:39:35.972023 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Followed Relationship [miqaedb:/Infrastructure/VM/Provisioning/Profile/DHS_Self#get_state_machine]
[----] I, [2018-09-28T10:39:35.972725 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Following Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/template#create]
[----] I, [2018-09-28T10:39:35.992879 #2025:1220ce4] INFO – : Detected Request:<30> with Approval State:
[----] I, [2018-09-28T10:39:35.994747 #2025:1220ce4] INFO – : Requester email logic starting
[----] I, [2018-09-28T10:39:36.005418 #2025:1220ce4] INFO – : Requester email:dipakc@xxx.in Owner Email:dipakc@xxx.in
[----] I, [2018-09-28T10:39:36.032295 #2025:1220ce4] INFO – : Sending email to dipakc@xxx.in from mig-sysadmin@xxx.in subject: <Request ID 30 - Your Virtual Machine configuration was Approved, pending Quota Validation>
[----] I, [2018-09-28T10:39:36.225786 #2025:122f140] INFO – : <AEMethod [/MIG/Infrastructure/VM/Provisioning/Email/MiqProvisionRequest_Approved]> Ending
[----] I, [2018-09-28T10:39:36.225951 #2025:122f140] INFO – : Method exited with rc=MIQ_OK
[----] I, [2018-09-28T10:39:36.227832 #2025:122f140] INFO – : Followed Relationship [miqaedb:/infrastructure/VM/Provisioning/Email/MiqProvisionRequest_Approved#create]
[----] I, [2018-09-28T10:39:36.228212 #2025:122f140] INFO – : Followed Relationship [miqaedb:/System/Policy/MiqProvisionRequest_Approved#create]
[----] I, [2018-09-28T10:39:36.228516 #2025:122f140] INFO – : Followed Relationship [miqaedb:/System/Policy/request_approved#create]
[----] I, [2018-09-28T10:39:36.228850 #2025:122f140] INFO – : Followed Relationship [miqaedb:/System/Event/RequestEvent/Request/request_approved#create]
[----] I, [2018-09-28T10:39:36.385103 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/template#create ManageIQ/Infrastructure/VM/Provisioning/StateMachines]
[----] I, [2018-09-28T10:39:36.588346 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) In State=[CustomizeRequest], invoking [on_entry] method=[update_provision_status(status => ‘Customizing Request’)]
[----] I, [2018-09-28T10:39:36.886225 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Updated namespace [Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/update_provision_status ManageIQ/Infrastructure/VM/Provisioning/StateMachines]
[----] I, [2018-09-28T10:39:36.894973 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) Invoking [inline] method [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status] with inputs [{“status”=>“Customizing Request”}]
[----] I, [2018-09-28T10:39:36.896273 #2007:122f140] INFO – : Q-task_id([miq_provision_29]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status]> Starting

Please Help!!


#2

Have you configured and tested SMTP settings? (Could find docs only of the product, not the project, but they look very close).


#3

Relevant Code (from the ManageIQ-Domain)

# Get vm from miq_provision object
prov = $evm.root['miq_provision']
vm = prov.vm   # <-- this line here
raise "VM not found" if vm.nil?

How do you call the method? The most likely explanation is, that you are not running an an MIQ-Provision workflow and it fails for that reason


#4

Thanks for your response…SMTP is configured and its working fine


#5

Thanks for your response
I tried in both ways …by provisioning VM with self service user and by simulation but some how end up with log

INFO – : Invoking [inline] method [/MIG/Infrastructure/VM/Provisioning/Email/MiqProvisionRequest_Approved] with inputs [{}]…nothing happens ahead

Is there any location where i can locate SMTP logs?


#6

Mail notification started working after starting the snmpd , snmptrapd daemons and enabling ‘notifier’ role of server


#7

The contents of the $evm variable changes depending on the context the StateMachine is running.

The Log posted earlier did not run in an VM-Provision workflow and tried to access an object, that was not present in $evm, without proper handling

Does it work now? I don’t see any more errors in the log-file


#9

yes it works