Bug 1085712

Summary: [engine-backend] [external-provider] NullPointerException for AddVmTemplate during importing an image from glance as a template
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Oved Ourfali <oourfali>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acathrow, gklein, iheim, lpeer, oourfali, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.4.0-14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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
Logs from engine and host + screenshot none

Description Elad 2014-04-09 07:59:13 UTC
Created attachment 884414 [details]
Logs from engine and host + screenshot

Description of problem:
I tried to import several images in parallel from a glance repository. 3 of those import operations failed with a NullPointerException.

Version-Release number of selected component (if applicable):
AV5
rhevm-3.4.0-0.12.beta2.el6ev.noarch
vdsm-4.14.2-0.2.el6ev.x86_64

How reproducible:
Not always

Steps to Reproduce:
On a RHEV-3.4 setup which has a glance repository integrated by default (called 'ovirt-imgae-repository') 
1. Import 6 images from the repository in parallel (mark all the images and click on 'import'). Import the images as templates (check the 'Import as template' check-box


Actual results:
3 of the import operations failed with a NullPointerException:

2014-04-08 19:46:52,139 INFO  [org.ovirt.engine.core.bll.AddVmTemplateCommand] (org.ovirt.thread.pool-4-thread-17) [3bfebf7] Running command: AddVmTemplateCommand internal: true. Entities affected :  ID: 009d5dc0-517f-4c87-a300-f10a6c1e1871 Type: StoragePool
2014-04-08 19:46:52,152 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (org.ovirt.thread.pool-4-thread-17) [3bfebf7] transaction rolled back
2014-04-08 19:46:52,153 ERROR [org.ovirt.engine.core.bll.AddVmTemplateCommand] (org.ovirt.thread.pool-4-thread-17) [3bfebf7] Command org.ovirt.engine.core.bll.AddVmTemplateCommand throw exception: java.lang.NullPointerException


Expected results:
Import from glance should succeed

Additional info:
Logs from engine and host + screenshot

Comment 1 Elad 2014-04-09 09:09:10 UTC
After the failure, the images remain LOCKED, as reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=1074311

Comment 2 Elad 2014-05-01 07:03:49 UTC
Tried to import the same images from ovirt-glance in parallel, it succeeded.

Verified using AV7

Comment 3 Itamar Heim 2014-06-12 14:11:42 UTC
Closing as part of 3.4.0