From: Brian Haley Date: Thu, 18 Dec 2014 21:02:10 +0000 (-0500) Subject: Don't log a warning if an iptables chain doesn't exist X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b63755abd905f7e01c6e7d65887e5e0c7c01a45c;p=openstack-build%2Fneutron-build.git Don't log a warning if an iptables chain doesn't exist The iptables_manager remove_chain() function calls LOG.warn() if asked to remove a chain that it doesn't know about. This is spamming the neutron-full gate job pretty bad. Change to LOG.debug() since reverting the change that caused it is difficult since the FWaaS code has been split-out from the tree. Introduced in change 6eee93a98c67 Change-Id: Ieb20ae01137223110abf3c933e4981ff39055398 Closes-bug: #1404016 --- diff --git a/neutron/agent/linux/iptables_manager.py b/neutron/agent/linux/iptables_manager.py index ce8dae365..59d416cc8 100644 --- a/neutron/agent/linux/iptables_manager.py +++ b/neutron/agent/linux/iptables_manager.py @@ -152,8 +152,8 @@ class IptablesTable(object): chain_set = self._select_chain_set(wrap) if name not in chain_set: - LOG.warn(_LW('Attempted to remove chain %s which does not exist'), - name) + LOG.debug('Attempted to remove chain %s which does not exist', + name) return chain_set.remove(name) diff --git a/neutron/tests/unit/test_iptables_manager.py b/neutron/tests/unit/test_iptables_manager.py index 54fcf76dd..b4664ad69 100644 --- a/neutron/tests/unit/test_iptables_manager.py +++ b/neutron/tests/unit/test_iptables_manager.py @@ -803,7 +803,7 @@ class IptablesManagerStateFulTestCase(base.BaseTestCase): def test_remove_nonexistent_chain(self): with mock.patch.object(iptables_manager, "LOG") as log: self.iptables.ipv4['filter'].remove_chain('nonexistent') - log.warn.assert_called_once_with( + log.debug.assert_called_once_with( 'Attempted to remove chain %s which does not exist', 'nonexistent')