cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ilya musayev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-3433) Relax the same package restriction for Command and its derived classes in ArrayTypeAdaptor<T>
Date Thu, 18 Jul 2013 03:06:48 GMT

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

ilya musayev commented on CLOUDSTACK-3433:
------------------------------------------

Kelven

Please review the commit "73a6aa78854f379e6439bf22457094a5272cbfed", cloudstack-3433.


After reverting this commit, everything functioned normally. We cannot release 4.1.1 with
this defect :(

Message in the log:
2013-07-17 19:38:20,949 DEBUG [agent.transport.Request] (http-8080-3:null) Seq 5-1052639262:
Received:  { Ans: , MgmtId: 345049078181, via: 5, Ver: v1, Flags: 10, { GetVncPortAnswer }
}
2013-07-17 19:38:20,950 DEBUG [cloud.servlet.ConsoleProxyServlet] (http-8080-3:null) Port
info 172.25.243.31
2013-07-17 19:38:20,950 INFO  [cloud.servlet.ConsoleProxyServlet] (http-8080-3:null) Parse
host info returned from executing GetVNCPortCommand. host info: 172.25.243.31
2013-07-17 19:38:20,958 DEBUG [cloud.servlet.ConsoleProxyServlet] (http-8080-3:null) Compose
console url: https://172-24-20-22.realhostip.com/ajax?token=1LYgydVEstHtlOuUWpMC3lNponA8tI8kA10rqnjR1Tl1HPws9wEaTKE6IvMaV_iUtnNNqSjcoFTyO9NIDzaBTUWpfGumQ5cAijsvKJ0Mx8fyQwyCDLko8ekhjIKLkngtuofPmQRbBwsfaZj6_N4JpLYKWoOVdZ6EqqerLKas1ErQ0e2yRnDvYq5C2OVSGQgl08a2RCF0WFWuYyl1HW3fDIkivzVJE9IC6266_CSEWuQV65bmjVIuUMPekgzq_R6PBm85a_wsxGX8rdae0x05UQ
2013-07-17 19:38:20,958 DEBUG [cloud.servlet.ConsoleProxyServlet] (http-8080-3:null) the console
url is :: <html><title>rhn01t-ops-08</title><frameset><frame src="https://172-24-20-22.realhostip.com/ajax?token=1LYgydVEstHtlOuUWpMC3lNponA8tI8kA10rqnjR1Tl1HPws9wEaTKE6IvMaV_iUtnNNqSjcoFTyO9NIDzaBTUWpfGumQ5cAijsvKJ0Mx8fyQwyCDLko8ekhjIKLkngtuofPmQRbBwsfaZj6_N4JpLYKWoOVdZ6EqqerLKas1ErQ0e2yRnDvYq5C2OVSGQgl08a2RCF0WFWuYyl1HW3fDIkivzVJE9IC6266_CSEWuQV65bmjVIuUMPekgzq_R6PBm85a_wsxGX8rdae0x05UQ"></frame></frameset></html>
2013-07-17 19:38:20,992 ERROR [agent.transport.Request] (AgentManager-Handler-7:null) Caught
problem with [{"ConsoleAccessAuthenticationCommand":{"_host":"172.25.243.31","_port":"5924","_vmId":"0c9354d4-cbad-4cd0-9a38-48e0efc6a3f5","_sid":"585d97c4cf867d6d","_ticket":"7w0YL4G35QDQj79Jm3h5NzNtwXo\u003d","_isReauthenticating":false,"contextMap":{},"wait":0}}]
com.google.gson.JsonParseException: The JsonDeserializer com.cloud.agent.transport.ArrayTypeAdaptor@1aa9a7bb
failed to deserialize json object [{"ConsoleAccessAuthenticationCommand":{"_host":"172.25.243.31","_port":"5924","_vmId":"0c9354d4-cbad-4cd0-9a38-48e0efc6a3f5","_sid":"585d97c4cf867d6d","_ticket":"7w0YL4G35QDQj79Jm3h5NzNtwXo=","_isReauthenticating":false,"contextMap":{},"wait":0}}]
given the type class [Lcom.cloud.agent.api.Command;
     at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:64)
     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.cloud.agent.transport.Request.getCommands(Request.java:235)
     at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.processRequest(AgentManagerImpl.java:1221)
     at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.doTask(AgentManagerImpl.java:1374)
     at com.cloud.agent.manager.ClusteredAgentManagerImpl$ClusteredAgentHandler.doTask(ClusteredAgentManagerImpl.java:659)
     at com.cloud.utils.nio.Task.run(Task.java:83)
     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)
Caused by: com.cloud.utils.exception.CloudRuntimeException: can't find ConsoleAccessAuthenticationCommand
     at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:75)
     at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:36)
     at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:51)
     ... 15 more
2013-07-17 19:38:20,994 WARN  [utils.nio.Task] (AgentManager-Handler-7:null) Caught the following
exception but pushing on
com.google.gson.JsonParseException: The JsonDeserializer com.cloud.agent.transport.ArrayTypeAdaptor@1aa9a7bb
failed to deserialize json object [{"ConsoleAccessAuthenticationCommand":{"_host":"172.25.243.31","_port":"5924","_vmId":"0c9354d4-cbad-4cd0-9a38-48e0efc6a3f5","_sid":"585d97c4cf867d6d","_ticket":"7w0YL4G35QDQj79Jm3h5NzNtwXo=","_isReauthenticating":false,"contextMap":{},"wait":0}}]
given the type class [Lcom.cloud.agent.api.Command;
     at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:64)
     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.cloud.agent.transport.Request.getCommands(Request.java:235)
     at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.processRequest(AgentManagerImpl.java:1221)
     at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.doTask(AgentManagerImpl.java:1374)
     at com.cloud.agent.manager.ClusteredAgentManagerImpl$ClusteredAgentHandler.doTask(ClusteredAgentManagerImpl.java:659)
     at com.cloud.utils.nio.Task.run(Task.java:83)
     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)
Caused by: com.cloud.utils.exception.CloudRuntimeException: can't find ConsoleAccessAuthenticationCommand
     at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:75)
     at com.cloud.agent.transport.ArrayTypeAdaptor.deserialize(ArrayTypeAdaptor.java:36)
     at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:51)
     ... 15 more
2013-07-17 19:38:25,372 DEBUG [cloud.server.ManagementServerImpl] (EventChecker-1:null) Deleting
events older than: Tue Jul 02 19:38:25 EDT 2013
2013-07-17 19:38:25,376 DEBUG [cloud.server.ManagementServerImpl] (EventChecker-1:null) Found
0 events to be purged


Thanks
ilya

                
> Relax the same package restriction for Command and its derived classes in ArrayTypeAdaptor<T>
> ---------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3433
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3433
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.1.1
>            Reporter: Kelven Yang
>            Assignee: Kelven Yang
>             Fix For: 4.1.1
>
>
> In ArrayTypeAdaptor<T>, there is an enforcement in code that Command class and
all its derived sub classes have to existing within the same java package root.
> For some strange reason that I suspect it is due to the initialization order of static
variables, the logic in separating package name and composing full sub classes name with package
prefix can sometime break.
> Remove this enforcement to make code more robust at runtime against subtle issues caused
by environment changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message