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:
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):
Once I noticed the differences, I tried to find the root cause in CsAddress.py
The following lines appear to be problematic.
After updating them to be the following (note the -i instead of -o on the second line), the network stats are back to normal: