Bug 1124879 - Try to import a VM from configuration through REST will cause NPE
Summary: Try to import a VM from configuration through REST will cause NPE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Maor
QA Contact: Carlos Mestre González
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 14:26 UTC by Maor
Modified: 2016-02-10 19:43 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.5.0_rc1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:33:54 UTC
oVirt Team: Storage


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 30827 master MERGED core: Set images with Storage Pool for images already on target. Never
oVirt gerrit 30870 ovirt-engine-3.5 MERGED core: Set images with Storage Pool for images already on target. Never

Description Maor 2014-07-30 14:26:15 UTC
Description of problem:
Trying to import a VM from configuration using REST command,
will cause NPE since the user does not initialize storage domain.

2:54:01,821 INFO  [org.ovirt.engine.core.bll.OvfDataUpdater] (DefaultQuartzScheduler_Worker-84) [2fb91bfb] Attempting to update VMs/Templates Ovf.
2014-07-30 12:54:01,823 INFO  [org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand] (http--0.0.0.0-8700-3) [67814774] Lock Acquired to object EngineLoc
k [exclusiveLocks= key: new value: VM_NAME
, sharedLocks= key: 923a6668-5a44-453c-877c-62b66a10dc78 value: REMOTE_VM
]
2014-07-30 12:54:01,842 ERROR [org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand] (http--0.0.0.0-8700-3) [67814774] Error during CanDoActionFailure.:
 java.lang.NullPointerException
        at org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.canDoAction(ImportVmFromConfigurationCommand.java:57) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:737) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:339) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:430) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:411) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:369) [bll.jar:]
        at sun.reflect.GeneratedMethodAccessor251.invoke(Unknown Source) [:1.7.0_19]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_19]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_19]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterc
eptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:114) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final
]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:125) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final
]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:135) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.
1.Final]

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


How reproducible:
100%

Steps to Reproduce:
1. Import a VM from configuration 
2. 
3.

Actual results:
VM will not be imported and NPE will be noticed in the logs

Expected results:
VM should be imported

Additional info:

Comment 1 Carlos Mestre González 2014-08-12 09:19:07 UTC
Verified ImportVmFromConfigurationCommand executes and doesn't throw NPE (and imports the VM properly).

version:
ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch
(ovirt RC1)

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


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