[ https://issues.apache.org/jira/browse/CLOUDSTACK-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Abhinav Roy closed CLOUDSTACK-5560. ----------------------------------- Closing the issue after fix validation > [Hyper-V] Re-attach Data disk is failing > ---------------------------------------- > > Key: CLOUDSTACK-5560 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5560 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Hypervisor Controller, Management Server, Storage > Controller > Affects Versions: 4.3.0 > Environment: 4.3, Hyper-V > Reporter: Abhinav Roy > Assignee: Devdeep Singh > Priority: Critical > Labels: hyper-V,, hyper-v, hyperv > Fix For: 4.3.0 > > > Steps : > ==================== > 1. Create an advanced zone setup with hyper-v as the host hypervisor type and > local storage for primary storage > 2. Deploy a VM ex. VM1 > 3. Create some volumes v1, v2 ,v3 > 4. Attach v1 to VM1 . > 5 Detach v1 from VM1 > 6. Attach v1 or v2 or v3 to VM1 > Expected behaviour : > ============================= > Attach , Detach and re-attach should be working fine. > Observed behaviour: > ============================ > Attach and Detach is working fine but re-attach is failing with : > 2013-12-19 12:15:21,874 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-304:ctx-ba54a897) executeRequest received response > [{"org.apache.cloudstack.storage.command.AttachAnswer":{"disk":{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"5916489b-d8c3-433d-8439-04b10925d0c1","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ce50406b-9038-37ba-9b72-6228d5eb0858","id":1,"poolType":"NetworkFilesystem","host":"10.102.192.19","path":"/HYPERV-SMB/abhinav-hyperv-ps1?user\u003dabhinav\u0026password\u003dfreebsd@123\u0026domain\u003dBLR","port":445,"url":"NetworkFilesystem://10.102.192.19//HYPERV-SMB/abhinav-hyperv-ps1?user\u003dabhinav\u0026password\u003dfreebsd@123\u0026domain\u003dBLR/?ROLE\u003dPrimary\u0026STOREUUID\u003dce50406b-9038-37ba-9b72-6228d5eb0858"}},"name":"vol2","size":5368709120,"volumeId":11,"accountId":2,"id":11,"hypervisorType":"Hyperv"}},"diskSeq":1,"type":"DATADISK","_details":{"managed":"false","storagePort":"445","storageHost":"10.102.192.19","volumeSize":"5368709120"}},"result":false,"details":"org.apache.cloudstack.storage.command.AttachCommand > failed due to Hyper-V Job failed, Error Code:32775, Description: > \u0027i-2-8-VM\u0027 failed to add device \u0027Synthetic Disk Drive\u0027. > (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E)\n\n\u0027i-2-8-VM\u0027: Cannot attach > storage media to the controller because the specified location is in use. > (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E)","contextMap":{},"wait":0}}] > 2013-12-19 12:15:21,874 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-304:ctx-ba54a897) Seq 1-562367802: Response Received: > 2013-12-19 12:15:21,875 DEBUG [c.c.a.t.Request] > (DirectAgent-304:ctx-ba54a897) Seq 1-562367802: Processing: { Ans: , MgmtId: > 280320865129348, via: 1, Ver: v1, Flags: 10, > [{"org.apache.cloudstack.storage.command.AttachAnswer":{"disk":{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"5916489b-d8c3-433d-8439-04b10925d0c1","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"ce50406b-9038-37ba-9b72-6228d5eb0858","id":1,"poolType":"NetworkFilesystem","host":"10.102.192.19","path":"/HYPERV-SMB/abhinav-hyperv-ps1?user=abhinav&password=freebsd@123&domain=BLR","port":445,"url":"NetworkFilesystem://10.102.192.19//HYPERV-SMB/abhinav-hyperv-ps1?user=abhinav&password=freebsd@123&domain=BLR/?ROLE=Primary&STOREUUID=ce50406b-9038-37ba-9b72-6228d5eb0858"}},"name":"vol2","size":5368709120,"volumeId":11,"accountId":2,"id":11,"hypervisorType":"Hyperv"}},"diskSeq":1,"type":"DATADISK","_details":{"managed":"false","storagePort":"445","storageHost":"10.102.192.19","volumeSize":"5368709120"}},"result":false,"details":"org.apache.cloudstack.storage.command.AttachCommand > failed due to Hyper-V Job failed, Error Code:32775, Description: 'i-2-8-VM' > failed to add device 'Synthetic Disk Drive'. (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E)\n\n'i-2-8-VM': Cannot attach storage > media to the controller because the specified location is in use. (Virtual > machine ID 5F95525C-D979-450A-828D-8449855AF80E)","wait":0}}] } > 2013-12-19 12:15:21,875 DEBUG [c.c.a.t.Request] (Job-Executor-23:ctx-45871688 > ctx-af56967a) Seq 1-562367802: Received: { Ans: , MgmtId: 280320865129348, > via: 1, Ver: v1, Flags: 10, { AttachAnswer } } > 2013-12-19 12:15:21,875 ERROR [c.c.a.ApiAsyncJobDispatcher] > (Job-Executor-23:ctx-45871688) Unexpected exception while executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd > com.cloud.utils.exception.CloudRuntimeException: Failed to attach volume: > vol2 to VM: v3; org.apache.cloudstack.storage.command.AttachCommand failed > due to Hyper-V Job failed, Error Code:32775, Description: 'i-2-8-VM' failed > to add device 'Synthetic Disk Drive'. (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E) > 'i-2-8-VM': Cannot attach storage media to the controller because the > specified location is in use. (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E) > at > com.cloud.storage.VolumeApiServiceImpl.sendAttachVolumeCommand(VolumeApiServiceImpl.java:1879) > at > com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1264) > at > com.cloud.storage.VolumeApiServiceImpl.orchestrateAttachVolumeToVM(VolumeApiServiceImpl.java:1088) > at > com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1063) > 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 $Proxy193.attachVolumeToVM(Unknown Source) > at > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:123) > 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:521) > 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-19 12:15:21,878 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (Job-Executor-23:ctx-45871688) Complete async job-51, jobStatus: FAILED, > resultCode: 530, result: > org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Failed > to attach volume: vol2 to VM: v3; > org.apache.cloudstack.storage.command.AttachCommand failed due to Hyper-V Job > failed, Error Code:32775, Description: \u0027i-2-8-VM\u0027 failed to add > device \u0027Synthetic Disk Drive\u0027. (Virtual machine ID > 5F95525C-D979-450A-828D-8449855AF80E)\n\n\u0027i-2-8-VM\u0027: Cannot attach > storage media to the controller because the specified location is in use. > (Virtual machine ID 5F95525C-D979-450A-828D-8449855AF80E)"} > 2013-12-19 12:15:21,883 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (Job-Executor-23:ctx-45871688) Done executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-51 > 2013-12-19 12:15:21,886 INFO [o.a.c.f.j.i.AsyncJobMonitor] > (Job-Executor-23:ctx-45871688) Remove job-51 from job monitoring > 2013-12-19 12:15:22,923 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-454:ctx-e8031b11) Ping host 10.102.192.14 (IP 10.102.192.14) > 2013-12-19 12:15:22,923 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-454:ctx-e8031b11) POST request > tohttp://10.102.192.14:8250/api/HypervResource/com.cloud.agent.api.PingRoutingCommand > with > contents{"_gatewayAccessible":true,"_vnetAccessible":true,"hostType":"Routing","hostId":1,"contextMap":{},"wait":0} > 2013-12-19 12:15:22,923 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-454:ctx-e8031b11) Sending cmd to > http://10.102.192.14:8250/api/HypervResource/com.cloud.agent.api.PingRoutingCommand > cmd > data:{"_gatewayAccessible":true,"_vnetAccessible":true,"hostType":"Routing","hostId":1,"contextMap":{},"wait":0} > 2013-12-19 12:15:22,933 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-454:ctx-e8031b11) POST response > is[{"com.cloud.agent.api.Answer":{"result":true,"details":"success - NOP for > PingRoutingCommand","_reconnect":false,"contextMap":{}}}] > 2013-12-19 12:15:22,934 DEBUG [c.c.h.h.r.HypervDirectConnectResource] > (DirectAgent-454:ctx-e8031b11) executeRequest received response > [{"com.cloud.agent.api.Answer":{"result":true,"details":"success - NOP for > PingRoutingCommand","contextMap":{},"wait":0}}] > . -- This message was sent by Atlassian JIRA (v6.1.5#6160)