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-9431) Network usage stats from VR in VPC are wrong after upgrading to ACS 4.7
Date Mon, 25 Jul 2016 20:38:21 GMT

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

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

Commit 818063c8eefc66e60070089c29001a8b9caedabf in cloudstack's branch refs/heads/master from
[~williamstevens@gmail.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=818063c ]

Merge pull request #1616 from pdube/4.9-vr-iptables-fixes

Added missing rules on router config, fixed ordering of multiple rules, removed duplicate
rules, added fix for network stats, added a check for b64 decoding (to pad incorrect b64).
Also added a catch exception to be logged on the configure main.

https://issues.apache.org/jira/browse/CLOUDSTACK-9430
https://issues.apache.org/jira/browse/CLOUDSTACK-9431
https://issues.apache.org/jira/browse/CLOUDSTACK-9435
https://issues.apache.org/jira/browse/CLOUDSTACK-9440

* pr/1616:
  Added missing rules on router config, fixed ordering of multiple rules, removed duplicate
rules, added fix for network stats, added a check for b64 decoding (to pad incorrect b64).
Also added a catch exception to be logged on the configure main.

Signed-off-by: Will Stevens <williamstevens@gmail.com>


> Network usage stats from VR in VPC are wrong after upgrading to ACS 4.7
> -----------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9431
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9431
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Usage, Virtual Router
>    Affects Versions: 4.7.1
>            Reporter: Simon Godard
>            Assignee: Patrick D.
>
> After upgrading to ACS 4.7.1 and our Virtual routers to 4.6.0, we noticed that the Network
usage (bytes sent and received) were not good anymore. Bytes sent are now 0 and bytes received
appear to be what used to be bytes sent before the update.
> We are using Advanced networking with VPC on Xen Server 6.5.
> I have checked the CloudStack Java code that is handling retrieving the network stats
and nothing changed for a long time. What changed is the way the Virtual router is configured
(now using Python scripts). After comparing the previous _iptables_ rules, I noticed something
weird with the NETWORK_STATS_eth1 chain:
> {noformat}
> iptables -L NETWORK_STATS_eth1 -n -v -x
> Chain NETWORK_STATS_eth1 (1 references)
>     pkts      bytes    target      prot opt in     out     source               destination
        
>        0        0        all            --  *      eth1    0.0.0.0/0            10.188.216.0/24
    
>    47170  7755561        all            --  *      eth1    10.188.216.0/24      0.0.0.0/0
          
>        0        0        all            --  *      eth1    0.0.0.0/0            10.188.218.0/24
    
>    71957 689541123       all            --  *      eth1    10.188.218.0/24      0.0.0.0/0
 
> {noformat}
> The rules are out of order and the _in_ and _out_ too. Now, if we compare those rules
against the previous ones (version 4.4.4 of the VR):
> {noformat}
> iptables -L NETWORK_STATS_eth1 -n -v -x
> Chain NETWORK_STATS_eth1 (1 references)
>  pkts bytes target     prot opt in     out     source               destination     
   
> 35167 2673K            all  --  any    eth1    10.158.216.0/22      anywhere        
   
> 33036 2511K            all  --  eth1   any     anywhere             10.158.216.0/22 
   
> {noformat}
> Once I noticed the differences, I tried to find the root cause in CsAddress.py
> The following lines appear to be problematic.
> {noformat}
> self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -s %s" %
>                             ("eth1", "eth1", self.address['network'])])
> self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -d %s" %
>                             ("eth1", "eth1", self.address['network'])])
> {noformat}
> After updating them to be the following (note the -i instead of -o on the second line),
the network stats are back to normal:
> {noformat}
> self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -s %s" %
>                             ("eth1", "eth1", self.address['network'])])
> self.fw.append(["", "front", "-A NETWORK_STATS_%s -i %s -d %s" %
>                             ("eth1", "eth1", self.address['network'])])
> {noformat}



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

Mime
View raw message