Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4559110991 for ; Thu, 19 Dec 2013 06:57:12 +0000 (UTC) Received: (qmail 96123 invoked by uid 500); 19 Dec 2013 06:57:09 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 96093 invoked by uid 500); 19 Dec 2013 06:57:07 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 96072 invoked by uid 500); 19 Dec 2013 06:57:07 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 96065 invoked by uid 99); 19 Dec 2013 06:57:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 06:57:07 +0000 Date: Thu, 19 Dec 2013 06:57:07 +0000 (UTC) From: "Abhinav Roy (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CLOUDSTACK-5560) [Hyper-V] Re-attach Data disk is failing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Abhinav Roy created CLOUDSTACK-5560: --------------------------------------- Summary: [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 defa= ult.) Components: Hypervisor Controller, Management Server, Storage Con= troller Affects Versions: 4.3.0 Environment: 4.3, Hyper-V Reporter: Abhinav Roy Priority: Critical Fix For: 4.3.0 Steps :=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 1. Create an advanced zone setup with hyper-v as the host hypervisor type a= nd local storage for primary storage=20 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 : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D Attach , Detach and re-attach should be working fine. Observed behaviour: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D 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] (Dire= ctAgent-304:ctx-ba54a897) executeRequest received response [{"org.apache.cl= oudstack.storage.command.AttachAnswer":{"disk":{"data":{"org.apache.cloudst= ack.storage.to.VolumeObjectTO":{"uuid":"5916489b-d8c3-433d-8439-04b10925d0c= 1","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.P= rimaryDataStoreTO":{"uuid":"ce50406b-9038-37ba-9b72-6228d5eb0858","id":1,"p= oolType":"NetworkFilesystem","host":"10.102.192.19","path":"/HYPERV-SMB/abh= inav-hyperv-ps1?user\u003dabhinav\u0026password\u003dfreebsd@123\u0026domai= n\u003dBLR","port":445,"url":"NetworkFilesystem://10.102.192.19//HYPERV-SMB= /abhinav-hyperv-ps1?user\u003dabhinav\u0026password\u003dfreebsd@123\u0026d= omain\u003dBLR/?ROLE\u003dPrimary\u0026STOREUUID\u003dce50406b-9038-37ba-9b= 72-6228d5eb0858"}},"name":"vol2","size":5368709120,"volumeId":11,"accountId= ":2,"id":11,"hypervisorType":"Hyperv"}},"diskSeq":1,"type":"DATADISK","_det= ails":{"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 \u0027Synthe= tic Disk Drive\u0027. (Virtual machine ID 5F95525C-D979-450A-828D-8449855AF= 80E)\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-D97= 9-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-ba54a8= 97) 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-9= 038-37ba-9b72-6228d5eb0858","id":1,"poolType":"NetworkFilesystem","host":"1= 0.102.192.19","path":"/HYPERV-SMB/abhinav-hyperv-ps1?user=3Dabhinav&passwor= d=3Dfreebsd@123&domain=3DBLR","port":445,"url":"NetworkFilesystem://10.102.= 192.19//HYPERV-SMB/abhinav-hyperv-ps1?user=3Dabhinav&password=3Dfreebsd@123= &domain=3DBLR/?ROLE=3DPrimary&STOREUUID=3Dce50406b-9038-37ba-9b72-6228d5eb0= 858"}},"name":"vol2","size":5368709120,"volumeId":11,"accountId":2,"id":11,= "hypervisorType":"Hyperv"}},"diskSeq":1,"type":"DATADISK","_details":{"mana= ged":"false","storagePort":"445","storageHost":"10.102.192.19","volumeSize"= :"5368709120"}},"result":false,"details":"org.apache.cloudstack.storage.com= mand.AttachCommand failed due to Hyper-V Job failed, Error Code:32775, Desc= ription: 'i-2-8-VM' failed to add device 'Synthetic Disk Drive'. (Virtual m= achine ID 5F95525C-D979-450A-828D-8449855AF80E)\n\n'i-2-8-VM': Cannot attac= h 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-458716= 88 ctx-af56967a) Seq 1-562367802: Received: { Ans: , MgmtId: 2803208651293= 48, via: 1, Ver: v1, Flags: 10, { AttachAnswer } } 2013-12-19 12:15:21,875 ERROR [c.c.a.ApiAsyncJobDispatcher] (Job-Executor-2= 3:ctx-45871688) Unexpected exception while executing org.apache.cloudstack.= api.command.user.volume.AttachVolumeCmd com.cloud.utils.exception.CloudRuntimeException: Failed to attach volume: v= ol2 to VM: v3; org.apache.cloudstack.storage.command.AttachCommand failed d= ue 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-450= A-828D-8449855AF80E) 'i-2-8-VM': Cannot attach storage media to the controller because the speci= fied location is in use. (Virtual machine ID 5F95525C-D979-450A-828D-844985= 5AF80E) at com.cloud.storage.VolumeApiServiceImpl.sendAttachVolumeCommand(V= olumeApiServiceImpl.java:1879) at com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeAp= iServiceImpl.java:1264) at com.cloud.storage.VolumeApiServiceImpl.orchestrateAttachVolumeTo= VM(VolumeApiServiceImpl.java:1088) at com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeAp= iServiceImpl.java:1063) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= AccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingRef= lection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.inv= okeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.pro= ceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.= invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.pro= ceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkD= ynamicAopProxy.java:204) at $Proxy193.attachVolumeToVM(Unknown Source) at org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.ex= ecute(AttachVolumeCmd.java:123) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161) at com.cloud.api.ApiAsyncJobDispatcher.runJobInContext(ApiAsyncJobD= ispatcher.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.r= un(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.ja= va:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:33= 4) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec= utor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe= cutor.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-Execut= or-23:ctx-45871688) Complete async job-51, jobStatus: FAILED, resultCode: 5= 30, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uui= dList":[],"errorcode":530,"errortext":"Failed to attach volume: vol2 to VM:= v3; org.apache.cloudstack.storage.command.AttachCommand failed due to Hype= r-V Job failed, Error Code:32775, Description: \u0027i-2-8-VM\u0027 failed = to add device \u0027Synthetic Disk Drive\u0027. (Virtual machine ID 5F95525= C-D979-450A-828D-8449855AF80E)\n\n\u0027i-2-8-VM\u0027: Cannot attach stora= ge media to the controller because the specified location is in use. (Virtu= al machine ID 5F95525C-D979-450A-828D-8449855AF80E)"} 2013-12-19 12:15:21,883 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Job-Execut= or-23:ctx-45871688) Done executing org.apache.cloudstack.api.command.user.v= olume.AttachVolumeCmd for job-51 2013-12-19 12:15:21,886 INFO [o.a.c.f.j.i.AsyncJobMonitor] (Job-Executor-2= 3:ctx-45871688) Remove job-51 from job monitoring 2013-12-19 12:15:22,923 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (Dire= ctAgent-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] (Dire= ctAgent-454:ctx-e8031b11) POST request tohttp://10.102.192.14:8250/api/Hype= rvResource/com.cloud.agent.api.PingRoutingCommand with contents{"_gatewayAc= cessible":true,"_vnetAccessible":true,"hostType":"Routing","hostId":1,"cont= extMap":{},"wait":0} 2013-12-19 12:15:22,923 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (Dire= ctAgent-454:ctx-e8031b11) Sending cmd to http://10.102.192.14:8250/api/Hype= rvResource/com.cloud.agent.api.PingRoutingCommand cmd data:{"_gatewayAccess= ible":true,"_vnetAccessible":true,"hostType":"Routing","hostId":1,"contextM= ap":{},"wait":0} 2013-12-19 12:15:22,933 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (Dire= ctAgent-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] (Dire= ctAgent-454:ctx-e8031b11) executeRequest received response [{"com.cloud.age= nt.api.Answer":{"result":true,"details":"success - NOP for PingRoutingComma= nd","contextMap":{},"wait":0}}] . -- This message was sent by Atlassian JIRA (v6.1.4#6159)