cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devdeep Singh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-7724) [Automation][HyperV] Unable to migrate VM due to JsonParseException: The JsonDeserializer EnumTypeAdapter failed to deserialize json object "Running"
Date Mon, 20 Oct 2014 09:03:33 GMT

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

Devdeep Singh commented on CLOUDSTACK-7724:
-------------------------------------------

I had already fixed this issue in commit 5350e61187d5b2f9fdc997dcc9fea34ff68148f7 on 19th
September. The issue was fixed against bug CLOUDSTACK-7494. The fix was in hyper-v agent.
Hyper-v hosts are probably running an older agent. This is the reason they are returning the
wrong state of the VM instead of the power state.

If you build and install the latest hyper-v agent, migration should be successful. I tried
it on a fresh setup and it was successful.

> [Automation][HyperV] Unable to migrate VM due to JsonParseException: The JsonDeserializer
EnumTypeAdapter failed to deserialize json object "Running"
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7724
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7724
>             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
>
>
> =========================================================
> JsonParseException: The JsonDeserializer EnumTypeAdapter failed to deserialize json object
"Running"
> =========================================================
> 2014-10-14 19:34:47,983 DEBUG [c.c.a.t.Request] (Work-Job-Executor-65:ctx-81e9b15c job-191/job-192
ctx-b908f714) Seq 1-5051068457072722114: Sending  { Cmd , MgmtId: 192182403311206, via: 1(10.81.56.124),
Ver: v1, Flags: 100011, [{"com.cloud.agent.api.CheckVirtualMachineCommand":{"vmName":"i-16-36-VM","wait":20}}]
}
> 2014-10-14 19:34:47,983 DEBUG [c.c.a.t.Request] (Work-Job-Executor-65:ctx-81e9b15c job-191/job-192
ctx-b908f714) Seq 1-5051068457072722114: Executing:  { Cmd , MgmtId: 192182403311206, via:
1(10.81.56.124), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.CheckVirtualMachineCommand":{"vmName":"i-16-36-VM","wait":20}}]
}
> 2014-10-14 19:34:47,983 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-110:ctx-409b4476)
Seq 1-5051068457072722114: Executing request
> 2014-10-14 19:34:47,984 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-110:ctx-409b4476)
POST request to https://10.81.56.124:8250/api/HypervResource/com.cloud.agent.api.CheckVirtualMachineCommand
with contents {"vmName":"i-16-36-VM","contextMap":{"job":"job-191/job-192"},"wait":20}
> 2014-10-14 19:34:47,990 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-110:ctx-409b4476)
Sending cmd to https://10.81.56.124:8250/api/HypervResource/com.cloud.agent.api.CheckVirtualMachineCommand
cmd data:{"vmName":"i-16-36-VM","contextMap":{"job":"job-191/job-192"},"wait":20}
> 2014-10-14 19:34:48,099 DEBUG [c.c.h.h.r.HypervDirectConnectResource] (DirectAgent-110:ctx-409b4476)
POST response is [{"com.cloud.agent.api.CheckVirtualMachineAnswer":{"result":true,"details":null,"state":"Running","contextMap":{}}}]
> 2014-10-14 19:34:48,148 WARN  [c.c.a.m.DirectAgentAttache] (DirectAgent-110:ctx-409b4476)
Seq 1-5051068457072722114: Throwable caught while executing command
> com.google.gson.JsonParseException: The JsonDeserializer EnumTypeAdapter failed to deserialize
json object "Running" given the type class com.cloud.vm.VirtualMachine$PowerState
> 	at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:64)
> 	at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:92)
> 	at com.google.gson.JsonObjectDeserializationVisitor.visitFieldUsingCustomHandler(JsonObjectDeserializationVisitor.java:117)
> 	at com.google.gson.ReflectingFieldNavigator.visitFieldsReflectively(ReflectingFieldNavigator.java:63)
> 	at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:120)
> 	at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:76)
> 	at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:54)
> 	at com.google.gson.Gson.fromJson(Gson.java:551)
> 	at com.google.gson.Gson.fromJson(Gson.java:521)
> 	at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:80)
> 	at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:40)
> 	at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:51)
> 	at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:92)
> 	at com.google.gson.JsonDeserializationVisitor.visitUsingCustomHandler(JsonDeserializationVisitor.java:80)
> 	at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:101)
> 	at com.google.gson.JsonDeserializationContextDefault.fromJsonArray(JsonDeserializationContextDefault.java:67)
> 	at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:52)
> 	at com.google.gson.Gson.fromJson(Gson.java:551)
> 	at com.google.gson.Gson.fromJson(Gson.java:498)
> 	at com.google.gson.Gson.fromJson(Gson.java:467)
> 	at com.google.gson.Gson.fromJson(Gson.java:417)
> 	at com.google.gson.Gson.fromJson(Gson.java:389)
> 	at com.cloud.hypervisor.hyperv.resource.HypervDirectConnectResource.executeRequest(HypervDirectConnectResource.java:518)
> 	at com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:304)
> 	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.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> 	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)
> Caused by: java.lang.IllegalArgumentException: No enum constant com.cloud.vm.VirtualMachine.PowerState.Running
> 	at java.lang.Enum.valueOf(Enum.java:236)
> 	at com.google.gson.DefaultTypeAdapters$EnumTypeAdapter.deserialize(DefaultTypeAdapters.java:524)
> 	at com.google.gson.DefaultTypeAdapters$EnumTypeAdapter.deserialize(DefaultTypeAdapters.java:514)
> 	at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:51)
> 	... 36 more
> 2014-10-14 19:34:48,150 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-110:ctx-409b4476)
Seq 1-5051068457072722114: Response Received: 
> 2014-10-14 19:34:48,150 DEBUG [c.c.a.t.Request] (DirectAgent-110:ctx-409b4476) Seq 1-5051068457072722114:
Processing:  { Ans: , MgmtId: 192182403311206, via: 1, Ver: v1, Flags: 10, [{"com.cloud.agent.api.Answer":{"result":false,"details":"com.google.gson.JsonParseException:
The JsonDeserializer EnumTypeAdapter failed to deserialize json object \"Running\" given the
type class com.cloud.vm.VirtualMachine$PowerState","wait":0}}] }
> 2014-10-14 19:34:48,150 DEBUG [c.c.a.t.Request] (Work-Job-Executor-65:ctx-81e9b15c job-191/job-192
ctx-b908f714) Seq 1-5051068457072722114: Received:  { Ans: , MgmtId: 192182403311206, via:
1, Ver: v1, Flags: 10, { Answer } }
> 2014-10-14 19:34:48,150 ERROR [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-65:ctx-81e9b15c
job-191/job-192 ctx-b908f714) Unable to complete migration for VM[User|i-16-36-VM]
> 2014-10-14 19:34:48,152 DEBUG [c.c.a.m.AgentAttache] (Work-Job-Executor-65:ctx-81e9b15c
job-191/job-192 ctx-b908f714) Seq 2-4088424036722278632: Routed from 192182403311206
> 2014-10-14 19:34:48,152 DEBUG [c.c.a.t.Request] (Work-Job-Executor-65:ctx-81e9b15c job-191/job-192
ctx-b908f714) Seq 2-4088424036722278632: Sending  { Cmd , MgmtId: 192182403311206, via: 2(10.81.56.82),
Ver: v1, Flags: 100011, [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"executeInSequence":false,"checkBeforeCleanup":false,"vmName":"i-16-36-VM","wait":0}}]
}
> 2014-10-14 19:34:48,152 DEBUG [c.c.a.t.Request] (Work-Job-Executor-65:ctx-81e9b15c job-191/job-192
ctx-b908f714) Seq 2-4088424036722278632: Executing:  { Cmd , MgmtId: 192182403311206, via:
2(10.81.56.82), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"executeInSequence":false,"checkBeforeCleanup":false,"vmName":"i-16-36-VM","wait":0}}]
}
> 2014-10-14 19:34:48,152 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-215:ctx-1b232c0a)
Seq 2-4088424036722278632: Executing request



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

Mime
View raw message