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):
si13.2
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:
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.