)]}'
{"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"0200e60b30fb00d01bd554004b185516eff44199","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_7f523b36","line":155,"updated":"2014-12-18 21:12:17.000000000","message":"Why does this happen at all, This sounds bad no?","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"cef5f492f66893497cd755d914a06dffb70291c8","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e87ae1ef","line":155,"in_reply_to":"3a961159_025abe29","updated":"2014-12-19 13:18:35.000000000","message":"@Brian, since it was my change that introduced this bug, I can take it over and try to track down the root cause while you are away.","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"15fb0bc233dc565257ed745056725d460543a973","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_025abe29","line":155,"in_reply_to":"3a961159_7f523b36","updated":"2014-12-18 21:17:09.000000000","message":"My guess is someone is calling remove_chain() on a parent chain then the children, and since it \"cascades\", the child had already been removed.  I simply don\u0027t have time to track that down today (leaving for 2 weeks), but wanted to at least get you past the gate issue.  I\u0027m happy to keep the bug open and track it down later, it will just take more time.  And we\u0027re only at K-1...","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"229e1c725535ef5be77408b0bd00de8a523b206c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fb134962","line":155,"in_reply_to":"3a961159_d53139ee","updated":"2014-12-23 11:11:25.000000000","message":"I have studied the logs on logstash and it seems that the warnings appear only for sg-chain and for spoof-filter chain.\n\nIn the first case, the warning concerning the sg-chain appears when the agent is started/restarted. When prepare_port_filter [0] is called it tries to delete all port chains including the sg-chain. But the iptables manager doesn\u0027t yet know that this chain already exists, so it throws a warning.\n\nAs for spoof-filter chain, I have encountered a situation with a warning when I booted an instance and then tried to delete it. In this case, a chain is attempted to be removed for both ipv4 and ipv6 [1] but the chain was created only for ipv4 [2], [3] so no chain was found for ipv6.\n\nThere was no cases when any chains had been deleted recursively. So I am not sure whether the situations like that cause enough trouble for a warning level and if anything needs to be fixed.\n\n[0] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/iptables_firewall.py#L83\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/iptables_firewall.py#L144\n\n[2] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/iptables_firewall.py#L266\n\n[3] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/iptables_firewall.py#L242","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ecf1686d68f07e6a41c87384714b354ee1cff26a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d53139ee","line":155,"in_reply_to":"3a961159_e87ae1ef","updated":"2014-12-19 13:59:04.000000000","message":"@Elena - thanks.  If you don\u0027t get to it I\u0027ll take a look in January.  I\u0027ll be keeping an eye on my review email every few days as well, can never completely unplug...","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"19e5de325cb0316f40f6200afd7680d7ecb181b0","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        chain_set \u003d self._select_chain_set(wrap)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if name not in chain_set:"},{"line_number":155,"context_line":"            LOG.debug(\u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":156,"context_line":"                      name)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_60951331","line":155,"in_reply_to":"3a961159_fb134962","updated":"2015-01-06 21:30:18.000000000","message":"Hi Elena,\n\nThanks for tracking this down.  So I think we can either leave this patch as-is (debug message), or just return as the previous code did, and just put a comment as to why this is OK.  I don\u0027t think we should leave this as a warning since that is a regression from before.","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"}],"neutron/tests/unit/test_iptables_manager.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fd8aae778c2acc6cec224329f2ade17546e94128","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    def test_remove_nonexistent_chain(self):"},{"line_number":820,"context_line":"        with mock.patch.object(iptables_manager, \"LOG\") as log:"},{"line_number":821,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(\u0027nonexistent\u0027)"},{"line_number":822,"context_line":"        log.debug.assert_called_once_with("},{"line_number":823,"context_line":"            \u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":824,"context_line":"            \u0027nonexistent\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5c14c94c","line":822,"updated":"2015-01-13 20:16:05.000000000","message":"Why do we need to check a debug log?\n\nimo, checking remove_chain doesn\u0027t crash on nonexistent chain removal is now enough.","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9dd3b6f848b97ced31b91c56e44c47d2600fd562","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    def test_remove_nonexistent_chain(self):"},{"line_number":820,"context_line":"        with mock.patch.object(iptables_manager, \"LOG\") as log:"},{"line_number":821,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(\u0027nonexistent\u0027)"},{"line_number":822,"context_line":"        log.debug.assert_called_once_with("},{"line_number":823,"context_line":"            \u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":824,"context_line":"            \u0027nonexistent\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_627e3e6c","line":822,"in_reply_to":"3a961159_5c14c94c","updated":"2015-01-13 20:55:50.000000000","message":"It wouldn\u0027t crash either way, but I could check that chain_set.remove() isn\u0027t called.\n\nDo you have an opinion on whether to even log a message in this case, or just make it debug?","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3f37f72b06a89a97390f03434bf0a9ca47805bc6","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    def test_remove_nonexistent_chain(self):"},{"line_number":820,"context_line":"        with mock.patch.object(iptables_manager, \"LOG\") as log:"},{"line_number":821,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(\u0027nonexistent\u0027)"},{"line_number":822,"context_line":"        log.debug.assert_called_once_with("},{"line_number":823,"context_line":"            \u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":824,"context_line":"            \u0027nonexistent\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a2a90627","line":822,"in_reply_to":"3a961159_627e3e6c","updated":"2015-01-13 21:16:30.000000000","message":"checking chain_set.remove() isn\u0027t called is perfect.\n\nI would still log as debug.","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0bbff0a3a7c8a6190dcfb8b65edcc66433674232","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    def test_remove_nonexistent_chain(self):"},{"line_number":820,"context_line":"        with mock.patch.object(iptables_manager, \"LOG\") as log:"},{"line_number":821,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(\u0027nonexistent\u0027)"},{"line_number":822,"context_line":"        log.debug.assert_called_once_with("},{"line_number":823,"context_line":"            \u0027Attempted to remove chain %s which does not exist\u0027,"},{"line_number":824,"context_line":"            \u0027nonexistent\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_feeac20c","line":822,"in_reply_to":"3a961159_a2a90627","updated":"2015-01-14 00:30:49.000000000","message":"Cedric - I don\u0027t see an obvious way to see if chain_set.remove() is called, using mock.Mock() as a return isn\u0027t cooperating.  I\u0027ll keep trying as there must be a way, but if you have a thought please let me know.","commit_id":"d5916f48665067a708e41501461a8c188da9da9b"}]}
