=== modified file 'nova/network/linux_net.py' --- nova/network/linux_net.py 2011-05-21 07:00:58 +0000 +++ nova/network/linux_net.py 2011-05-30 11:49:41 +0000 @@ -63,6 +63,8 @@ 'dmz range that should be accepted') flags.DEFINE_string('dnsmasq_config_file', "", 'Override the default dnsmasq settings with this file') +flags.DEFINE_bool('iptables_debug', False, + 'Log a lot of iptables debugging stuff') binary_name = os.path.basename(inspect.stack()[-1][1]) @@ -293,9 +295,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)