Bug 1338509

Summary: Template is broken when created from Glance image
Product: [oVirt] ovirt-engine Reporter: Meni Yakove <myakove>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: amureini, bugs, gklein, ratamir, tnisan
Target Milestone: ovirt-4.0.0-rcKeywords: AutomationBlocker, Regression
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+
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: 2016-07-05 08:04:15 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:
Attachments:
Description Flags
engine.log none

Description Meni Yakove 2016-05-22 08:55:24 UTC
Description of problem:
Template is broken when created from Glance image.
from API/ovirt-engine/api/templates/cf595090-a233-47d1-87dc-7897f84356f1 i get NO CONTENT

In UI on 'Disks' tab the disk is not there and we have NPE in engine log

2016-05-22 11:42:32,580 ERROR [org.ovirt.engine.core.bll.storage.disk.GetVmTemplatesDisksQuery] (default task-7) [] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.common.businessentities.storage.BaseDisk.setDiskVmElements(BaseDisk.java:83) [common.jar:]
        at org.ovirt.engine.core.bll.storage.disk.GetVmTemplatesDisksQuery.executeQueryCommand(GetVmTemplatesDisksQuery.java:28) [bll.jar:]
        at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:101) [bll.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
        at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:558) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:529) [bll.jar:]
        at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) [:1.8.0_91]

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.0-0.0.master.20160521171336.git2e1899b.el7.centos.noarch



Steps to Reproduce:
1. Add Glance external provider to ovirt
2. Import Glance disk as template
3. Go to template 'Disks' tab

Comment 1 Meni Yakove 2016-05-22 08:56:06 UTC
Created attachment 1160278 [details]
engine.log

Comment 2 Allon Mureinik 2016-05-22 08:59:33 UTC
Tal, seems like a regression from your recent refactoring - please take a look?

Comment 3 Red Hat Bugzilla Rules Engine 2016-05-22 08:59:38 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Tal Nisan 2016-05-23 13:04:53 UTC
Indeed it is, adding a Glance provider now and checking what's the problem

Comment 5 Yaniv Lavi 2016-05-23 13:25:51 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Yaniv Lavi 2016-05-23 13:26:21 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 7 Raz Tamir 2016-06-15 15:00:17 UTC
Verified on ovirt-engine-4.0.0.4-0.1.el7ev.noarch .
Imported an image from Glance as template and the template is usable

Comment 8 Sandro Bonazzola 2016-07-05 08:04:15 UTC
oVirt 4.0.0 has been released, closing current release.