[
https://issues.apache.org/jira/browse/CLOUDSTACK-5875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13879500#comment-13879500
]
Santhosh Kumar Edukulla edited comment on CLOUDSTACK-5875 at 1/23/14 10:00 AM:
-------------------------------------------------------------------------------
1. The crash issue happens because of null value for CallContext.current()
under discoverHostsFull, when called from thread for SystemVMHandler.
Currently, there is no call context set for this thread. Currently, as part of
MockAgentManagerImpl.java, SystemVMHandler implements Runnable, but when it
calls discoverHosts, it does not have any call context set and it is crashing.
Because of which agent was not coming up and template sync and resource
discovery failed. Added a register and unregister of callcontext of system user
for this thread.
2. There was a new column added by name "state" under "vm_templates" table. The
value of this column for "Active" was checked for listing the templates if
there was no removed attribute set for list templates api. This column was not
present in 4.2. Added a column value "Active" for simulator schema. The value
of this column was not Active and so listing failed.
Testing:
1. Built the CS using the changes. Tested the column value, post deploydb and
it was now set to "Active". Deployed a DC and list template works.
2. Deploy DC worked fine with simulator . Created an instance using the
template and it worked to start. Agent for systemvm was coming up.
Note:
1. For listing templates, a hypervisor in the zone need to be present because
listtemplates api is looking for it. Use the list templates post the deployDC
and it works.
2. We need to set router.version.check to false under global properties of CS
post run using simulator. Otherwise you may see errors related to router
upgrade etc. This i believe is a known issue and nothing to do with simulator.
3. Post the changes, tested only with simulator.
3. Also, please change the component field. AS such it is not related to
Marvin.
was (Author: santhoshe):
1. The crash issue happens because of null value for CallContext.current()
under discoverHostsFull, when called from thread for SystemVMHandler.
Currently, there is no call context set for this thread. Currently, as part of
MockAgentManagerImpl.java, SystemVMHandler implements Runnable, but when it
calls discoverHosts, it does not have any call context set and it is crashing.
Because of which agent was not coming up and template sync and resource
discovery failed. Added a register and unregister of callcontext of system user
for this thread.
2. There was a new column added by name "state" under "vm_templates" table. The
value of this column for "Active" was checked for listing the templates if
there was no removed attribute set for list templates api. This column was not
present in 4.2. Added a column value "Active" for simulator schema. The value
of this column was not Active and so listing failed.
Testing:
1. Built the CS using the changes. Tested the column value, post deploydb and
it was now set to "Active". Deployed a DC and list template works.
2. Deploy DC worked fine with simulator . Created an instance using the
template and it worked to start. Agent for systemvm was coming up.
Note:
1. For listing templates, a hypervisor in the zone need to be present because
listtemplates api is looking for it. Use the list templates post the deployDC
and it works.
2. We need to set router.version.check to false under global properties of CS
post run using simulator. Otherwise you may see errors related to router
upgrade etc. This i believe is a known issue and nothing to do with simulator.
3. Post the changes, tested only with simulator.
3. Please change the component field. AS such it is not related to Marvin.
> No templates in simulator run
> -----------------------------
>
> Key: CLOUDSTACK-5875
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5875
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: marvin
> Affects Versions: 4.2.1, 4.3.0
> Reporter: sebastien goasguen
> Assignee: Santhosh Kumar Edukulla
>
> 1. When running the simulator and configuring a zone with marvin, there is no
> template available hence trying to start instances won't work.
> See https://reviews.apache.org/r/16856/ for additional related discussions
> 2. Exception Issue seen when running with simulator:at
> com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:595)
> at
> com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:582)
> 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:616)
> 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 sun.proxy.$Proxy158.discoverHosts(Unknown Source)
> at
> com.cloud.agent.manager.MockAgentManagerImpl$SystemVMHandler.run(MockAgentManagerImpl.java:363)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:679)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)