summaryrefslogtreecommitdiffstats
path: root/tools/hacking.py
diff options
context:
space:
mode:
authorBrian Haley <brian.haley@hp.com>2012-08-13 14:58:34 -0400
committerBrian Haley <brian.haley@hp.com>2012-08-15 15:10:45 -0400
commitd141e64de98f4e7eb0493d8f0a631f071b6e6dc1 (patch)
tree7ebbde23905a06d970e780e9579c4dfeeb933de7 /tools/hacking.py
parent40a34547198b8eb32e4afbcf57b5d8f9207b35f3 (diff)
downloadnova-d141e64de98f4e7eb0493d8f0a631f071b6e6dc1.tar.gz
nova-d141e64de98f4e7eb0493d8f0a631f071b6e6dc1.tar.xz
nova-d141e64de98f4e7eb0493d8f0a631f071b6e6dc1.zip
Change IPtablesManager to preserve packet:byte counts.
Modified IPtablesManager.apply() method to save/restore chain and rule packet:byte counts by using the '-c' flag with iptables-save and iptables-restore calls. Currently they are zeroed every time we change something in the table. This will allow users to better analyze usage for instances over an extended period of time, for example, for billing purposes. Change all applicable iptables, libvirt and Xen tests to account for the changes made to support the packet:byte counts. This work uncovered two bugs in the existing implementation found during my testing, specifically: 1. Fix IptablesManager to clean-up non-wrapped chains correctly, instead of leaving them in the kernel's table. We now keep a list of chains and rules we need to remove, and double-check in apply() that they are filtered-out. 2. Fix IptablesManager to honor "top=True" iptables rules by only adding non-top rules after we've gone through all the top rules first. Implements first work item of blueprint libvirt-network-usage. Fixes bug 1037127 and bug 1037137. Change-Id: Ia5a11aabbfb45b6c16c8d94757eeaa2041785b60
Diffstat (limited to 'tools/hacking.py')
0 files changed, 0 insertions, 0 deletions