You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Sanjeev N (JIRA)" <ji...@apache.org> on 2014/01/06 12:50:52 UTC

[jira] [Closed] (CLOUDSTACK-5542) [Hyper-v] Failed to create password enabled template from stopped VM's root disk

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanjeev N closed CLOUDSTACK-5542.
---------------------------------


Verified with the latest build from 4.3branch with commit:
6f309b8a87d3376950a60234d399c6e3749ad1c7
Works fine.

> [Hyper-v] Failed to create password enabled template from stopped VM's root disk
> --------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5542
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5542
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Hypervisor Controller, Management Server, Template
>    Affects Versions: 4.3.0
>         Environment: Latest build from 4.3
> Storage: cifs for both primary and secondary storage
>            Reporter: Sanjeev N
>            Assignee: Devdeep Singh
>            Priority: Critical
>              Labels: hyper-V,
>             Fix For: 4.3.0
>
>         Attachments: management-server.rar
>
>
> [Hyper-v] Failed to create password enabled template from stopped VM's root disk
> Steps to Reproduce:
> =================
> 1.Bring up cs in advanced zone using Hyper-V cluster and use CIFS for both primary and secondary storage
> 2.Deploy a vm using centos 6.4 template
> 3.Copy password reset script to this from by using following instructions:
> Download the script file cloud-set-guest-password:
> Linux: http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in
> Copy this file to /etc/init.d.
> On some Linux distributions, copy the file to /etc/rc.d/init.d.
> chkconfig --add cloud-set-guest-password
> 4.Stop this vm and try to take the template from the root disk.
> 5.During template creation enable "Password Enabled" check box
> Expected Result:
> =============
> Template creation should be successful
> Actual Result:
> ============
> Password Enabled template creation failed with the following error:
> "Failed to create templateData store combination not supported"
> Observations:
> ============
> Sequence of events from the MS log file during template creation:
> 2013-12-18 20:12:37,850 DEBUG [c.c.a.ApiServlet] (catalina-exec-10:ctx-3141fc8e) ===START===  10.146.0.134 -- GET  command=createTemplate&response=json&sessionkey=GMrpViofu44xb8%2Fi5WtTvtldnjQ%3D&volumeId=c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec&name=pswdEnbled&displayText=pswdEnbled&osTypeId=f0cc4118-6643-11e3-8d08-6c09e76d6dda&isPublic=true&passwordEnabled=true&isdynamicallyscalable=false&isfeatured=true&_=1387377744263
> 2013-12-18 20:12:37,948 DEBUG [c.c.t.TemplateManagerImpl] (catalina-exec-10:ctx-3141fc8e ctx-8cbafdbd) This template is getting created from other template, setting source template Id to: 204
> 2013-12-18 20:12:38,490 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (catalina-exec-10:ctx-3141fc8e ctx-8cbafdbd) submit async job-141, details: AsyncJobVO {id:141, userId: 2, accountId: 2, instanceType: Template, instanceId: 207, cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, cmdInfo: {"sessionkey":"GMrpViofu44xb8/i5WtTvtldnjQ\u003d","cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","volumeId":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","httpmethod":"GET","isPublic":"true","osTypeId":"f0cc4118-6643-11e3-8d08-6c09e76d6dda","isfeatured":"true","response":"json","isdynamicallyscalable":"false","id":"207","displayText":"pswdEnbled","passwordEnabled":"true","name":"pswdEnbled","_":"1387377744263","ctxAccountId":"2","ctxStartEventId":"567"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 132129494109518, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-12-18 20:12:38,490 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (Job-Executor-24:ctx-56a4dec8) Add job-141 into job monitoring
> 2013-12-18 20:12:38,490 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Job-Executor-24:ctx-56a4dec8) Executing AsyncJobVO {id:141, userId: 2, accountId: 2, instanceType: Template, instanceId: 207, cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, cmdInfo: {"sessionkey":"GMrpViofu44xb8/i5WtTvtldnjQ\u003d","cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","volumeId":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","httpmethod":"GET","isPublic":"true","osTypeId":"f0cc4118-6643-11e3-8d08-6c09e76d6dda","isfeatured":"true","response":"json","isdynamicallyscalable":"false","id":"207","displayText":"pswdEnbled","passwordEnabled":"true","name":"pswdEnbled","_":"1387377744263","ctxAccountId":"2","ctxStartEventId":"567"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 132129494109518, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-12-18 20:12:38,490 DEBUG [c.c.a.ApiServlet] (catalina-exec-10:ctx-3141fc8e ctx-8cbafdbd) ===END===  10.146.0.134 -- GET  command=createTemplate&response=json&sessionkey=GMrpViofu44xb8%2Fi5WtTvtldnjQ%3D&volumeId=c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec&name=pswdEnbled&displayText=pswdEnbled&osTypeId=f0cc4118-6643-11e3-8d08-6c09e76d6dda&isPublic=true&passwordEnabled=true&isdynamicallyscalable=false&isfeatured=true&_=1387377744263
> 2013-12-18 20:12:38,624 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) template 207 is already in store:7, type:Image
> 2013-12-18 20:12:38,684 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) copyAsync inspecting src type VOLUME copyAsync inspecting dest type TEMPLATE
> 2013-12-18 20:12:38,691 DEBUG [c.c.a.t.Request] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) Seq 1-297208087: Sending  { Cmd , MgmtId: 132129494109518, via: 1(10.147.40.14), Ver: v1, Flags: 100011, [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"68a64c22-f6c7-3693-a363-b67e26219b38","id":10,"poolType":"NetworkFilesystem","host":"10.147.40.13","path":"/hyperv/primary?user=sanjeev&password=Password_123&domain=BLR","port":445,"url":"NetworkFilesystem://10.147.40.13//hyperv/primary?user=sanjeev&password=Password_123&domain=BLR/?ROLE=Primary&STOREUUID=68a64c22-f6c7-3693-a363-b67e26219b38"}},"name":"ROOT-57","size":5368709120,"volumeId":59,"vmName":"i-2-57-VM","accountId":2,"id":59,"deviceId":0,"hypervisorType":"Hyperv"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user=sanjeev&password=Password_123&domain=BLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"executeInSequence":false,"wait":10800}}] }
> 2013-12-18 20:12:38,691 DEBUG [c.c.a.t.Request] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) Seq 1-297208087: Executing:  { Cmd , MgmtId: 132129494109518, via: 1(10.147.40.14), Ver: v1, Flags: 100011, [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"68a64c22-f6c7-3693-a363-b67e26219b38","id":10,"poolType":"NetworkFilesystem","host":"10.147.40.13","path":"/hyperv/primary?user=sanjeev&password=Password_123&domain=BLR","port":445,"url":"NetworkFilesystem://10.147.40.13//hyperv/primary?user=sanjeev&password=Password_123&domain=BLR/?ROLE=Primary&STOREUUID=68a64c22-f6c7-3693-a363-b67e26219b38"}},"name":"ROOT-57","size":5368709120,"volumeId":59,"vmName":"i-2-57-VM","accountId":2,"id":59,"deviceId":0,"hypervisorType":"Hyperv"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user=sanjeev&password=Password_123&domain=BLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"executeInSequence":false,"wait":10800}}] }
> 2013-12-18 20:12:38,691 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-184:ctx-29dec4bb) Seq 1-297208087: Executing request
> 2013-12-18 20:12:38,692 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-184:ctx-29dec4bb) POST request tohttp://10.147.40.14:8250/api/HypervResource/org.apache.cloudstack.storage.command.CopyCommand with contents{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"68a64c22-f6c7-3693-a363-b67e26219b38","id":10,"poolType":"NetworkFilesystem","host":"10.147.40.13","path":"/hyperv/primary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR","port":445,"url":"NetworkFilesystem://10.147.40.13//hyperv/primary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR/?ROLE\u003dPrimary\u0026STOREUUID\u003d68a64c22-f6c7-3693-a363-b67e26219b38"}},"name":"ROOT-57","size":5368709120,"volumeId":59,"vmName":"i-2-57-VM","accountId":2,"id":59,"deviceId":0,"hypervisorType":"Hyperv"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"executeInSequence":false,"contextMap":{},"wait":10800}
> 2013-12-18 20:12:38,692 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-184:ctx-29dec4bb) Sending cmd to http://10.147.40.14:8250/api/HypervResource/org.apache.cloudstack.storage.command.CopyCommand cmd data:{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"c9666b74-d5f9-4e77-9b84-8f7eb9ef21ec","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"68a64c22-f6c7-3693-a363-b67e26219b38","id":10,"poolType":"NetworkFilesystem","host":"10.147.40.13","path":"/hyperv/primary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR","port":445,"url":"NetworkFilesystem://10.147.40.13//hyperv/primary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR/?ROLE\u003dPrimary\u0026STOREUUID\u003d68a64c22-f6c7-3693-a363-b67e26219b38"}},"name":"ROOT-57","size":5368709120,"volumeId":59,"vmName":"i-2-57-VM","accountId":2,"id":59,"deviceId":0,"hypervisorType":"Hyperv"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"executeInSequence":false,"contextMap":{},"wait":10800}
> 2013-12-18 20:12:38,696 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-184:ctx-29dec4bb) POST response is[{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"result":false,"details":"Data store combination not supported","newData":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user=sanjeev&password=Password_123&domain=BLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"contextMap":{}}}]
> 2013-12-18 20:12:38,697 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-184:ctx-29dec4bb) executeRequest received response [{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"newData":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user\u003dsanjeev\u0026password\u003dPassword_123\u0026domain\u003dBLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"result":false,"details":"Data store combination not supported","contextMap":{},"wait":0}}]
> 2013-12-18 20:12:38,697 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-184:ctx-29dec4bb) Seq 1-297208087: Response Received:
> 2013-12-18 20:12:38,697 DEBUG [c.c.a.t.Request] (DirectAgent-184:ctx-29dec4bb) Seq 1-297208087: Processing:  { Ans: , MgmtId: 132129494109518, via: 1, Ver: v1, Flags: 10, [{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"newData":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/207","uuid":"6016f790-eaed-4024-81df-dc8eef4a3287","id":207,"format":"RAW","accountId":2,"hvm":true,"displayText":"pswdEnbled","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"cifs://10.147.40.13/hyperv/secondary?user=sanjeev&password=Password_123&domain=BLR","_role":"Image"}},"name":"209a5f148-9a20-3ccf-951e-de957f1704df","hypervisorType":"Hyperv"}},"result":false,"details":"Data store combination not supported","wait":0}}] }
> 2013-12-18 20:12:38,697 DEBUG [c.c.a.t.Request] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) Seq 1-297208087: Received:  { Ans: , MgmtId: 132129494109518, via: 1, Ver: v1, Flags: 10, { CopyCmdAnswer } }
> 2013-12-18 20:12:38,748 DEBUG [c.c.t.TemplateManagerImpl] (Job-Executor-24:ctx-56a4dec8 ctx-8cbafdbd) Failed to create templateData store combination not supported
> 2013-12-18 20:12:38,882 ERROR [c.c.a.ApiAsyncJobDispatcher] (Job-Executor-24:ctx-56a4dec8) Unexpected exception while executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
> com.cloud.utils.exception.CloudRuntimeException: Failed to create templateData store combination not supported
>         at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1397)
>         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 com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:50)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
>         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 $Proxy159.createPrivateTemplate(Unknown Source)
>         at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:265)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161)
>         at com.cloud.api.ApiAsyncJobDispatcher.runJobInContext(ApiAsyncJobDispatcher.java:109)
>         at com.cloud.api.ApiAsyncJobDispatcher$1.run(ApiAsyncJobDispatcher.java:66)
>         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.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:63)
>         at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:520)
>         at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
>         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 org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
>         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-12-18 20:12:38,883 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Job-Executor-24:ctx-56a4dec8) Complete async job-141, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Failed to create templateData store combination not supported"}
> 2013-12-18 20:12:38,940 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Job-Executor-24:ctx-56a4dec8) Done executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-141
> 2013-12-18 20:12:38,965 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (Job-Executor-24:ctx-56a4dec8) Remove job-141 from job monitoring
> Attaching management server log file.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)