Description of problem: Publish to Template process fails with error 'Error: [EVM] VM [template-test] Step [EmailOwner] Status [Error Emailing Owner]' This happens on fresh appliances where I haven't touched anything related to email in config. So there is no user error surrounding email. Related to BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1693740#c7 Version-Release number of selected component (if applicable): 5.10.3.0 How reproducible: 100% Steps to Reproduce: 1.Add VMware provider 2.Select any VM 3.Lifecycle-> publish to template Actual results: Request fails with error Emailing Owner Expected results: Request should succeed Additional info:
Is there a reproducer ?
I'm seeing this in reproducer from Comment 3 [----] I, [2019-04-10T02:59:48.289316 #5915:11c6f50] INFO -- : Q-task_id([r3_miq_provision_3]) <AEMethod [/ManageIQ/System/Notification/Email/miq_provision_customize_body]> Starting [----] E, [2019-04-10T02:59:48.605526 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) <AEMethod miq_provision_customize_body> The following error occurred during method evaluation: [----] E, [2019-04-10T02:59:48.606143 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) <AEMethod miq_provision_customize_body> NoMethodError: undefined method `show_url' for #<MiqAeMethodService::MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Template:0x000000001252c8a0> [----] E, [2019-04-10T02:59:48.607168 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) <AEMethod miq_provision_customize_body> (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-e5a6db4ccd64/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:234:in `method_missing' (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1584:in `perform' (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1664:in `loop' (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' /ManageIQ/System/Notification/Email/miq_provision_customize_body:53:in `vm_href' /ManageIQ/System/Notification/Email/miq_provision_customize_body:38:in `build_body' /ManageIQ/System/Notification/Email/miq_provision_customize_body:14:in `main' [----] E, [2019-04-10T02:59:48.616972 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-e5a6db4ccd64/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:234:in `method_missing': undefined method `show_url' for #<MiqAeMethodService::MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Template:0x000000001252c8a0> (NoMethodError) [----] E, [2019-04-10T02:59:48.617470 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' [----] E, [2019-04-10T02:59:48.617908 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1584:in `perform' [----] E, [2019-04-10T02:59:48.618504 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' [----] E, [2019-04-10T02:59:48.618966 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1664:in `loop' [----] E, [2019-04-10T02:59:48.619426 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from (drbunix:///tmp/automation_engine20190410-5915-ddz7mj) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2019-04-10T02:59:48.619830 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from /ManageIQ/System/Notification/Email/miq_provision_customize_body:53:in `vm_href' [----] E, [2019-04-10T02:59:48.620258 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from /ManageIQ/System/Notification/Email/miq_provision_customize_body:38:in `build_body' [----] E, [2019-04-10T02:59:48.620623 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from /ManageIQ/System/Notification/Email/miq_provision_customize_body:14:in `main' [----] E, [2019-04-10T02:59:48.621082 #5915:92c9288] ERROR -- : Q-task_id([r3_miq_provision_3]) Method STDERR: from /ManageIQ/System/Notification/Email/miq_provision_customize_body:72:in `<main>' [----] I, [2019-04-10T02:59:48.639542 #5915:11c6f50] INFO -- : Q-task_id([r3_miq_provision_3]) <AEMethod [/ManageIQ/System/Notification/Email/miq_provision_customize_body]> Ending [----] E, [2019-04-10T02:59:48.639866 #5915:11c6f50] ERROR -- : Q-task_id([r3_miq_provision_3]) Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]] [----] E, [2019-04-10T02:59:48.640245 #5915:11c6f50] ERROR -- : Q-task_id([r3_miq_provision_3]) State=<EmailOwner> running raised exception: <Method exited with rc=Unknown RC: [1]> [----] W, [2019-04-10T02:59:48.640329 #5915:11c6f50] WARN -- : Q-task_id([r3_miq_provision_3]) Error in State=[EmailOwner]
https://github.com/ManageIQ/manageiq-content/pull/529
New commit detected on ManageIQ/manageiq-content/master: https://github.com/ManageIQ/manageiq-content/commit/65633a013de714d69a93add057f14769f50252b9 commit 65633a013de714d69a93add057f14769f50252b9 Author: william fitzgerald <wfitzger> AuthorDate: Tue Apr 30 10:50:36 2019 -0400 Commit: william fitzgerald <wfitzger> CommitDate: Tue Apr 30 10:50:36 2019 -0400 Fix Publish to template email. Created a new instance and method for Publish to Template for Infrastructure. Modified State machine to use new instance. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1698542 Fixed warning Added spec Changed prod to provision in method as requested content/automate/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_Template.class/__class__.yaml | 2 +- content/automate/ManageIQ/System/Notification/Email.class/__methods__/miq_provision_template_customize_body.rb | 69 + content/automate/ManageIQ/System/Notification/Email.class/__methods__/miq_provision_template_customize_body.yaml | 12 + content/automate/ManageIQ/System/Notification/Email.class/infrastructuremiqprovisiontemplatecomplete.yaml | 18 + spec/content/automate/ManageIQ/System/Notification/Email.class/__methods__/miq_provision_template_customize_body_spec.rb | 108 + 5 files changed, 208 insertions(+), 1 deletion(-)
This is verified to work on 5.11.0.4.20190514210444_0c91ee1
*** Bug 1703592 has been marked as a duplicate of this bug. ***