Bug 809887 - [ovirt] [engine-core] NPE on run vm command after Import: mac address value returns null
[ovirt] [engine-core] NPE on run vm command after Import: mac address value r...
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
unspecified
Unspecified Unspecified
high Severity urgent
: ---
: ---
Assigned To: Moti Asayag
Martin Pavlik
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-04 10:59 EDT by Haim
Modified: 2015-04-06 23:08 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-17 02:48:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Haim 2012-04-04 10:59:46 EDT
Description of problem:

- import vm from export domain
- start vm : null pointer exception

2012-04-04 16:34:09,526 ERROR [org.ovirt.engine.core.bll.AddVmInterfaceCommand] (http--0.0.0.0-8080-4) [744d51a9] Error during CanDoActionFailure.: java.lang.NullPointerException
	at java.lang.String.compareTo(String.java:1176) [:1.6.0_22]
	at org.ovirt.engine.core.common.businessentities.InterfaceComparerByMAC.compare(InterfaceComparerByMAC.java:10) [engine-common.jar:]
	at org.ovirt.engine.core.common.businessentities.InterfaceComparerByMAC.compare(InterfaceComparerByMAC.java:5) [engine-common.jar:]
	at java.util.Arrays.mergeSort(Arrays.java:1283) [:1.6.0_22]
	at java.util.Arrays.sort(Arrays.java:1223) [:1.6.0_22]
	at java.util.Collections.sort(Collections.java:176) [:1.6.0_22]
	at org.ovirt.engine.core.dao.VmNetworkInterfaceDAODbFacadeImpl.getAllForVm(VmNetworkInterfaceDAODbFacadeImpl.java:82) [engine-dal.jar:]
	at org.ovirt.engine.core.dao.VmNetworkInterfaceDAODbFacadeImpl.getAllForVm(VmNetworkInterfaceDAODbFacadeImpl.java:47) [engine-dal.jar:]
	at org.ovirt.engine.core.bll.AddVmInterfaceCommand.canDoAction(AddVmInterfaceCommand.java:92) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.InternalCanDoAction(CommandBase.java:475) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:250) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:327) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:287) [engine-bll.jar:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_22]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_22]
	at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_22]
	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final.jar:]
	at org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor.injectWebContextToThreadLocal(ThreadLocalSessionCleanerInterceptor.java:11) [engine-utils.jar:]
	at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) [:1.6.0_22]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_22]
	at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_22]
	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:123) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:221) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:367) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:205) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:55) [jboss-as-ejb3-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:]
	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.0.Beta1b.jar:]
	at org.ovirt.engine.core.common.interfaces.BackendLocal$$$view10.RunAction(Unknown Source) [engine-common.jar:]
	at org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.RunAction(GenericApiGWTServiceImpl.java:120)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_22]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_22]
	at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_22]
	at com.google.gwt.rpc.server.RPC.invokeAndStreamResponse(RPC.java:196)
	at com.google.gwt.rpc.server.RpcServlet.processCall(RpcServlet.java:161)
	at com.google.gwt.rpc.server.RpcServlet.processPost(RpcServlet.java:222)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
	at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]

please note the ovf seem correct, also, mac_address seem to be null on vm_interfaces table.
Comment 1 mkublin 2012-04-08 03:40:05 EDT
Haim, talked with me about those bug, the problem is that at OvfVmReader.ReadHardwareSection we have a section of code that processing VmNetworkInterface, and also at OvfReader we have buildNicReference, hope that these will help
Comment 2 Moti Asayag 2012-04-08 11:40:21 EDT
http://gerrit.ovirt.org/#change,3377

Verified VM import, VM Template Import of 3.1 DC:
VM/Templates were exported and imported, and a VM was successfully run.
Comment 3 Martin Pavlik 2012-05-09 09:52:57 EDT
Verified to be working with 

oVirt Enterprise Virtualization Engine Manager Version: 3.1.0_0001-9.el6ev 


VM can be imported and launched, MAC address is imported properly

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