Bug 1532648

Summary: Template added to CFME even though sealing fails in RHV
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvidersAssignee: Moti Asayag <masayag>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: bodnopoz, gblomqui, jfrey, jhardy, jzmeskal, obarenbo, rhrazdil, simaishi
Target Milestone: GA   
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1511445 Environment:
Last Closed: 2018-03-06 15:12:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On: 1511445    
Bug Blocks: 1471124    

Comment 2 CFME Bot 2018-01-09 14:02:22 UTC
New commit detected on ManageIQ/manageiq-content/gaprindashvili:
https://github.com/ManageIQ/manageiq-content/commit/f33250fea9879b86b563c5661db2b825a73943fd

commit f33250fea9879b86b563c5661db2b825a73943fd
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Jan 8 18:15:32 2018 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Tue Jan 9 09:00:17 2018 -0500

    Merge pull request #233 from borod108/bugs/1511445on_seal_failure
    
    Refresh template if sealing failed
    (cherry picked from commit 72417b92e8536d0593aedf2857f5c0bee0a4ed3b)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1532648

 .../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

Comment 5 CFME Bot 2018-01-15 13:44:53 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/gaprindashvili:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/560859225ab2d2561f6b0e50291cccf24d3bd813

commit 560859225ab2d2561f6b0e50291cccf24d3bd813
Author:     Moti Asayag <masayag>
AuthorDate: Mon Jan 15 14:11:06 2018 +0200
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Jan 15 08:42:39 2018 -0500

    Merge pull request #184 from borod108/bugs/dissconnect_targeted_template
    
    Add test for disconnecting ems on targeted refresh
    (cherry picked from commit 455b3f22ec8c608acd6b8965ae74f01254159781)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1532648

 .../redhat/infra_manager/refresh/refresher.rb      |   28 +
 .../refresh/refresher_target_template_spec.rb      |   47 +
 .../refresh/ovirt_sdk_targeted_template.yml        | 6398 ++++++++++++++++++++
 3 files changed, 6473 insertions(+)
 create mode 100644 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_target_template_spec.rb
 create mode 100644 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_targeted_template.yml

Comment 6 Radim Hrazdil 2018-01-19 10:10:41 UTC
Tested on CFME version 5.9.0.17 which should contain the fix. RHV version 4.1.8. However, when template creation fails on seal, it is still added to CFME.

Will add new logs from engine and CFME.

Boriso, could you check, please?

Comment 12 Radim Hrazdil 2018-01-23 11:51:15 UTC
After disscussion with Boriso, verified that when template fails to be created, it is in cfme marked as Orphaned or Archived, depending on whether the VM has or doesn't have storage.

CFME Version 5.0.9.17