Bug 1328725 - Re importing template version after the base template has changed fails
Summary: Re importing template version after the base template has changed fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Marek Libra
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 07:35 UTC by sefi litmanovich
Modified: 2016-09-26 12:31 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:31:24 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine log (255.84 KB, application/x-gzip)
2016-04-20 07:35 UTC, sefi litmanovich
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 58181 0 master MERGED webadmin: Enforce Clone for template import without base 2016-05-30 06:32:36 UTC
oVirt gerrit 61891 0 ovirt-engine-4.0 MERGED webadmin: Enforce Clone for template import without base 2016-08-16 07:19:27 UTC

Description sefi litmanovich 2016-04-20 07:35:04 UTC
Created attachment 1148881 [details]
engine log

Description of problem:

In 4.0 a new feature is introduced that allows to remove the base/parent template of some template versions, this results with the next template version becoming the new 'base' template version: Bug 1194989 
A problem occurs when some template version e.g (3) was exported and later it's parent base template is removed. In that case if version (3) is removed as well and then we try to re import it from export domain (without cloning) the action fails with the message regarding missing base template in storage domain.
While this makes sense technically, this flow should be fix in such way that the new parent child relation between the new base template and version (3) will be reflected also in case of import/export. 

flow: create template 'test' -> create version (2) for template 'test' -> create version (3) for template 'test' -> export version (3) -> delete base version, now version (2) becomes base -> delete version (3) -> import version (3) from export domain (not clone): 
Result -> Cannot import the template because it's base version is missing. 

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

ovirt-engine-4.0.0-0.0.master.20160405102116.git3819ab7.el7.centos.noarch

How reproducible:
always

Steps to Reproduce:
1.create template 'test'.
2.create version (2) for template 'test'
3.create version (3) for template 'test'
4.export version (3)
5.delete base version -> now version (2) becomes base
6.delete version (3)
7.import version (3) from export domain (not clone)

Actual results:
Cannot import the template because it's base version is missing.

Expected results:
Import succeeds

Additional info:
Not much information in engine.log:

2016-04-20 10:31:14,403 WARN  [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateCommand] (default task-11) [323cd52f] Validation of action 'ImportVmTemplate' failed for user admin@internal. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM_TEMPLATE,VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE

Comment 1 Michal Skrivanek 2016-04-25 13:49:29 UTC
it should be imported as a standalone template then

Comment 2 Sandro Bonazzola 2016-05-02 09:47:12 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 3 Marek Libra 2016-08-03 09:35:33 UTC
The bug was incorrectly switched to MODIFIED before backport by automation@.

Comment 4 Red Hat Bugzilla Rules Engine 2016-08-03 09:35:37 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 sefi litmanovich 2016-09-05 08:49:18 UTC
Verified with rhevm-4.0.4-0.1.el7ev.noarch -
Following the flow in bug description.
When trying to import the template without base, cloning is forced.


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