From: Brian Haley Date: Tue, 25 Aug 2015 13:42:12 +0000 (-0400) Subject: Fix AttributeError in _clean_updated_sg_member_conntrack_entries() X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b939672d6bc84e7fb9c27857ee5e641f7c18aeb1;p=openstack-build%2Fneutron-build.git Fix AttributeError in _clean_updated_sg_member_conntrack_entries() 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 --- diff --git a/neutron/agent/linux/iptables_firewall.py b/neutron/agent/linux/iptables_firewall.py index a55f07005..a695733e8 100644 --- a/neutron/agent/linux/iptables_firewall.py +++ b/neutron/agent/linux/iptables_firewall.py @@ -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', []):