Bug 1698542 - [VMware] Publish to template operation fails with error "Error: [EVM] VM [template-test] Step [EmailOwner] Status [Error Emailing Owner]"
Summary: [VMware] Publish to template operation fails with error "Error: [EVM] VM [tem...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: William Fitzgerald
QA Contact: Kedar Kulkarni
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1703592 (view as bug list)
Depends On:
Blocks: 1747186
TreeView+ depends on / blocked
 
Reported: 2019-04-10 14:49 UTC by Kedar Kulkarni
Modified: 2019-12-13 14:58 UTC (History)
6 users (show)

Fixed In Version: 5.11.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-13 14:58:01 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Kulkarni 2019-04-10 14:49:30 UTC
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:

Comment 2 William Fitzgerald 2019-04-10 15:59:19 UTC
Is there a reproducer ?

Comment 4 William Fitzgerald 2019-04-11 13:48:41 UTC
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]

Comment 6 CFME Bot 2019-05-10 18:11:59 UTC
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(-)

Comment 7 Kedar Kulkarni 2019-05-20 18:37:04 UTC
This is verified to work on 5.11.0.4.20190514210444_0c91ee1

Comment 8 Tina Fitzgerald 2019-05-21 18:40:05 UTC
*** Bug 1703592 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.