Bug 1958911

Summary: Importing exported template from export-domain is stuck indefinitely
Product: [oVirt] ovirt-engine Reporter: msheena
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED DUPLICATE QA Contact: Avihai <aefrat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.6.7CC: bugs, gafik, mburman
Target Milestone: ---Keywords: Automation, Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-10 12:38:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description msheena 2021-05-10 12:15:21 UTC
Description of problem
======================
Given I have a template
  And I exported that template to the export_domain in my data-center
  And I deleted the template from the storage domain it was created in
When I try to import the template from the export_domain
Then the import task transaction rolls back while the template remains in a status 'locked' and the import task is stuck

Version-Release number of selected component (if applicable)
============================================================
ovirt-engine-4.4.6.7-0.1.el8ev.noarch

How reproducible
================
100% when running QE network team's 'import_export suite'

Steps to Reproduce
==================
1. Create a VM
2. Create networks and attach to a single host in the cluster
3. Create vnics for the VM with the created vnic-profiles pointing to the networks
4. Create a template from the created VM.
5. Export both template and VM to the export_domain in the data-center.
6. Remove the VM and the template from the storage domain in which they were created.
7. Import the exported VM from the export_domain twice (each time by a different name).
8. Import the exported template from the export_domain twice (each time by a different name).

Actual results
==============
Template import tasks in UI are stuck while engine.log reports the import failed due to a transaction rollback. both templates are 'locked'.

Expected results
================
Templates are imported.

Additional info
===============
* These tasks stay stuck even after the ovirt-engine service is restarted.

Comment 2 Eyal Shenitzky 2021-05-10 12:38:04 UTC

*** This bug has been marked as a duplicate of bug 1958869 ***