Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1511445 - Template added to CFME even though sealing fails in RHV
Summary: Template added to CFME even though sealing fails in RHV
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Moti Asayag
QA Contact: Radim Hrazdil
Depends On:
Blocks: 1530622 1532648
TreeView+ depends on / blocked
Reported: 2017-11-09 11:45 UTC by Jan Zmeskal
Modified: 2018-06-21 20:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1532648 (view as bug list)
Last Closed: 2018-06-21 20:51:45 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:

Attachments (Terms of Use)
Second attempt - logs from CFME & RHV (deleted)
2017-11-27 13:12 UTC, Jan Zmeskal
no flags Details

System ID Priority Status Summary Last Updated
Github ManageIQ manageiq-content pull 233 None None None 2017-12-25 08:42:40 UTC

Description Jan Zmeskal 2017-11-09 11:45:48 UTC
Description of problem:
When you create a template from VM in RHV and sealing fails, the template is not created in RHV. However, such template appears in CFME. 

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. Add RHV provider to CFME and make sure relationships are refreshed
2. In RHV, try to create template from VM in such manner that it fails during sealing
3. Chech that the template is indeed not present in RHV
4. In CFME, go to Compute->Infrastructure->Virtual Machines->Templates->All Templates
5. New template is there

Actual results:
see step 5

Expected results:
I suppose such template should not appear in CFME since its creation was not successfully finished.

Comment 2 Moti Asayag 2017-11-26 15:00:15 UTC
Hi Jan,

Could you attach the engine.log to the bug ?
The engine.log should contain the certain event which triggered the removal of the created template from RHV. That event is probably isn't monitored on manageiq side.

Therefore we should rely on that event to perform a target refresh for that target template and as an outcome it should be removed if not exists on RHV side.

Comment 3 Jan Zmeskal 2017-11-27 13:12:27 UTC
Created attachment 1359454 [details]
Second attempt - logs from CFME & RHV

I tried this again on RHV RHV and CFME This time creation of template failed even before sealing, but the result was the same nonetheless. I tried to make a template out of VM "jzmeskal_test2". The template was named "flawed_template2". It was not created on RHV, but was created on CFME side. See the attached logs.

Comment 4 Jan Zmeskal 2017-12-12 07:53:03 UTC
How to reproduce failed template creation:
1. Go to RHV and create a new VM with these properties:
- Template: Blank
- No network interface
2. Right-click the new VM and choose Make Template
3. In the New Template dialog click on checkbox Seal Template
4. Click OK
5. Template creating fails, but it is present in CFME

Comment 6 CFME Bot 2018-01-08 23:17:23 UTC
New commit detected on ManageIQ/manageiq-content/master:

commit 8565b550910bd20c551c1cdee6021664453cc14c
Author:     Boris Odnopozov <>
AuthorDate: Sun Dec 24 16:39:14 2017 +0200
Commit:     Boris Odnopozov <>
CommitDate: Sun Dec 24 16:41:43 2017 +0200

    Refresh template if sealing failed
    Refresh the template if we catch an event from the provider on sealing

 .../RHEVM.class/user_add_vm_template_seal_failure.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 content/automate/ManageIQ/System/Event/EmsEvent/RHEVM.class/user_add_vm_template_seal_failure.yaml

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