Bug 847652 - NPE when deleting a template from export domain
NPE when deleting a template from export domain
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: 3.1.0
Assigned To: Gilad Chaplik
Dafna Ron
Depends On:
  Show dependency treegraph
Reported: 2012-08-13 04:49 EDT by Asaf Shakarchi
Modified: 2016-02-10 14:56 EST (History)
14 users (show)

See Also:
Fixed In Version: SI17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Asaf Shakarchi 2012-08-13 04:49:03 EDT
Description of problem:
A NPE occurs when trying to delete a template from export domain.
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
Caused by: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.RemoveVmTemplateCommand.<init>(RemoveVmTemplateCommand.java:42) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.RemoveVmTemplateFromImportExportCommand.<init>(RemoveVmTemplateFromImportExportCommand.java:42) [engine-bll.jar:]
	... 58 more

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

How reproducible:
Delete a template from export domain.

Steps to Reproduce:
1. Export a template
2. Delete the exported template from Storage tab->'Template Import' sub tab
Actual results:
NPE in backend log while task execution repeats over and over again.

Expected results:
A clean delete of the template.

Additional info:
Comment 1 Ayal Baron 2012-08-15 04:55:57 EDT
Asaf, does this *always* happen?
Do you know what the issue is?
Comment 2 Allon Mureinik 2012-08-27 05:52:46 EDT
Seems like this was introduced in I62ab5130 with the line "setStoragePoolId(getVmTemplate().getstorage_pool_id())" in RemoveVmTemplateCommand's ctor.

extracting this to a lazy getter or an init method should do the trick.
Comment 3 Gilad Chaplik 2012-08-27 10:36:40 EDT
A simple Null check will do the trick.
Comment 4 Gilad Chaplik 2012-08-28 03:32:16 EDT
pushed to gerrit (http://gerrit.ovirt.org/#/c/7523/)
Comment 9 Dafna Ron 2012-09-05 08:14:45 EDT
verified on si17

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