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): CFME 5.9.0.4 RHV 4.1.7.4 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.
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.
Created attachment 1359454 [details] Second attempt - logs from CFME & RHV I tried this again on RHV RHV 4.1.7.6 and CFME 5.9.0.9. 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.
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
https://github.com/ManageIQ/manageiq-content/pull/233
New commit detected on ManageIQ/manageiq-content/master: https://github.com/ManageIQ/manageiq-content/commit/8565b550910bd20c551c1cdee6021664453cc14c commit 8565b550910bd20c551c1cdee6021664453cc14c Author: Boris Odnopozov <bodnopoz> AuthorDate: Sun Dec 24 16:39:14 2017 +0200 Commit: Boris Odnopozov <bodnopoz> 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 failure. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1511445 .../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
https://github.com/ManageIQ/manageiq-providers-ovirt/pull/184 is merged.