[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019941#comment-14019941
 ] 

Marcus Sorensen commented on CLOUDSTACK-6804:
---------------------------------------------

We probably don't want to assume kvm_intel.

In trying to reproduce it, I failed to add the host the first time with the 
error:

2014-06-05 17:53:24,448 INFO  [c.c.r.ResourceManagerImpl] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) Trying to add a new 
host at http://172.17.10.10/ in data center 1
2014-06-05 17:53:24,624 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) Executing cmd: 
lsmod|grep kvm
2014-06-05 17:53:25,648 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) lsmod|grep kvm 
output:kvm_intel              54285  0 
kvm                   332980  1 kvm_intel

2014-06-05 17:53:25,648 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) Ssh executed failed
java.lang.NullPointerException
        at 
com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmdOneShotWithExitCode(SSHCmdHelper.java:159)
        at 
com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmdOneShot(SSHCmdHelper.java:170)
        at com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmd(SSHCmdHelper.java:66)
        at 
com.cloud.hypervisor.kvm.discoverer.LibvirtServerDiscoverer.find(LibvirtServerDiscoverer.java:161)

2014-06-05 17:53:25,655 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) Executing cmd: 
lsmod|grep kvm
2014-06-05 17:53:26,711 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) lsmod|grep kvm 
output:kvm_intel              54285  0 
kvm                   332980  1 kvm_intel

2014-06-05 17:53:26,711 DEBUG [c.c.u.s.SSHCmdHelper] 
(catalina-exec-3:ctx-7fef0285 ctx-e1a18c86 ctx-0211e0bc) Ssh executed failed
java.lang.NullPointerException
        at 
com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmdOneShotWithExitCode(SSHCmdHelper.java:159)
        at 
com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmdOneShot(SSHCmdHelper.java:170)
        at com.cloud.utils.ssh.SSHCmdHelper.sshExecuteCmd(SSHCmdHelper.java:66)


Then I did nothing but try to add host again and it worked. So it seems that 
something during the host add did the work, even though it ultimately failed. 
Then I blew the zone away and rebuilt it without rebooting/rebuilding the host, 
and it worked the first time. I still get this ssh command null pointer though, 
which looks like it may have been introduced in March. 

> [Automation] Add host fails in KVM 
> -----------------------------------
>
>                 Key: CLOUDSTACK-6804
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6804
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: KVM
>    Affects Versions: 4.4.0
>         Environment: RHEL 6.3
>            Reporter: Rayees Namathponnan
>            Assignee: Kishan Kavala
>             Fix For: 4.4.0
>
>
> Add host failing in in KVM with RHEL 6.3
> 2014-05-29 11:09:24,951 INFO  [c.c.r.ResourceManagerImpl] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Trying to add a new 
> host
> at http://10.223.250.194 in data center 1
> 2014-05-29 11:09:25,211 DEBUG [c.c.u.s.SSHCmdHelper] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Executing cmd: 
> lsmod|grep kvm
> 2014-05-29 11:09:26,454 DEBUG [c.c.u.s.SSHCmdHelper] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Executing cmd: 
> lsmod|grep kvm
> 2014-05-29 11:09:27,512 DEBUG [c.c.u.s.SSHCmdHelper] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Executing cmd: 
> lsmod|grep kvm
> 2014-05-29 11:09:28,568 DEBUG [c.c.h.k.d.LibvirtServerDiscoverer] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) It's not a KVM 
> enabled machine
> 2014-05-29 11:09:28,571 WARN  [c.c.r.ResourceManagerImpl] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Unable to find the 
> server resources at http://10.223.250.194
> 2014-05-29 11:09:28,574 INFO  [c.c.u.e.CSExceptionErrorCode] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Could not find 
> exception: com.cloud.exception.DiscoveryException in error code list for 
> exceptions
> 2014-05-29 11:09:28,574 WARN  [o.a.c.a.c.a.h.AddHostCmd] 
> (catalina-exec-24:ctx-5e2c748e ctx-937164b5 ctx-8e5deda3) Exception:
> com.cloud.exception.DiscoveryException: Unable to add the host
>         at 
> com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:791)
>         at 
> com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:586)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy146.discoverHosts(Unknown Source)
>         at 
> org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
>         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:683)
>         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506)
>         at 
> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330)
>         at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54)
>         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:115)
>         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>         at 
> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
>         at 
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
>         at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2274)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> You need to enabled KVM from host before adding host 
> modprobe kvm
> modprobe kvm_intel



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to