[SOLVED] Can't update ServiceProvision_Complete Instance


#1

So, now that I’m able to successfully deploy a couple of services, I’ve started playing with the email notification features. I’ve copied the Serviice/Provisioning/Email/ServiceProvision_Complete Instance to my custom datastore and updated the to_email_address and from_email_address values. But after requesting a new service, I’m still receiving the notification email from evmadmin@company.com, instead of the email I’ve configured.

Is there somewhere else I should be updating these values?

thanks,
Steve


#2

Hi Steve,

That should be all that is required to use your new instance.

I would suggest the following:

  • Check that your new domain is enabled.
  • Check the automation.log for errors.
  • Check that your new instance name has exactly the same case as the original. (We had a case issue that has been resolved, but I’m not sure which build it was available.)
  • Search the automation.log for an “Updated namespace” message for your new instance. (This log message tells you which domain it selected for the instance.)

I hope this helps.

Regards,
Tina


#3

Hi Tina,

Thanks for your help. Unfortunately, still no luck.

  • Domain is enabled

  • no errors in automation.log

  • Instance name is the same case as I copied it to my domain using the gui.

  • I’ve confirmed that the correct instance is being used. See below for a snippet of automation.log. The domain VirtualLab is my copy:

    [----] I, [2014-10-08T17:23:33.177156 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) Updated namespace [miqaedb:/Service/Provisioning/Email/ServicePr
    ovision_complete?event=service_provisioned#create VirtualLab/Service/Provisioning]
    [----] I, [2014-10-08T17:23:33.237286 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) Invoking [inline] method [VirtualLab/Service/Provisioning/Email/
    ServiceProvision_Complete] with inputs [{}]
    [----] I, [2014-10-08T17:23:33.238392 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) <AEMethod [VirtualLab/Service/Provisioning/Email/ServiceProvisio
    n_Complete]> Starting
    [----] I, [2014-10-08T17:23:33.874135 #19777:54812f0] INFO – : Q-task_id([service_template_provision_task_106]) ServiceProvision_Complete

    • EVM Automate Method Started
      [----] I, [2014-10-08T17:23:33.876404 #19777:54812f0] INFO – : Q-task_id([service_template_provision_task_106]) ServiceProvision_Complete
    • EVM Automate Method Ended
      [----] I, [2014-10-08T17:23:33.892438 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) <AEMethod [VirtualLab/Service/Provisioning/Email/ServiceProvisio
      n_Complete]> Ending
      [----] I, [2014-10-08T17:23:33.892560 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) Method exited with rc=MIQ_OK
      [----] I, [2014-10-08T17:23:33.892976 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) Followed Relationship [miqaedb:/Service/Provisioning/Email/Serv
      iceProvision_complete?event=service_provisioned#create]
      [----] I, [2014-10-08T17:23:33.893180 #19777:c50008] INFO – : Q-task_id([service_template_provision_task_106]) Processed State=[EmailOwner] with Result=[ok]

#4

Hi Steve,

You shouldn’t have to do this, but could you also modify the /VirtualLab/Service/Provisioning/Email class schema to set the to and from email addresses to the same value as your instance and try it again?

If it’s still not working properly, could you paste your automate method and the automation.log log portion where it executes that email method?

Thanks,
Tina


#5

Hi Tina,

As you predicted, modifying the class schema had no effect. See below for the log entry and the automate method code. Note that it’s a direct copy from the MIQ domain:

###################################
#
# EVM Automate Method: ServiceProvision_Complete
#
# Notes: Place holder for Service Provision Complete email #
###################################
begin
  @method = 'ServiceProvision_Complete'
  $evm.log("info", "#{@method} - EVM Automate Method Started")

  # Turn of verbose logging
  @debug = true

  #
  # Exit method
  #
  $evm.log("info", "#{@method} - EVM Automate Method Ended")
  exit MIQ_OK

  #
  # Set Ruby rescue behavior
  #
rescue => err
  $evm.log("error", "#{@method} - [#{err}]\n#{err.backtrace.join("\n")}")
  exit MIQ_STOP
end

[----] I, [2014-10-09T15:29:28.539781 #5341:60700c] INFO – : Q-task_id([service_template_provision_task_108]) Updated namespace [miqaedb:/Service/Provisioning/Email/ServiceProvision_complete?event=service_provisioned#create VirtualLab/Service/Provisioning]
[----] I, [2014-10-09T15:29:28.679096 #5341:60700c] INFO – : Q-task_id([service_template_provision_task_108]) Invoking [inline] method [VirtualLab/Service/Provisioning/Email/ServiceProvision_Complete] with inputs [{}]
[----] I, [2014-10-09T15:29:28.680032 #5341:60700c] INFO – : Q-task_id([service_template_provision_task_108]) <AEMethod [VirtualLab/Service/Provisioning/Email/ServiceProvision_Complete]> Starting
[----] I, [2014-10-09T15:29:29.179408 #5341:689dd4c] INFO – : Q-task_id([service_template_provision_task_108]) ServiceProvision_Complete - EVM Automate Method Started
[----] I, [2014-10-09T15:29:29.181171 #5341:689dd4c] INFO – : Q-task_id([service_template_provision_task_108]) ServiceProvision_Complete - EVM Automate Method Ended
[----] I, [2014-10-09T15:29:29.195976 #5341:60700c] INFO – : Q-task_id([service_template_provision_task_108]) <AEMethod [VirtualLab/Service/Provisioning/Email/ServiceProvision_Complete]> Ending
[----] I, [2014-10-09T15:29:29.196095 #5341:60700c] INFO – : Q-task_id([service_template_provision_task_108]) Method exited with rc=MIQ_OK


#6

Hi Steve,

Our automate model doesn’t currently have a default email setup for service provisioning.
Unfortunately, the service email method you copied doesn’t actually generate an email.
It’s just a placeholder.

You can copy one of the existing email methods and modify it as follows:

*Copy the automate method
from:
/ManageIQ/Infrastructure/Provisioning/Email/MiqProvision_Complete
To:
/VirtualLab/Service/Provisioning/Email/ServiceProvision_Complete
*Edit the method content as needed

Regards,
Tina


#7

That solved it!

Thanks for your help, Tina.


#8

My pleasure.

I’m so glad to hear that it’s working for you!