cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-7494) [Automation][HyperV] Unable to Migrate VM - Error Message mentions that the operation is not supported
Date Sat, 20 Sep 2014 13:36:34 GMT

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

ASF subversion and git services commented on CLOUDSTACK-7494:
-------------------------------------------------------------

Commit 5350e61187d5b2f9fdc997dcc9fea34ff68148f7 in cloudstack's branch refs/heads/master from
[~devdeep]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5350e61 ]

CLOUDSTACK-7494. Migration of a vm fails on Hyper-V. In an earlier commit as part of
cleaning up vmsync changes, checkvirtualmachine command was updated to return the
power state of the vm. The change was missed for Hyper-V. This caused migration to
fail on cloudstack even though it used to succeed on the hypervisor. Updated the
hyper-v agent code to return the cloudstack equivalent power state for check virtual
machine answer.


> [Automation][HyperV] Unable to Migrate VM - Error Message mentions that the operation
is not supported
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7494
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7494
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Automation
>    Affects Versions: 4.5.0
>            Reporter: Chandan Purushothama
>            Assignee: Devdeep Singh
>            Priority: Critical
>             Fix For: 4.5.0
>
>
> ==============
> Test Client Code:
> ==============
> {code}
>     @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "multihost"], required_hardware="false")
>     def test_08_migrate_vm(self):
>         """Test migrate VM
>         """
>         # Validate the following
>         # 1. Environment has enough hosts for migration
>         # 2. DeployVM on suitable host (with another host in the cluster)
>         # 3. Migrate the VM and assert migration successful
>         suitable_hosts = None
>         hosts = Host.list(
>             self.apiclient,
>             zoneid=self.zone.id,
>             type='Routing'
>         )
>         self.assertEqual(validateList(hosts)[0], PASS, "hosts list validation failed")
>         if len(hosts) < 2:
>             self.skipTest("At least two hosts should be present in the zone for migration")
>         hypervisor = str(get_hypervisor_type(self.apiclient)).lower()
>         # For KVM, two hosts used for migration should  be present in same cluster
>         # For XenServer and VMware, migration is possible between hosts belonging to
different clusters
>         # with the help of XenMotion and Vmotion respectively.
>         if hypervisor.lower() in ["kvm","simulator"]:
>             #identify suitable host
>             clusters = [h.clusterid for h in hosts]
>             #find hosts withe same clusterid
>             clusters = [cluster for index, cluster in enumerate(clusters) if clusters.count(cluster)
> 1]
>             if len(clusters) <= 1:
>                 self.skipTest("In " + hypervisor.lower() + " Live Migration needs two
hosts within same cluster")
>             suitable_hosts = [host for host in hosts if host.clusterid == clusters[0]]
>         else:
>             suitable_hosts = hosts
>         target_host = suitable_hosts[0]
>         migrate_host = suitable_hosts[1]
>         #deploy VM on target host
>         self.vm_to_migrate = VirtualMachine.create(
>             self.apiclient,
>             self.services["small"],
>             accountid=self.account.name,
>             domainid=self.account.domainid,
>             serviceofferingid=self.small_offering.id,
>             mode=self.services["mode"],
>             hostid=target_host.id
>         )
>         self.debug("Migrating VM-ID: %s to Host: %s" % (
>                                         self.vm_to_migrate.id,
>                                         migrate_host.id
>                                         ))
>         self.vm_to_migrate.migrate(self.apiclient, migrate_host.id)
>         retries_cnt = 3
>         while retries_cnt >=0:
>             list_vm_response = VirtualMachine.list(self.apiclient,
>                                                    id=self.vm_to_migrate.id)
>             self.assertNotEqual(
>                                 list_vm_response,
>                                 None,
>                                 "Check virtual machine is listed"
>                                )
>             vm_response = list_vm_response[0]
>             self.assertEqual(vm_response.id,self.vm_to_migrate.id,"Check virtual machine
ID of migrated VM")
>             self.assertEqual(vm_response.hostid,migrate_host.id,"Check destination hostID
of migrated VM")
>             retries_cnt = retries_cnt - 1
>         return
> {code}
> ======================================
> *Error message reported in the management log:*
> ======================================
> {code}
> 2014-09-03 17:52:56,853 ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224 ctx-43ef9330) Invocation exception, caused by: com.cloud.utils.exception.CloudRuntimeException:
Unable to migrate due to com.cloud.agent.api.MigrateCommand failed due to Failed migrating
VM i-15-35-VM (GUID AA19CC47-04E5-498F-BC20-574262279F68) due to NotSupported
> 2014-09-03 17:52:56,853 INFO  [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224 ctx-43ef9330) Rethrow exception com.cloud.utils.exception.CloudRuntimeException:
Unable to migrate due to com.cloud.agent.api.MigrateCommand failed due to Failed migrating
VM i-15-35-VM (GUID AA19CC47-04E5-498F-BC20-574262279F68) due to NotSupported
> 2014-09-03 17:52:56,853 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Done with run of VM work job: com.cloud.vm.VmWorkMigrate for VM 35, job origin:
223
> 2014-09-03 17:52:56,853 ERROR [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Unable to complete AsyncJobVO {id:224, userId: 2, accountId: 2, instanceType:
null, instanceId: null, cmd: com.cloud.vm.VmWorkMigrate, cmdInfo: rO0ABXNyABpjb20uY2xvdWQudm0uVm1Xb3JrTWlncmF0ZRdxQXtPtzYqAgAGSgAJc3JjSG9zdElkTAAJY2x1c3RlcklkdAAQTGphdmEvbGFuZy9Mb25nO0wABmhvc3RJZHEAfgABTAAFcG9kSWRxAH4AAUwAB3N0b3JhZ2V0AA9MamF2YS91dGlsL01hcDtMAAZ6b25lSWRxAH4AAXhyABNjb20uY2xvdWQudm0uVm1Xb3Jrn5m2VvAlZ2sCAARKAAlhY2NvdW50SWRKAAZ1c2VySWRKAAR2bUlkTAALaGFuZGxlck5hbWV0ABJMamF2YS9sYW5nL1N0cmluZzt4cAAAAAAAAAACAAAAAAAAAAIAAAAAAAAAI3QAGVZpcnR1YWxNYWNoaW5lTWFuYWdlckltcGwAAAAAAAAAAnNyAA5qYXZhLmxhbmcuTG9uZzuL5JDMjyPfAgABSgAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAAAAAAAXEAfgAJcQB-AAlwcQB-AAk,
cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid:
174253150778429, completeMsid: null, lastUpdated: null, lastPolled: null, created: Wed Sep
03 17:52:51 UTC 2014}, job origin:223
> com.cloud.utils.exception.CloudRuntimeException: Unable to migrate due to com.cloud.agent.api.MigrateCommand
failed due to Failed migrating VM i-15-35-VM (GUID AA19CC47-04E5-498F-BC20-574262279F68) due
to NotSupported
> 	at com.cloud.vm.VirtualMachineManagerImpl.migrate(VirtualMachineManagerImpl.java:1899)
> 	at com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrate(VirtualMachineManagerImpl.java:1799)
> 	at com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrate(VirtualMachineManagerImpl.java:4606)
> 	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:601)
> 	at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> 	at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4738)
> 	at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
> 	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:503)
> 	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 org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:460)
> 	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:722)
> 2014-09-03 17:52:56,930 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Complete async job-224, jobStatus: FAILED, resultCode: 0, result: rO0ABXNyABpqYXZhLmxhbmcuUnVudGltZUV4Y2VwdGlvbp5fBkcKNIPlAgAAeHIAE2phdmEubGFuZy5FeGNlcHRpb27Q_R8-GjscxAIAAHhyABNqYXZhLmxhbmcuVGhyb3dhYmxl1cY1Jzl3uMsDAARMAAVjYXVzZXQAFUxqYXZhL2xhbmcvVGhyb3dhYmxlO0wADWRldGFpbE1lc3NhZ2V0ABJMamF2YS9sYW5nL1N0cmluZztbAApzdGFja1RyYWNldAAeW0xqYXZhL2xhbmcvU3RhY2tUcmFjZUVsZW1lbnQ7TAAUc3VwcHJlc3NlZEV4Y2VwdGlvbnN0ABBMamF2YS91dGlsL0xpc3Q7eHBxAH4AB3QAxEpvYiBmYWlsZWQgZHVlIHRvIGV4Y2VwdGlvbiBVbmFibGUgdG8gbWlncmF0ZSBkdWUgdG8gY29tLmNsb3VkLmFnZW50LmFwaS5NaWdyYXRl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A
> 2014-09-03 17:52:56,943 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Done executing com.cloud.vm.VmWorkMigrate for job-224
> 2014-09-03 17:52:56,953 DEBUG [o.a.c.f.j.i.SyncQueueManagerImpl] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Sync queue (57) is currently empty
> 2014-09-03 17:52:56,954 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-64:ctx-b2276c7f
job-223/job-224) Remove job-224 from job monitoring
> 2014-09-03 17:52:56,954 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-110:ctx-714a7a54
job-223) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd
> java.lang.RuntimeException: Job failed due to exception Unable to migrate due to com.cloud.agent.api.MigrateCommand
failed due to Failed migrating VM i-15-35-VM (GUID AA19CC47-04E5-498F-BC20-574262279F68) due
to NotSupported
> 	at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:114)
> 	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:503)
> 	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 org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:460)
> 	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:722)
> 2014-09-03 17:52:56,961 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-110:ctx-714a7a54
job-223) Complete async job-223, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Job
failed due to exception Unable to migrate due to com.cloud.agent.api.MigrateCommand failed
due to Failed migrating VM i-15-35-VM (GUID AA19CC47-04E5-498F-BC20-574262279F68) due to NotSupported"}
> 2014-09-03 17:52:56,969 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-110:ctx-714a7a54
job-223) Done executing org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd for job-223
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message