Bug 1419470

Summary: Failed to register template
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Allon Mureinik <amureini>
Status: CLOSED DUPLICATE QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, tnisan
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-06 09:41:30 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:
Bug Depends On:    
Bug Blocks: 1393257    

Description Eyal Shenitzky 2017-02-06 09:38:05 UTC
Description of problem:

Unregistered template failed to register.

Received java.lang.NullPointerException when sending:

POST /api/storagedomains/xxxxxxx-xxxx-xxxx-xxxxxx/templates/xxxxxxx-xxxx-xxxx-xxxxxx/register HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action>
    <cluster id='bf5a9e9e-5b52-4b0d-aeba-4ee4493f1072'></cluster>
    <allow_partial_import>true</allow_partial_import>
</action> 

After speaking to Maor seems related to - 
https://gerrit.ovirt.org/#/c/69772/
"Once an unregistered template is being registered the updateMaxMemorySize will try to call getOsId on vmBase which is null"

Version-Release number of selected component (if applicable):
Engine - 4.1.0.4-0.1.el7
VDSM - 4.19.4-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create a VM with one disk on storage domain A 
2.Make a template from the VM created in 1.
3.Detach domain A
4.Remove the domain that detached in 3 from the data center without formatting   it.
6.Import the storage domain from 4 to the data center and activate it.
7. Register the template using the command above

Actual results:
Received java.lang.NullPointerException

Expected results:
Template should register to the data center

Additional info:

Comment 1 Tal Nisan 2017-02-06 09:41:30 UTC

*** This bug has been marked as a duplicate of bug 1419364 ***