Bug 1069151

Summary: Override previous export of same template fail
Product: [Retired] oVirt Reporter: Ilanit Stein <istein>
Component: ovirt-engine-coreAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.4CC: acathrow, cmestreg, eedri, gklein, iheim, ofrenkel, sbonazzo, yeylon
Target Milestone: ---Keywords: Regression, TestBlocker
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-3.4.0-rc Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 12:23:55 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:
Bug Depends On:    
Bug Blocks: 1024889    
Attachments:
Description Flags
logs none

Description Ilanit Stein 2014-02-24 10:47:24 UTC
Description of problem:
This is a regression in VM test, since version: ovirt-engine-3.4.0-0.5.beta1.el6.noarch.
Override trial of a template in export domain, fail on (engine.log):
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp--127.0.0.1-8702-9) Operation Failed: [Cannot export Template. The Storage Domain already contains the target disk(s).]

The REST Request, which include exclusive = 'true':
2014-02-23 15:55:27,861 - MainThread - templates - DEBUG - Action request content is --  url:/api/templates/aa89a256-0d02-43a4-bf5e-5a5953138044/export body:<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <storage_domain>
        <name>ExportDomainRest</name>
    </storage_domain>
    <exclusive>true</exclusive>
</action>

Version-Release number of selected component (if applicable):
This problem exists for some time. We see it now on released:
ovirt-engine-3.4.0-0.11.beta3.el6.noarch,
and it exists at least from ovirt-engine-3.4.0-0.5.beta1.el6.noarch.
It is also seen on rhevm-3.4.0-0.2.1959.cc71493.master.el6evart-1.0.4-6v34

How reproducible:
100% - At each VM test run on CI\QE.

Additional info:
vms test run on QE for Ovirt 3.4:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Compute/view/3.4-git/view/Virt/job/3.4-git-compute-virt-reg_vms-rest-nfs/36/
vms test run on CI for rhevm 3.4:
http://jenkins-ci.eng.lab.tlv.redhat.com/job/rhevm_3.4_automation_coretools_two_hosts_restapi_vms_nfs_rest_factory/

Comment 1 Ilanit Stein 2014-02-24 10:50:32 UTC
Created attachment 866928 [details]
logs

Comment 2 Roy Golan 2014-02-25 15:24:22 UTC
moving to whiteboard storage - the CDA at ExportVmTemplate checks if that disk exist and isn't relating to forceOverride at all

flow: 
ExportVmTemplate.canDo
ExportVmTemplate:138 super.canDoAction
MoveOrCopyTemplateCommand:132 checkIfDisksExist(getTemplateDisks())
MoveOrCopyTemplateCommand:257 ->

if (imagesOnStorageDomain.contains(disk.getId())) {
                addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK);
                return false;
            }

Comment 3 Sandro Bonazzola 2014-03-03 14:40:23 UTC
This BZ should be fixed in oVirt 3.4.0 RC

Comment 5 Sandro Bonazzola 2014-03-31 12:23:55 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released

Comment 6 Maor 2014-04-27 08:25:57 UTC
*** Bug 1057764 has been marked as a duplicate of this bug. ***