Bug 1140584 - [engine-webadmin] Failure to import a template from an imported domain is reported wrongly in the events tab
Summary: [engine-webadmin] Failure to import a template from an imported domain is rep...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.5.0
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Maor
QA Contact: Elad
URL:
Whiteboard: storage
Depends On:
Blocks: rhev3.5beta3
TreeView+ depends on / blocked
 
Reported: 2014-09-11 09:53 UTC by Elad
Modified: 2016-02-10 20:26 UTC (History)
9 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.0-13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:
amureini: Triaged+


Attachments (Terms of Use)
screenshot and engine.log (396.05 KB, application/octet-stream)
2014-09-11 09:53 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 32815 0 master MERGED core: Use error for audit log on import template from configuration. Never
oVirt gerrit 33133 0 ovirt-engine-3.5 MERGED core: Use error for audit log on import template from configuration. Never

Description Elad 2014-09-11 09:53:34 UTC
Created attachment 936473 [details]
screenshot and engine.log

Description of problem:
A failure to import a template from an imported domain is reported as positive event (green V) 

Version-Release number of selected component (if applicable):
rhev3.5 vt2.2
rhevm-3.5.0-0.10.master.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Have 2 working rhevm setups with 2 storage domains on one of them (setup1) and 1 domain on the second (setup2)
2. Create a VM with disks on both domains on setup1. Create a template out of it and wait for the OVF to be uploaded to the OVF_STORE disk.
3. Detach one of the domains from setup1 and attach it to setup2.
4. Import the template

Actual results:
Template import fails with PSQLException:

2014-09-11 11:29:50,178 ERROR [org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand] (org.ovirt.thread.pool-6-thread-17) [28caa7dc] Command org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertimage_storage_domain_map(?, ?, ?, ?)}]; ERROR: insert or update on table "image_storage_domain_map" violates foreign key constraint "fk_image_storage_domain_map_storage_domain_static"
  Detail: Key (storage_domain_id)=(2b7d1f3b-1409-4537-8ffd-f20e15f3868d) is not present in table "storage_domain_static".
  Where: SQL statement "INSERT INTO image_storage_domain_map(image_id, storage_domain_id, quota_id, disk_profile_id) VALUES( $1 ,  $2 ,  $3 ,  $4 )"
PL/pgSQL function "insertimage_storage_domain_map" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: insert or update on table "image_storage_domain_map" violates foreign key constraint "fk_image_storage_domain_map_storage_domain_static"
  Detail: Key (storage_domain_id)=(2b7d1f3b-1409-4537-8ffd-f20e15f3868d) is not present in table "storage_domain_static".


The event is reported as positive in the event logs.  

Expected results: screenshot and engine.log  


Additional info:

Comment 1 Eyal Edri 2014-09-28 11:29:32 UTC
this bug was moved to MODIFIED before vt4 build date thus moving to ON_QA.
if you belive this bug isn't in vt4, please report to rhev-integ

Comment 2 Elad 2014-09-30 11:30:40 UTC
Trying to import a template which has disks from another setup's domain is blocked on CDA:

2014-09-30 14:28:26,547 WARN  [org.ovirt.engine.core.bll.ImportVmTemplateFromConfigurationCommand] (ajp-/127.0.0.1:8702-8) [45c55e35] CanDoAction of action ImportVmTemplateFromConfiguration failed. Reasons:VAR__ACTION__COPY,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST


Verified using 2 rhev3.5 vt4 setups

Comment 3 Allon Mureinik 2015-02-16 19:12:26 UTC
RHEV-M 3.5.0 has been released, closing this bug.

Comment 4 Allon Mureinik 2015-02-16 19:12:28 UTC
RHEV-M 3.5.0 has been released, closing this bug.


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