=== modified file 'nova/network/linux_net.py'
--- nova/network/linux_net.py	2011-04-08 01:44:41 +0000
+++ nova/network/linux_net.py	2011-05-30 12:02:03 +0000
@@ -61,6 +61,8 @@
                     'if set, uses specific dns server for dnsmasq')
 flags.DEFINE_string('dmz_cidr', '10.128.0.0/24',
                     'dmz range that should be accepted')
+flags.DEFINE_bool('iptables_debug', False,
+                  'Log a lot of iptables debugging stuff')
 
 
 binary_name = os.path.basename(inspect.stack()[-1][1])
@@ -284,9 +286,15 @@
                                                 '%s-save' % (cmd,),
                                                 '-t', '%s' % (table,),
                                                 attempts=5)
+                if FLAGS.iptables_debug:
+                    LOG.info('Current stuff (table %s, %s) %s', table, cmd,
+                              current_table)
                 current_lines = current_table.split('\n')
                 new_filter = self._modify_rules(current_lines,
                                                 tables[table])
+                if FLAGS.iptables_debug:
+                    LOG.info('New stuff (table %s, %s) %s', table, cmd,
+                              '\n'.join(new_filter))
                 self.execute('sudo', '%s-restore' % (cmd,),
                              process_input='\n'.join(new_filter),
                              attempts=5)