Bug 1122998

Summary: [ImportDomain] Register a registered vm throws NullPointerException
Product: [Retired] oVirt Reporter: Ori Gofen <ogofen>
Component: ovirt-engine-coreAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5CC: acanan, amureini, bugs, ecohen, gklein, iheim, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:42:25 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:
Bug Depends On:    
Bug Blocks: 716511    
Attachments:
Description Flags
vdsm+engine logs none

Description Ori Gofen 2014-07-24 14:47:02 UTC
Created attachment 920566 [details]
vdsm+engine logs

Description of problem:
Engine throws NullPointerException when attempting vm.register(action=params.Action(cluster=params.Cluster(name='Default'))
on a registered vm.

2014-07-24 16:45:51,270 ERROR [org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand] (ajp--127.0.0.1-8702-6) [7f59c7f6] Error during CanDoActionFailure.: java.lang.NullPointerException and a long traceback

Version-Release number of selected component (if applicable):
oVirt beta.1

How reproducible:
100%

Steps to Reproduce:
1.register a registered vm

Actual results:
engine throws NullPointerException

Expected results:
this operation should be disabled by CanDoAction and not throw any exceptions 

Additional info:

Comment 1 Maor 2014-09-15 16:05:50 UTC
I tried to reproduce this from the GUI and from the REST, it result a CDA message every time:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <cluster id="5231b101-2039-44ff-a4b2-462caa281375"/>
    <status>
        <state>failed</state>
    </status>
    <fault>
        <reason>Operation Failed</reason>
        <detail>[Import VM failed - VM Id already exist in the system. Please remove the VM (DFDFD) from the system first]</detail>
    </fault>
</action>

Comment 2 Allon Mureinik 2014-09-15 16:10:21 UTC
(In reply to Maor from comment #1)
> I tried to reproduce this from the GUI and from the REST, it result a CDA
> message every time:
> 
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <action>
>     <cluster id="5231b101-2039-44ff-a4b2-462caa281375"/>
>     <status>
>         <state>failed</state>
>     </status>
>     <fault>
>         <reason>Operation Failed</reason>
>         <detail>[Import VM failed - VM Id already exist in the system.
> Please remove the VM (DFDFD) from the system first]</detail>
>     </fault>
> </action>

Returning to QA to verify in RC2.
If you're able to reproduce this, please provide new steps to reproduce.

Comment 3 Ori Gofen 2014-09-30 16:14:58 UTC
verified on vt4

Comment 4 Sandro Bonazzola 2014-10-17 12:42:25 UTC
oVirt 3.5 has been released and should include the fix for this issue.