You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/01 10:32:11 UTC

[jira] [Commented] (CLOUDSTACK-9094) Multiple threads are being used to collect the stats from the same VR

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

ASF GitHub Bot commented on CLOUDSTACK-9094:
--------------------------------------------

Github user bhaisaab commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1140#discussion_r46256253
  
    --- Diff: server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java ---
    @@ -685,6 +685,16 @@ public void finalizeStop(final VirtualMachineProfile profile, final Answer answe
         }
     
         @Override
    +    public boolean start() {
    +        return true;
    --- End diff --
    
    @harikrishna-patnala Hi Hari, can you explain what the changes are doing to fix the issue of multiple thread synchronisation ? Also, what happens across multiple mgmt servers since we don't have any distributed consensus implementation in place, I suppose the statcollector values might be different.


> Multiple threads are being used to collect the stats from the same VR
> ---------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9094
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9094
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server, Virtual Router
>    Affects Versions: 4.6.0
>            Reporter: Harikrishna Patnala
>            Assignee: Harikrishna Patnala
>             Fix For: 4.7.0
>
>
> From the logs we can see that the management server is sending the networkusagecommand to a VR twice within a very short interval. This doesn't have any impact on the network usage being reported, however it seems to consume direct agent threads unnecessarily.
> See the below snippet from the logs where networkusage command was sent to the same VR at the same time
> 2014-03-04 00:02:07,178 DEBUG [agent.manager.DirectAgentAttache] (DirectAgent-113:null) Seq 10-1242718973: Executing request
> 2014-03-04 00:02:07,482 DEBUG [agent.manager.DirectAgentAttache] (DirectAgent-113:null) Seq 10-1242718973: Response Received:
> 2014-03-04 00:02:07,482 DEBUG [agent.transport.Request] (DirectAgent-113:null) Seq 10-1242718973: Processing:  { Ans: , MgmtId: 144027776315500, via: 10, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-59-VM","bytesSent":2937782,"bytesReceived":114175352,"result":true,"details":"","wait":0}}] }
> 2014-03-04 00:02:07,482 DEBUG [agent.transport.Request] (RouterMonitor-1:null) Seq 10-1242718973: Received:  { Ans: , MgmtId: 144027776315500, via: 10, Ver: v1, Flags: 10, { NetworkUsageAnswer } }
> 2014-03-04 00:02:07,482 DEBUG [agent.manager.AgentManagerImpl] (RouterMonitor-1:null) Details from executing class com.cloud.agent.api.NetworkUsageCommand:
> 2014-03-04 00:02:07,198 DEBUG [agent.manager.DirectAgentAttache] (DirectAgent-244:null) Seq 10-1242718974: Executing request
> 2014-03-04 00:02:07,510 DEBUG [agent.manager.DirectAgentAttache] (DirectAgent-244:null) Seq 10-1242718974: Response Received:
> 2014-03-04 00:02:07,510 DEBUG [agent.transport.Request] (DirectAgent-244:null) Seq 10-1242718974: Processing:  { Ans: , MgmtId: 144027776315500, via: 10, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-59-VM","bytesSent":2937782,"bytesReceived":114175352,"result":true,"details":"","wait":0}}] }
> 2014-03-04 00:02:07,510 DEBUG [agent.transport.Request] (RouterMonitor-1:null) Seq 10-1242718974: Received:  { Ans: , MgmtId: 144027776315500, via: 10, Ver: v1, Flags: 10, { NetworkUsageAnswer } }
> 2014-03-04 00:02:07,510 DEBUG [agent.manager.AgentManagerImpl] (RouterMonitor-1:null) Details from executing class com.cloud.agent.api.NetworkUsageCommand:
> 2014-03-04 00:02:07,513 DEBUG [network.router.VirtualNetworkApplianceManagerImpl] (RouterMonitor-1:null) Router stats changed from the time NetworkUsageCommand was sent. Ignoring current answer. Router: r-59-VM Rcvd: 114175352Sent: 2937782
> 2014-03-04 00:02:07,514 DEBUG [db.Transaction.Transaction] (RouterMonitor-1:null) Rolling back the transaction: Time = 2 Name =  -VirtualNetworkApplianceManagerImpl$NetworkUsageTask.run:900-Executors$RunnableAdapter.call:471-FutureTask$Sync.innerRunAndReset:351-FutureTask.runAndReset:178-ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201:165-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:267-ThreadPoolExecutor.runWorker:1146-ThreadPoolExecutor$Worker.run:615-Thread.run:701; called by -Transaction.rollback:897-Transaction.removeUpTo:840-Transaction.close:664-VirtualNetworkApplianceManagerImpl$NetworkUsageTask.run:955-Executors$RunnableAdapter.call:471-FutureTask$Sync.innerRunAndReset:351-FutureTask.runAndReset:178-ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201:165-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:267-ThreadPoolExecutor.runWorker:1146-ThreadPoolExecutor$Worker.run:615-Thread.run:701



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