Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1082764

Summary: Failed to import an image as a template from ovirt-glance repository
Product: [Retired] oVirt Reporter: Moti Asayag <masayag>
Component: ovirt-engine-coreAssignee: Oved Ourfali <oourfali>
Status: CLOSED WORKSFORME QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5CC: acathrow, amureini, dfediuck, fdeutsch, gklein, iheim, masayag, oourfali, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 20:20:58 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 Moti Asayag 2014-03-31 18:59:23 UTC
Description of problem:
Import of Centos-6.5 image as a template from the ovirt-glance repository into local storage domain fails with NPE when adding a template based on that image.

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


How reproducible:
2/2 (centos-6.5 image > 1Gb)

Steps to Reproduce:
1. Import image from ovirt-glance repository as a template

Actual results:
NPE, action fails and disk locked.

Expected results:
A template created successfully.

Additional info:
2014-03-31 21:12:54,243 ERROR [org.ovirt.engine.core.bll.AddVmTemplateCommand] (org.ovirt.thread.pool-6-thread-22) [5f314427] Command org.ovirt.engine.core.bll.AddVmTemplateCommand throw exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.AddVmTemplateCommand.addPermission(AddVmTemplateCommand.java:694) [bll.jar:]
        at org.ovirt.engine.core.bll.AddVmTemplateCommand.access$000(AddVmTemplateCommand.java:75) [bll.jar:]
        at org.ovirt.engine.core.bll.AddVmTemplateCommand$2.runInTransaction(AddVmTemplateCommand.java:249) [bll.jar:]
        at org.ovirt.engine.core.bll.AddVmTemplateCommand$2.runInTransaction(AddVmTemplateCommand.java:245) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:210) [utils.jar:]
        at org.ovirt.engine.core.bll.AddVmTemplateCommand.executeCommand(AddVmTemplateCommand.java:245) [bll.jar:]

Comment 1 Oved Ourfali 2014-03-31 19:15:43 UTC
This issue was fixed in http://gerrit.ovirt.org/#/c/25715/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCommand.java

Does it reproduce if you're rebased on a commit after this one?

Comment 2 Moti Asayag 2014-03-31 19:15:43 UTC
Created attachment 881045 [details]
engine.log

Comment 3 Moti Asayag 2014-03-31 20:20:58 UTC
Works fine with the suggested patch.