You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Abhinav Roy (JIRA)" <ji...@apache.org> on 2013/12/11 09:25:06 UTC

[jira] [Created] (CLOUDSTACK-5455) [Hyper-V] Detach ISO from VM is failing

Abhinav Roy created CLOUDSTACK-5455:
---------------------------------------

             Summary: [Hyper-V] Detach ISO from VM is failing
                 Key: CLOUDSTACK-5455
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5455
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Hypervisor Controller, ISO, Management Server
    Affects Versions: 4.3.0
         Environment: 4.3, Hyper-V
            Reporter: Abhinav Roy
            Priority: Critical
             Fix For: 4.3.0


Steps : 
==================== 
1. Create an advanced zone setup with hyper-v as the host hypervisor type and shared CIFS storage for primary storage 

2. Deploy a VM 
3. Register an ISO
4. Attach the ISO registered in step 3 to the VM deployed in step 2. 
5. Detach the ISO from VM

Expected behaviour : 
===================== 
The ISO should be successfully attached and detached from the VM . 


Observed behaviour : 
===================== 
Attach ISO is successful, but detach fails with the following error.

2013-12-11 13:32:21,380 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-346:ctx-95733955) POST response is[{"org.apache.cloudstack.storage.command.DettachAnswer":{"result":false,"details":"org.apache.cloudstack.storage.command.DettachCommand failed due to Failed to remove disk image \\\\10.102.192.19\\HYPERV-SMB\\abhinav-sec2\\template\\tmpl\\2\\205\\205-2-e890b586-1903-352b-a461-f8269531e405.iso from VM i-2-23-VM (GUID 126FF663-2E97-49B1-AC72-A9C564CDB40F): the disk image is not attached.","contextMap":{}}}]
2013-12-11 13:32:21,381 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-346:ctx-95733955) executeRequest received response [{"org.apache.cloudstack.storage.command.DettachAnswer":{"result":false,"details":"org.apache.cloudstack.storage.command.DettachCommand failed due to Failed to remove disk image \\\\10.102.192.19\\HYPERV-SMB\\abhinav-sec2\\template\\tmpl\\2\\205\\205-2-e890b586-1903-352b-a461-f8269531e405.iso from VM i-2-23-VM (GUID 126FF663-2E97-49B1-AC72-A9C564CDB40F): the disk image is not attached.","contextMap":{},"wait":0}}]
2013-12-11 13:32:21,381 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-346:ctx-95733955) Seq 1-985236700: Response Received:
2013-12-11 13:32:21,381 DEBUG [c.c.a.t.Request] (DirectAgent-346:ctx-95733955) Seq 1-985236700: Processing:  { Ans: , MgmtId: 280320865129348, via: 1, Ver: v1, Flags: 10, [{"org.apache.cloudstack.storage.command.DettachAnswer":{"result":false,"details":"org.apache.cloudstack.storage.command.DettachCommand failed due to Failed to remove disk image \\\\10.102.192.19\\HYPERV-SMB\\abhinav-sec2\\template\\tmpl\\2\\205\\205-2-e890b586-1903-352b-a461-f8269531e405.iso from VM i-2-23-VM (GUID 126FF663-2E97-49B1-AC72-A9C564CDB40F): the disk image is not attached.","wait":0}}] }
2013-12-11 13:32:21,381 DEBUG [c.c.a.t.Request] (Job-Executor-25:ctx-fc430a28 ctx-bd66f6be) Seq 1-985236700: Received:  { Ans: , MgmtId: 280320865129348, via: 1, Ver: v1, Flags: 10, { DettachAnswer } }
2013-12-11 13:32:21,381 DEBUG [c.c.a.m.AgentManagerImpl] (Job-Executor-25:ctx-fc430a28 ctx-bd66f6be) Details from executing class org.apache.cloudstack.storage.command.DettachCommand: org.apache.cloudstack.storage.command.DettachCommand failed due to Failed to remove disk image \\10.102.192.19\HYPERV-SMB\abhinav-sec2\template\tmpl\2\205\205-2-e890b586-1903-352b-a461-f8269531e405.iso from VM i-2-23-VM (GUID 126FF663-2E97-49B1-AC72-A9C564CDB40F): the disk image is not attached.
2013-12-11 13:32:21,387 ERROR [c.c.a.ApiAsyncJobDispatcher] (Job-Executor-25:ctx-fc430a28) Unexpected exception while executing org.apache.cloudstack.api.command.user.iso.DetachIsoCmd
com.cloud.utils.exception.CloudRuntimeException: Failed to detach iso
        at com.cloud.template.TemplateManagerImpl.detachIso(TemplateManagerImpl.java:945)
        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.detachIso(Unknown Source)
        at org.apache.cloudstack.api.command.user.iso.DetachIsoCmd.execute(DetachIsoCmd.java:87)
        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-11 13:32:21,395 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Job-Executor-25:ctx-fc430a28) Complete async job-64, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Failed to detach iso"}
2013-12-11 13:32:21,407 DEBUG [o.a.c.f






Error seen in Hyper-V agent logs :

2013-12-11 05:35:55,181 [29] ERROR HypervResource.HypervResourceController [904dd841-8504-42db-a883-e7b7cfeb8d95] - com.cloud.agent.api.GetStorageStatsCommand failed on exceptionIllegal characters in path.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.Path.GetFullPath(String path)
   at HypervResource.HypervResourceController.GetCapacityForLocalPath(String localStoragePath, Int64& capacityBytes, Int64& availableBytes) in c:\source_code\cloudstack\plugins\hypervisors\hyperv\DotNet\ServerResource\HypervResource\HypervResourceController.cs:line 1726
   at HypervResource.HypervResourceController.GetStorageStatsCommand(Object cmd) in c:\source_code\cloudstack\plugins\hypervisors\hyperv\DotNet\ServerResource\HypervResource\HypervResourceController.cs:line 1444
2013-12-11 05:35:55,181 [29] INFO  HypervResource.HypervResourceController [904dd841-8504-42db-a883-e7b7cfeb8d95] - {
  "com.cloud.agent.api.GetStorageStatsAnswer": {
    "result": false,
    "details": "com.cloud.agent.api.GetStorageStatsCommand failed on exceptionIllegal characters in path.",
    "capacity": 0,
    "used": 0,
    "contextMap": {}
  }
}
2013-12-11 05:35:55,197 [41] INFO  HypervResource.HypervResourceController [397a3569-f63d-4874-9826-dba57e03cc35] - com.cloud.agent.api.GetStorageStatsCommand{
  "id": "f6869306-f861-3984-9612-2ca64d560604",
  "localPath": "/HYPERV-SMB/abhinav-primary1?user=abhinav&password=freebsd@123&domain=BLR",
  "pooltype": "NetworkFilesystem",
  "contextMap": {},
  "wait": 0
}
2013-12-11 05:35:55,228 [41] ERROR HypervResource.HypervResourceController [397a3569-f63d-4874-9826-dba57e03cc35] - com.cloud.agent.api.GetStorageStatsCommand failed on exceptionIllegal characters in path.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.Path.GetFullPath(String path)
   at HypervResource.HypervResourceController.GetCapacityForLocalPath(String localStoragePath, Int64& capacityBytes, Int64& availableBytes) in c:\source_code\cloudstack\plugins\hypervisors\hyperv\DotNet\ServerResource\HypervResource\HypervResourceController.cs:line 1726
   at HypervResource.HypervResourceController.GetStorageStatsCommand(Object cmd) in c:\source_code\cloudstack\plugins\hypervisors\hyperv\DotNet\ServerResource\HypervResource\HypervResourceController.cs:line 1444
2013-12-11 05:35:55,228 [41] INFO  HypervResource.HypervResourceController [397a3569-f63d-4874-9826-dba57e03cc35] - {
  "com.cloud.agent.api.GetStorageStatsAnswer": {
    "result": false,
    "details": "com.cloud.agent.api.GetStorageStatsCommand failed on exceptionIllegal characters in path.",
    "capacity": 0,
    "used": 0,
    "contextMap": {}
  }
}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)