You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Koushik Das (JIRA)" <ji...@apache.org> on 2013/07/23 07:18:48 UTC

[jira] [Commented] (CLOUDSTACK-3639) Unable to create template from snapshot when there are multiple primary storages in a cluster

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

Koushik Das commented on CLOUDSTACK-3639:
-----------------------------------------

The title of the bug is not correct. It says "multiple primary stores in a cluster" instead it should be "multiple secondary stores in a zone" based on the logs mentioned.

Currently template creation works only when there is a single image/secondary store in the zone. In case of multiple secondary stores the code bails out with the exception mentioned in the log snippet. I don't see any reason to fail the operation when there are multiple seconadary stores but there needs to be a way to select one based on some strategy (similar to what we have in deployment planners). Also it would be good to check with the original developer to see if there are any possible issues due to which this case is not handled.

Anyways this is not be a blocker. By creating a single secondar store the operations can be carried out.
                
> Unable to create template from snapshot when there are multiple primary storages in a cluster
> ---------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3639
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3639
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Template
>    Affects Versions: 4.2.0
>         Environment: xenserver 6.1
>            Reporter: Srikanteswararao Talluri
>            Assignee: Koushik Das
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> Steps to reproduce:
> ++++++++++++++
> 1. Create a VM 
> 2. take snapshot of root volume
> 3. create  a template from snapshot.
> NOTE: this setup has two primary storages added to the cluster.
> l) ===START===  10.101.255.52 -- GET  command=createTemplate&response=json&sessionkey=l4Io3dkSjc7blA5U4njguuKet4o%3D&snapshotid=9de1feac-674f-448c-b5dc-c7c1f71518b1&name=t&displayText=t&osTypeId=04f6d480-ef7c-11e2-b754-06e1a6000030&isPublic=true&passwordEnabled=false&_=1374149451381
> 2013-07-18 23:06:05,883 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-3:null) submit async job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ], details: AsyncJobVO {id:1141, userId: 2, accountId: 2, sessionKey: null, instanceType: Template, instanceId: 215, cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, cmdOriginator: null, cmdInfo: {"sessionkey":"l4Io3dkSjc7blA5U4njguuKet4o\u003d","cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","httpmethod":"GET","isPublic":"true","osTypeId":"04f6d480-ef7c-11e2-b754-06e1a6000030","response":"json","id":"215","displayText":"t","snapshotid":"9de1feac-674f-448c-b5dc-c7c1f71518b1","passwordEnabled":"false","name":"t","_":"1374149451381","ctxAccountId":"2","ctxStartEventId":"5011"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 7566222426160, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-07-18 23:06:05,886 DEBUG [cloud.api.ApiServlet] (catalina-exec-3:null) ===END===  10.101.255.52 -- GET  command=createTemplate&response=json&sessionkey=l4Io3dkSjc7blA5U4njguuKet4o%3D&snapshotid=9de1feac-674f-448c-b5dc-c7c1f71518b1&name=t&displayText=t&osTypeId=04f6d480-ef7c-11e2-b754-06e1a6000030&isPublic=true&passwordEnabled=false&_=1374149451381
> 2013-07-18 23:06:05,931 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-115:job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ]) Executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ]
> 2013-07-18 23:06:06,126 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-115:job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
> com.cloud.utils.exception.CloudRuntimeException: muliple image data store, don't know which one to use
> 	at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1353)
> 	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> 	at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:256)
> 	at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
> 	at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:679)
> 2013-07-18 23:06:06,130 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-115:job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ]) Complete async job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: muliple image data store, don't know which one to use
> 2013-07-18 23:06:08,925 DEBUG [cloud.api.ApiServlet] (catalina-exec-13:null) ===START===  10.101.255.52 -- GET  command=queryAsyncJobResult&jobId=dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6&response=json&sessionkey=l4Io3dkSjc7blA5U4njguuKet4o%3D&_=1374149456068
> 2013-07-18 23:06:08,946 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-13:null) Async job-1141 = [ dff0b4af-a380-4e2a-a3ba-1c9be12e5ed6 ] completed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira