]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix AttributeError in _clean_updated_sg_member_conntrack_entries()
authorBrian Haley <brian.haley@hp.com>
Tue, 25 Aug 2015 13:42:12 +0000 (09:42 -0400)
committerBrian Haley <brian.haley@hp.com>
Tue, 25 Aug 2015 13:42:12 +0000 (09:42 -0400)
The conntrack work that recently merged introduced a bug
due to an incorrect 'if' statement, it was only detecting
when one variable was not set instead of both, which can
cause an exception.  This is currently causing jenkins failures
with a number of other changes.

Introduced in Change Id Ibfd2d6a11aa970ea9e5009f4c4b858544d8b7463

Change-Id: I2519fdceefc9255c21d8226cdeffec40a7d444f6
Closes-bug: #1488284

neutron/agent/linux/iptables_firewall.py

index a55f07005e33449e38ac7cc45d8ea34a97de2715..a695733e89aed77c5b6fa28549244ad7e294411f 100644 (file)
@@ -757,7 +757,7 @@ class IptablesFirewallDriver(firewall.FirewallDriver):
             sec_group_change = False
             device_info = self.filtered_ports.get(device)
             pre_device_info = self._pre_defer_filtered_ports.get(device)
-            if not (device_info or pre_device_info):
+            if not device_info or not pre_device_info:
                 continue
             for sg_id in pre_device_info.get('security_groups', []):
                 if sg_id not in device_info.get('security_groups', []):