)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ffd29e36b36adc1153cdea6a34d5f5e5267dadd3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"preserving ordering of rules."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I690d8e69a34294a99997abbc4e1b749515c2700b"},{"line_number":13,"context_line":"Closes-Bug: #1607227"},{"line_number":14,"context_line":"Co-Authored-By: Sarath Chandra Mekala \u003cmekala.sarath@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bacf61ea_61423112","line":13,"updated":"2016-07-28 18:02:39.000000000","message":"My suggestion would be to target [1] instead.\n\nPartial-implements: blueprint waas-api-2.0\n\n[1] https://blueprints.launchpad.net/neutron/+spec/fwaas-api-2.0","commit_id":"3ae93177f121193c7136e2e68451e4f68d5f4c63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"77fb3de3dc69d7a4ce5a440bb1024d66201ee681","unresolved":false,"context_lines":[{"line_number":7,"context_line":"The Iptables manager and firewall driver in Neutron must be enhanced for"},{"line_number":8,"context_line":"co-existence of SecurityGroup and FWaaS v2 APIs.  This patch re-factors"},{"line_number":9,"context_line":"the IPTables driver for enabling FWaaS and SG chain to be interleaved"},{"line_number":10,"context_line":"preserving ordering of rules."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partial-Implements: blueprint fwaas-api-2.0"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ac371cc_7cf96fc8","line":10,"updated":"2016-08-15 06:15:31.000000000","message":"This commit message needs a lot more details explaining why the changes in this patch enable this coexistence because they appear to be a significant alteration to the way it currently works.\n\nThe current commit message implies that it\u0027s just a refactor of the code, but that\u0027s not the case because it\u0027s resulting in different rules. If there is a refactor required, I would suggest splitting the refactor into one patch (all of the components that don\u0027t actually change the resulting rules) and then put the rule changes in another patch to make it easier to review.","commit_id":"47920fded5a02cab4d45695015153430697019e7"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"c588f25a041051185fc52065a493c7e624818766","unresolved":false,"context_lines":[{"line_number":7,"context_line":"The Iptables manager and firewall driver in Neutron must be enhanced for"},{"line_number":8,"context_line":"co-existence of SecurityGroup and FWaaS v2 APIs.  This patch re-factors"},{"line_number":9,"context_line":"the IPTables driver for enabling FWaaS and SG chain to be interleaved"},{"line_number":10,"context_line":"preserving ordering of rules."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partial-Implements: blueprint fwaas-api-2.0"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ac371cc_09a45ba4","line":10,"in_reply_to":"3ac371cc_7cf96fc8","updated":"2016-08-15 17:44:16.000000000","message":"Also, this first line is waaaay too long.  Please keep the first line to 50 characters or less.  See: https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"47920fded5a02cab4d45695015153430697019e7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"FwaaS V2 will manage both L3 and L2 ports. While managing the L2 ports"},{"line_number":10,"context_line":"it has to co-exist with SG rules. This patch enhances IPTables manager"},{"line_number":11,"context_line":"to solves the problem of rule contention and ordering by creating"},{"line_number":12,"context_line":"common intermediary chains for the filter table."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"All packets in the filter table are redirected to this common"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1a430d35_3af46b59","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":9},"updated":"2017-02-08 19:30:10.000000000","message":"solve","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"FwaaS V2 will manage both L3 and L2 ports. While managing the L2 ports"},{"line_number":10,"context_line":"it has to co-exist with SG rules. This patch enhances IPTables manager"},{"line_number":11,"context_line":"to solves the problem of rule contention and ordering by creating"},{"line_number":12,"context_line":"common intermediary chains for the filter table."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"All packets in the filter table are redirected to this common"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1a430d35_65c38a39","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":9},"in_reply_to":"1a430d35_3af46b59","updated":"2017-02-09 16:41:53.000000000","message":"Thanks, will update","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":17,"context_line":"are used by SG and FwaaS drivers for populating interface specific rules."},{"line_number":18,"context_line":"Once the packets are filtered by both SG and FWaaS chains they are sent"},{"line_number":19,"context_line":"to an intermediary accept chain where the packets are matched against"},{"line_number":20,"context_line":"SG and FWaaS accept rules."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"You can refer to the following google doc for the discussion leading"},{"line_number":23,"context_line":"to this design:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1a430d35_a4d3e1d3","line":20,"updated":"2017-02-08 19:30:10.000000000","message":"I want this design captured in devref.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"are used by SG and FwaaS drivers for populating interface specific rules."},{"line_number":18,"context_line":"Once the packets are filtered by both SG and FWaaS chains they are sent"},{"line_number":19,"context_line":"to an intermediary accept chain where the packets are matched against"},{"line_number":20,"context_line":"SG and FWaaS accept rules."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"You can refer to the following google doc for the discussion leading"},{"line_number":23,"context_line":"to this design:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1a430d35_05b486cf","line":20,"in_reply_to":"1a430d35_a4d3e1d3","updated":"2017-02-09 16:41:53.000000000","message":"Sure, I agree we need a devref for this change.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            DEFAULT_ADDRESS_SCOPE: self.available_mark_ids.pop()}"},{"line_number":70,"context_line":"        self.iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":71,"context_line":"            use_ipv6\u003duse_ipv6,"},{"line_number":72,"context_line":"            binary_name\u003d\u0027neutron-fw\u0027,"},{"line_number":73,"context_line":"            namespace\u003dself.ns_name)"},{"line_number":74,"context_line":"        self.initialize_address_scope_iptables()"},{"line_number":75,"context_line":"        self.routes \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_aecca0bb","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":37},"updated":"2017-02-08 19:30:10.000000000","message":"does it suggest that you still leave place for clash between base l3 rules, and fwaas rules?\n\nAlso, have you thought about making the design a bit more flexible, so that fwaas requests a table from the manager instead of us always allocating one even if we don\u0027t need it?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            DEFAULT_ADDRESS_SCOPE: self.available_mark_ids.pop()}"},{"line_number":70,"context_line":"        self.iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":71,"context_line":"            use_ipv6\u003duse_ipv6,"},{"line_number":72,"context_line":"            binary_name\u003d\u0027neutron-fw\u0027,"},{"line_number":73,"context_line":"            namespace\u003dself.ns_name)"},{"line_number":74,"context_line":"        self.initialize_address_scope_iptables()"},{"line_number":75,"context_line":"        self.routes \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_a52ad22d","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":37},"in_reply_to":"1a430d35_aecca0bb","updated":"2017-02-09 16:41:53.000000000","message":"I did not fully understand the base l3 rule part but Yes, agree about the flexibility comment. As I mentioned, we started with an intention to keep the patch short and simple, but I am open to suggestions.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"}],"neutron/agent/linux/iptables_comments.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":35,"context_line":"PORT_SEC_ACCEPT \u003d \u0027Accept all packets when port security is disabled.\u0027"},{"line_number":36,"context_line":"IPV6_RA_DROP \u003d \u0027Drop IPv6 Router Advts from VM Instance.\u0027"},{"line_number":37,"context_line":"IPV6_ICMP_ALLOW \u003d \u0027Allow IPv6 ICMP traffic.\u0027"},{"line_number":38,"context_line":"INTF_ACCEPT \u003d \u0027Accept rule per iface and direction\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_c6b85fe8","line":38,"updated":"2017-01-20 17:11:10.000000000","message":"I would use the whole word, \u0027interface\u0027. Also, missing trailing period as other comments have.","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"PORT_SEC_ACCEPT \u003d \u0027Accept all packets when port security is disabled.\u0027"},{"line_number":36,"context_line":"IPV6_RA_DROP \u003d \u0027Drop IPv6 Router Advts from VM Instance.\u0027"},{"line_number":37,"context_line":"IPV6_ICMP_ALLOW \u003d \u0027Allow IPv6 ICMP traffic.\u0027"},{"line_number":38,"context_line":"INTF_ACCEPT \u003d \u0027Accept rule per iface and direction\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_1c839899","line":38,"in_reply_to":"5a3905b3_c6b85fe8","updated":"2017-01-20 18:22:22.000000000","message":"Done","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"}],"neutron/agent/linux/iptables_firewall.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ebe1d1f69911b5a297c4e64ddffa71caa24e5f3f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    def __init__(self, namespace\u003dNone):"},{"line_number":68,"context_line":"        self.iptables \u003d iptables_manager.IptablesManager("},{"line_number":69,"context_line":"            use_ipv6\u003dipv6_utils.is_enabled(),"},{"line_number":70,"context_line":"            namespace\u003dnamespace, binary_name\u003d\u0027neutron-common\u0027)"},{"line_number":71,"context_line":"        # TODO(majopela, shihanzhang): refactor out ipset to a separate"},{"line_number":72,"context_line":"        # driver composed over this one"},{"line_number":73,"context_line":"        self.ipset \u003d ipset_manager.IpsetManager(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5da102_d21df673","line":70,"updated":"2016-11-03 20:16:41.000000000","message":"I don\u0027t see where binary_name is being used","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"41b5953b10de1f6138c875cddd265b03734e944c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    def __init__(self, namespace\u003dNone):"},{"line_number":68,"context_line":"        self.iptables \u003d iptables_manager.IptablesManager("},{"line_number":69,"context_line":"            use_ipv6\u003dipv6_utils.is_enabled(),"},{"line_number":70,"context_line":"            namespace\u003dnamespace, binary_name\u003d\u0027neutron-common\u0027)"},{"line_number":71,"context_line":"        # TODO(majopela, shihanzhang): refactor out ipset to a separate"},{"line_number":72,"context_line":"        # driver composed over this one"},{"line_number":73,"context_line":"        self.ipset \u003d ipset_manager.IpsetManager(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5da102_ef276c60","line":70,"in_reply_to":"ba5da102_d21df673","updated":"2016-11-04 03:14:55.000000000","message":"It is used for generating the wrapped names for chains/rules.\nYou can get a better context in the answer to your next question.","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e89f8cce8d0e33d2ce34f823bb1d74cc1a314193","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                              comment\u003dic.PORT_SEC_ACCEPT)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                self._remove_rule_from_chain_v4v6("},{"line_number":323,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":326,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_65132d0e","line":323,"updated":"2016-11-16 03:43:49.000000000","message":"But this doesn\u0027t make sense to me. Wouldn\u0027t wrap\u003dFalse imply that we don\u0027t want the wrap to be applied?\n\nIf so, I don\u0027t understand how that\u0027s related to the extension based mechanism. With the extension mechanism shouldn\u0027t everything running have the same binary_name?","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ebe1d1f69911b5a297c4e64ddffa71caa24e5f3f","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                              comment\u003dic.PORT_SEC_ACCEPT)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                self._remove_rule_from_chain_v4v6("},{"line_number":323,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":326,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5da102_f2103a5b","line":323,"updated":"2016-11-03 20:16:41.000000000","message":"can you provide some context to why we need to pass this wrap parameter everywhere now? It seems like most are just passing directly through which hints that there might be a better way to do this with a property on the manager itself or something.","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"9d997820af88bb94e2d2db2072fc03debfce5aec","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                              comment\u003dic.PORT_SEC_ACCEPT)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                self._remove_rule_from_chain_v4v6("},{"line_number":323,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":326,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_bbbac821","line":323,"in_reply_to":"7a77a97e_65132d0e","updated":"2016-11-16 05:02:36.000000000","message":"Yes Kevin,\n\nYou are right in both the cases, wrap is false because we dont want to wrap the rule and in case of extensions both SG and FWaaS will have the same binary name.\n\nOur aim is to to keep the rules generated by SG and FWaaS separate, but as using the wrap (binary name) will produce the same chain/rule name, we disabled the wrapping and instead added the chain/rule name manually.","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e2e06a3041c1867e30b08f77f0e1ac7568240ada","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                              comment\u003dic.PORT_SEC_ACCEPT)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                self._remove_rule_from_chain_v4v6("},{"line_number":323,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":326,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_9202460a","line":323,"in_reply_to":"7a77a97e_bbbac821","updated":"2016-11-16 09:42:18.000000000","message":"If they have the same binary name, then why do you need to disable wrapping?","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"41b5953b10de1f6138c875cddd265b03734e944c","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                                              comment\u003dic.PORT_SEC_ACCEPT)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                self._remove_rule_from_chain_v4v6("},{"line_number":323,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":326,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5da102_0f758062","line":323,"in_reply_to":"ba5da102_f2103a5b","updated":"2016-11-04 03:14:55.000000000","message":"Hello Kevin,\n\nThe original design of the Iptables manager was to allow multiple processes to manage iptables chain and rules, the wrap was a means to distinguish the chains and rules from different processes, the wrap name was derived from the name of the process(binary name). \n\nNow we have moved to a extension based mechanism(fwaas as l2/l3 agent extension) which means that the process name remains the same although the chains/rules are generated by different extensions. This is why the wrap is false in a lot of these calls, as the wrap name is no longer able to distinguish the chains/rules generated by extensions.","commit_id":"964f88019e14582fab5c779a626d7e6e805e341c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                                     self.unfiltered_ports)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _setup_chains_apply(self, ports, unfiltered_ports):"},{"line_number":242,"context_line":"        self._add_chain_by_name_v4v6(\u0027common\u0027)"},{"line_number":243,"context_line":"        # sort by port so we always do this deterministically between"},{"line_number":244,"context_line":"        # agent restarts and don\u0027t cause unnecessary rule differences"},{"line_number":245,"context_line":"        for pname in sorted(ports):"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_4652afde","line":242,"updated":"2017-01-20 17:11:10.000000000","message":"nit: define COMMON_CHAIN above ?  But then there\u0027s other things like \u0027fallback\u0027 that don\u0027t do this either.","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                                     self.unfiltered_ports)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _setup_chains_apply(self, ports, unfiltered_ports):"},{"line_number":242,"context_line":"        self._add_chain_by_name_v4v6(\u0027common\u0027)"},{"line_number":243,"context_line":"        # sort by port so we always do this deterministically between"},{"line_number":244,"context_line":"        # agent restarts and don\u0027t cause unnecessary rule differences"},{"line_number":245,"context_line":"        for pname in sorted(ports):"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_174d336c","line":242,"in_reply_to":"5a3905b3_4652afde","updated":"2017-01-20 18:22:22.000000000","message":"Done","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].add_chain(chain_name)"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def _add_chain_by_name_v4v6(self, chain_name, wrap\u003dTrue):"},{"line_number":293,"context_line":"        if not wrap:"},{"line_number":294,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].add_chain(chain_name, wrap\u003dFalse)"},{"line_number":295,"context_line":"            self.iptables.ipv6[\u0027filter\u0027].add_chain(chain_name, wrap\u003dFalse)"},{"line_number":296,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_266e8395","line":293,"updated":"2017-01-20 17:11:10.000000000","message":"Why is this checked here and not just passed as \u0027wrap\u003dwrap\u0027 ?","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].add_chain(chain_name)"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def _add_chain_by_name_v4v6(self, chain_name, wrap\u003dTrue):"},{"line_number":293,"context_line":"        if not wrap:"},{"line_number":294,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].add_chain(chain_name, wrap\u003dFalse)"},{"line_number":295,"context_line":"            self.iptables.ipv6[\u0027filter\u0027].add_chain(chain_name, wrap\u003dFalse)"},{"line_number":296,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_97cbe3a4","line":293,"in_reply_to":"5a3905b3_266e8395","updated":"2017-01-20 18:22:22.000000000","message":"Done","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":363,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":364,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"},{"line_number":365,"context_line":"        self._add_chain_by_name_v4v6(chain_name)"},{"line_number":366,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_863017a0","line":363,"updated":"2017-01-20 17:11:10.000000000","message":"leftover","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                    \u0027neutron-sg-INPUT\u0027, jump_rule, jump_rule, wrap\u003dFalse)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _add_chain(self, port, direction):"},{"line_number":363,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":364,"context_line":"        chain_name \u003d self._port_chain_name(port, direction)"},{"line_number":365,"context_line":"        self._add_chain_by_name_v4v6(chain_name)"},{"line_number":366,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_f7c0a77e","line":363,"in_reply_to":"5a3905b3_863017a0","updated":"2017-01-20 18:22:22.000000000","message":"Done","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        else:"},{"line_number":449,"context_line":"            mac_ipv6_pairs.append((mac, ip_address))"},{"line_number":450,"context_line":"            lla \u003d str(netutils.get_ipv6_addr_by_EUI64("},{"line_number":451,"context_line":"                      constants.IPv6_LLA_PREFIX, mac))"},{"line_number":452,"context_line":"            if (mac, lla) not in mac_ipv6_pairs:"},{"line_number":453,"context_line":"                # only add once so we don\u0027t generate duplicate rules"},{"line_number":454,"context_line":"                mac_ipv6_pairs.append((mac, lla))"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_46170fed","line":451,"updated":"2017-01-20 17:11:10.000000000","message":"random whitespace change?","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        else:"},{"line_number":449,"context_line":"            mac_ipv6_pairs.append((mac, ip_address))"},{"line_number":450,"context_line":"            lla \u003d str(netutils.get_ipv6_addr_by_EUI64("},{"line_number":451,"context_line":"                      constants.IPv6_LLA_PREFIX, mac))"},{"line_number":452,"context_line":"            if (mac, lla) not in mac_ipv6_pairs:"},{"line_number":453,"context_line":"                # only add once so we don\u0027t generate duplicate rules"},{"line_number":454,"context_line":"                mac_ipv6_pairs.append((mac, lla))"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_d7a48ba7","line":451,"in_reply_to":"5a3905b3_46170fed","updated":"2017-01-20 18:22:22.000000000","message":"I am guessing that this was done in an attempt to look more pep8-ish, even though it is not needed for pep8.  Undone.","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5af0615c3c997c670f3a56ac1290a0f445bc77ac","unresolved":false,"context_lines":[{"line_number":929,"context_line":""},{"line_number":930,"context_line":"    def _add_raw_chain_rules(self, port, direction):"},{"line_number":931,"context_line":"        jump_rule \u003d self._get_jump_rule(port, direction)"},{"line_number":932,"context_line":"        self.iptables.ipv4[\u0027raw\u0027].add_rule(\u0027neutron-sg-PREROUTING\u0027, jump_rule,"},{"line_number":933,"context_line":"                                           wrap\u003dFalse)"},{"line_number":934,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].add_rule(\u0027neutron-sg-PREROUTING\u0027, jump_rule,"},{"line_number":935,"context_line":"                                           wrap\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_e6e8fbe4","line":932,"updated":"2017-01-20 17:11:10.000000000","message":"perhaps \u0027%s-PREROUTING\u0027 % SG_CHAIN","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"45a29b611b24681f9d8a99a342ddc887b1693c0b","unresolved":false,"context_lines":[{"line_number":929,"context_line":""},{"line_number":930,"context_line":"    def _add_raw_chain_rules(self, port, direction):"},{"line_number":931,"context_line":"        jump_rule \u003d self._get_jump_rule(port, direction)"},{"line_number":932,"context_line":"        self.iptables.ipv4[\u0027raw\u0027].add_rule(\u0027neutron-sg-PREROUTING\u0027, jump_rule,"},{"line_number":933,"context_line":"                                           wrap\u003dFalse)"},{"line_number":934,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].add_rule(\u0027neutron-sg-PREROUTING\u0027, jump_rule,"},{"line_number":935,"context_line":"                                           wrap\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_97ff6366","line":932,"in_reply_to":"5a3905b3_e6e8fbe4","updated":"2017-01-20 18:22:22.000000000","message":"Done","commit_id":"254593a8ca80ef5d86b682e57b7e80d9043dc05f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self._update_port_sec_rules(port, direction, add\u003dFalse)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def _remove_rule_from_chain_v4v6(self, chain_name, ipv4_rules, ipv6_rules,"},{"line_number":226,"context_line":"                                     wrap\u003dTrue):"},{"line_number":227,"context_line":"        for rule in ipv4_rules:"},{"line_number":228,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_rule(chain_name, rule,"},{"line_number":229,"context_line":"                                                     wrap\u003dwrap)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_449ebdb9","line":226,"range":{"start_line":226,"start_character":37,"end_line":226,"end_character":46},"updated":"2017-02-08 19:30:10.000000000","message":"it\u0027s probably just me, and I fully admit iptables manager was never my expertise, but I miss the logic behind those wrap\u003d arguments included in the patch. Could you please clarify that in the commit message what\u0027s the goal here?\n\n(Looking at all the places where you pass wrap\u003dFalse) Is there any place in the code where we actually want to wrap now? Why?\n\nI understand a log of ugliness here probably comes from the technical debt we already have in the code...","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self._update_port_sec_rules(port, direction, add\u003dFalse)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def _remove_rule_from_chain_v4v6(self, chain_name, ipv4_rules, ipv6_rules,"},{"line_number":226,"context_line":"                                     wrap\u003dTrue):"},{"line_number":227,"context_line":"        for rule in ipv4_rules:"},{"line_number":228,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_rule(chain_name, rule,"},{"line_number":229,"context_line":"                                                     wrap\u003dwrap)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_6b19a179","line":226,"range":{"start_line":226,"start_character":37,"end_line":226,"end_character":46},"in_reply_to":"1a430d35_449ebdb9","updated":"2017-02-09 16:41:53.000000000","message":"The wrap mechanism was introduced with the idea of allowing different processes to create their own chains without stepping on each others rules. Wrapping (by default) prefixes the chain name with the binary name of the process  \n\nBut there are 2 problems:\n\n1. Today we don\u0027t have separate processes but different components of the same process creating the rules(FWaaS v2 and SG are both applied by l2 agent process). In this patch I am overriding the default wrap name with component prefixes.\n\n2. There was no common jump point to branch out to different tables for rule processing. e.g. the INPUT chain should jump to common chain, from common the control can jump to FWaaS and SG specific tables for processing and finally converge back to a common ACCEPT table that should allow traffic. The common chains cannot be wrapped as they are common to both components hence a lot of calls have the wrap\u003dFalse.\n\n\nWe started with the simplest implementation, but are open to ideas and collaboration, and all feedback (as you already pointed out about flexibility) are very welcome.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e3dd4bd18a4f919589ca824b9c2566d9b2efaff0","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        chain_name \u003d self._port_chain_name(port, DIRECTION)"},{"line_number":278,"context_line":"        self._remove_chain_by_name_v4v6(chain_name)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if DIRECTION not in self.IPTABLES_DIRECTION:"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        device \u003d self._get_device_name(port)"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_6cf77cf5","line":280,"updated":"2017-02-07 03:02:14.000000000","message":"Why would there be a direction not in that map? Is this something we really want to silently ignore?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"3edad9339f584ab66ac1fd0c407d74ed71c75443","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        chain_name \u003d self._port_chain_name(port, DIRECTION)"},{"line_number":278,"context_line":"        self._remove_chain_by_name_v4v6(chain_name)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if DIRECTION not in self.IPTABLES_DIRECTION:"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        device \u003d self._get_device_name(port)"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_bb719778","line":280,"in_reply_to":"1a430d35_6cf77cf5","updated":"2017-02-07 04:17:35.000000000","message":"I was trying to skip the SPOOF_FILTER, may be I should put a comment","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        device \u003d self._get_device_name(port)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        jump_rule \u003d [\u0027-m physdev --%s %s --physdev-is-bridged \u0027"},{"line_number":285,"context_line":"                     \u0027-j ACCEPT\u0027 % (self.IPTABLES_DIRECTION[DIRECTION],"},{"line_number":286,"context_line":"                                    device)]"},{"line_number":287,"context_line":"        self._remove_rule_from_chain_v4v6(\u0027neutron-sg-ACCEPT\u0027, jump_rule,"},{"line_number":288,"context_line":"                                          jump_rule, wrap\u003dFalse)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_919e2505","line":286,"range":{"start_line":284,"start_character":8,"end_line":286,"end_character":44},"updated":"2017-02-08 19:30:10.000000000","message":"(No action required) we have other places where we construct the same string, so maybe it\u0027s time to decouple it into a ._get_jump_rule(device, direction)","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        device \u003d self._get_device_name(port)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        jump_rule \u003d [\u0027-m physdev --%s %s --physdev-is-bridged \u0027"},{"line_number":285,"context_line":"                     \u0027-j ACCEPT\u0027 % (self.IPTABLES_DIRECTION[DIRECTION],"},{"line_number":286,"context_line":"                                    device)]"},{"line_number":287,"context_line":"        self._remove_rule_from_chain_v4v6(\u0027neutron-sg-ACCEPT\u0027, jump_rule,"},{"line_number":288,"context_line":"                                          jump_rule, wrap\u003dFalse)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_055e4676","line":286,"range":{"start_line":284,"start_character":8,"end_line":286,"end_character":44},"in_reply_to":"1a430d35_919e2505","updated":"2017-02-09 16:41:53.000000000","message":"Sure, will update the patch","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        jump_rule \u003d [\u0027-m physdev --%s %s --physdev-is-bridged \u0027"},{"line_number":285,"context_line":"                     \u0027-j ACCEPT\u0027 % (self.IPTABLES_DIRECTION[DIRECTION],"},{"line_number":286,"context_line":"                                    device)]"},{"line_number":287,"context_line":"        self._remove_rule_from_chain_v4v6(\u0027neutron-sg-ACCEPT\u0027, jump_rule,"},{"line_number":288,"context_line":"                                          jump_rule, wrap\u003dFalse)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _add_fallback_chain_v4v6(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_51859d57","line":287,"range":{"start_line":287,"start_character":42,"end_line":287,"end_character":61},"updated":"2017-02-08 19:30:10.000000000","message":"\u0027%s-ACCEPT\u0027 % SG_CHAIN though I would suggest we keep the chain name constructed in a single place, like having a helper method called .get_chain_name(\u0027ACCEPT\u0027) that would do the squash. It may help in the future with refactoring and other pipeline design changes.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        jump_rule \u003d [\u0027-m physdev --%s %s --physdev-is-bridged \u0027"},{"line_number":285,"context_line":"                     \u0027-j ACCEPT\u0027 % (self.IPTABLES_DIRECTION[DIRECTION],"},{"line_number":286,"context_line":"                                    device)]"},{"line_number":287,"context_line":"        self._remove_rule_from_chain_v4v6(\u0027neutron-sg-ACCEPT\u0027, jump_rule,"},{"line_number":288,"context_line":"                                          jump_rule, wrap\u003dFalse)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _add_fallback_chain_v4v6(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_c5f19e6c","line":287,"range":{"start_line":287,"start_character":42,"end_line":287,"end_character":61},"in_reply_to":"1a430d35_51859d57","updated":"2017-02-09 16:41:53.000000000","message":"Agree with your comment, will update","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e3dd4bd18a4f919589ca824b9c2566d9b2efaff0","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        self.iptables.ipv4[\u0027raw\u0027].remove_chain(chain_name)"},{"line_number":308,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].remove_chain(chain_name)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _remove_chain_by_name_v4v6(self, chain_name, wrap\u003dTrue):"},{"line_number":311,"context_line":"        if not wrap:"},{"line_number":312,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(chain_name, wrap\u003dFalse)"},{"line_number":313,"context_line":"            self.iptables.ipv6[\u0027filter\u0027].remove_chain(chain_name, wrap\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_8cde686b","line":310,"updated":"2017-02-07 03:02:14.000000000","message":"if remove_chain takes a \u0027wrap\u0027 kwarg, why not just pass that directly through?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"3edad9339f584ab66ac1fd0c407d74ed71c75443","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        self.iptables.ipv4[\u0027raw\u0027].remove_chain(chain_name)"},{"line_number":308,"context_line":"        self.iptables.ipv6[\u0027raw\u0027].remove_chain(chain_name)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _remove_chain_by_name_v4v6(self, chain_name, wrap\u003dTrue):"},{"line_number":311,"context_line":"        if not wrap:"},{"line_number":312,"context_line":"            self.iptables.ipv4[\u0027filter\u0027].remove_chain(chain_name, wrap\u003dFalse)"},{"line_number":313,"context_line":"            self.iptables.ipv6[\u0027filter\u0027].remove_chain(chain_name, wrap\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_5b0d13e7","line":310,"in_reply_to":"1a430d35_8cde686b","updated":"2017-02-07 04:17:35.000000000","message":"Agree, I will fix it.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        for rule in ipv6_rules:"},{"line_number":330,"context_line":"            if not wrap:"},{"line_number":331,"context_line":"                self.iptables.ipv6[\u0027filter\u0027].add_rule(chain_name, rule,"},{"line_number":332,"context_line":"                                                      wrap\u003dFalse,"},{"line_number":333,"context_line":"                                                      comment\u003dcomment)"},{"line_number":334,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_44295d89","line":331,"updated":"2017-02-08 19:30:10.000000000","message":"same comment as Kevin\u0027s for remove_chain: why not just passing wrap\u003d as-is into add_rule?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        for rule in ipv6_rules:"},{"line_number":330,"context_line":"            if not wrap:"},{"line_number":331,"context_line":"                self.iptables.ipv6[\u0027filter\u0027].add_rule(chain_name, rule,"},{"line_number":332,"context_line":"                                                      wrap\u003dFalse,"},{"line_number":333,"context_line":"                                                      comment\u003dcomment)"},{"line_number":334,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_a5bad26f","line":331,"in_reply_to":"1a430d35_44295d89","updated":"2017-02-09 16:41:53.000000000","message":"Yes, will update patch","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"}],"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":20079,"name":"Ha Van Tu","email":"tuhv@vn.fujitsu.com","username":"tuhv"},"change_message_id":"a24d388442d3edd4a9e4e8cbb59f8a0e390bf46f","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            # FWaaS v2.0 Changes"},{"line_number":366,"context_line":"            # Common Chains with ordering"},{"line_number":367,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027ACCEPT\u0027)"},{"line_number":368,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j $FORWARD\u0027, wrap\u003dFalse)"},{"line_number":369,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j $ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            filter_chains \u003d [\u0027INPUT\u0027, \u0027FORWARD\u0027, \u0027OUTPUT\u0027, \u0027ACCEPT\u0027]"},{"line_number":372,"context_line":"            filter_components \u003d [\u0027sg\u0027, \u0027fw\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_820b192b","line":369,"range":{"start_line":368,"start_character":12,"end_line":369,"end_character":74},"updated":"2016-08-19 06:44:11.000000000","message":"Both SG driver and FWaaSv2 driver have the common chains here. I wonder a case like that: When SG and FWaaSv2 running in parallel, if FWaaSv2 stop suddenly, will these common chains be removed?","commit_id":"fb4fff58c5354d95624241e116541455549f1ced"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7e071e18aa618a2ec89373a3ce4b6842402a3910","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            # FWaaS v2.0 Changes"},{"line_number":366,"context_line":"            # Common Chains with ordering"},{"line_number":367,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027ACCEPT\u0027)"},{"line_number":368,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j $FORWARD\u0027, wrap\u003dFalse)"},{"line_number":369,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j $ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            filter_chains \u003d [\u0027INPUT\u0027, \u0027FORWARD\u0027, \u0027OUTPUT\u0027, \u0027ACCEPT\u0027]"},{"line_number":372,"context_line":"            filter_components \u003d [\u0027sg\u0027, \u0027fw\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ac06dbe_6f136f5d","line":369,"range":{"start_line":368,"start_character":12,"end_line":369,"end_character":74},"in_reply_to":"3ac371cc_820b192b","updated":"2016-08-22 04:14:49.000000000","message":"No, as the common chains are part of the IPTables Manager module, the common tables will not be removed.","commit_id":"fb4fff58c5354d95624241e116541455549f1ced"},{"author":{"_account_id":20079,"name":"Ha Van Tu","email":"tuhv@vn.fujitsu.com","username":"tuhv"},"change_message_id":"a24d388442d3edd4a9e4e8cbb59f8a0e390bf46f","unresolved":false,"context_lines":[{"line_number":712,"context_line":"    # NOTE(kevinbenton): sorting and grouping chains is for determinism in"},{"line_number":713,"context_line":"    # tests. iptables doesn\u0027t care about the order here"},{"line_number":714,"context_line":"    statements \u003d [\u0027:%s - [0:0]\u0027 % c for c in sorted(new_chains - old_chains)]"},{"line_number":715,"context_line":"    sg_chains \u003d []"},{"line_number":716,"context_line":"    other_chains \u003d []"},{"line_number":717,"context_line":"    for chain in sorted(old_chains | new_chains):"},{"line_number":718,"context_line":"        if \u0027-sg-\u0027 in chain or \u0027-fw-\u0027 in chain:"},{"line_number":719,"context_line":"            sg_chains.append(chain)"},{"line_number":720,"context_line":"        else:"},{"line_number":721,"context_line":"            other_chains.append(chain)"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"    for chain in other_chains + sg_chains:"},{"line_number":724,"context_line":"        statements +\u003d _generate_chain_diff_iptables_commands("},{"line_number":725,"context_line":"            chain, old_by_chain[chain], new_by_chain[chain])"},{"line_number":726,"context_line":"    # unreferenced chains get the axe"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_0281e94d","line":723,"range":{"start_line":715,"start_character":4,"end_line":723,"end_character":42},"updated":"2016-08-19 06:44:11.000000000","message":"I think it should be simple as below:\nfor chain in sorted(old_chains | new_chains):","commit_id":"fb4fff58c5354d95624241e116541455549f1ced"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7e071e18aa618a2ec89373a3ce4b6842402a3910","unresolved":false,"context_lines":[{"line_number":712,"context_line":"    # NOTE(kevinbenton): sorting and grouping chains is for determinism in"},{"line_number":713,"context_line":"    # tests. iptables doesn\u0027t care about the order here"},{"line_number":714,"context_line":"    statements \u003d [\u0027:%s - [0:0]\u0027 % c for c in sorted(new_chains - old_chains)]"},{"line_number":715,"context_line":"    sg_chains \u003d []"},{"line_number":716,"context_line":"    other_chains \u003d []"},{"line_number":717,"context_line":"    for chain in sorted(old_chains | new_chains):"},{"line_number":718,"context_line":"        if \u0027-sg-\u0027 in chain or \u0027-fw-\u0027 in chain:"},{"line_number":719,"context_line":"            sg_chains.append(chain)"},{"line_number":720,"context_line":"        else:"},{"line_number":721,"context_line":"            other_chains.append(chain)"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"    for chain in other_chains + sg_chains:"},{"line_number":724,"context_line":"        statements +\u003d _generate_chain_diff_iptables_commands("},{"line_number":725,"context_line":"            chain, old_by_chain[chain], new_by_chain[chain])"},{"line_number":726,"context_line":"    # unreferenced chains get the axe"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ac06dbe_804f62bc","line":723,"range":{"start_line":715,"start_character":4,"end_line":723,"end_character":42},"in_reply_to":"3ac371cc_0281e94d","updated":"2016-08-22 04:14:49.000000000","message":"The idea was to overlay the FW and SG chains on top of existing rules. Normally there are firewall rules inserted by Nova","commit_id":"fb4fff58c5354d95624241e116541455549f1ced"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027OUTPUT\u0027, \u0027-j neutron-filter-top\u0027,"},{"line_number":320,"context_line":"                                      wrap\u003dFalse, top\u003dTrue)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-local\u0027, wrap\u003dFalse)"},{"line_number":323,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027neutron-filter-top\u0027,"},{"line_number":324,"context_line":"                                      \u0027-j neutron-common-local\u0027, wrap\u003dFalse)"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_0493d5fa","line":322,"updated":"2017-02-08 19:30:10.000000000","message":"please describe in a comment the intent of the -local chain, as it\u0027s done in lines 312-314 for -top","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027OUTPUT\u0027, \u0027-j neutron-filter-top\u0027,"},{"line_number":320,"context_line":"                                      wrap\u003dFalse, top\u003dTrue)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-local\u0027, wrap\u003dFalse)"},{"line_number":323,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027neutron-filter-top\u0027,"},{"line_number":324,"context_line":"                                      \u0027-j neutron-common-local\u0027, wrap\u003dFalse)"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_1c286699","line":322,"in_reply_to":"1a430d35_0493d5fa","updated":"2017-02-09 16:41:53.000000000","message":"Sure will add comment","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                tables[\u0027filter\u0027].add_rule(\u0027neutron-common-%s\u0027 % f_chain,"},{"line_number":375,"context_line":"                                          \u0027-j $%s\u0027 % f_chain, wrap\u003dFalse)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":378,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j neutron-common-ACCEPT\u0027,"},{"line_number":379,"context_line":"                                      wrap\u003dFalse)"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_47615fa8","line":377,"updated":"2017-02-08 19:30:10.000000000","message":"that seems twisted. isn\u0027t it the same chain you skip adding in line 368?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                tables[\u0027filter\u0027].add_rule(\u0027neutron-common-%s\u0027 % f_chain,"},{"line_number":375,"context_line":"                                          \u0027-j $%s\u0027 % f_chain, wrap\u003dFalse)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":378,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j neutron-common-ACCEPT\u0027,"},{"line_number":379,"context_line":"                                      wrap\u003dFalse)"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_77b8a511","line":377,"in_reply_to":"1a430d35_47615fa8","updated":"2017-02-09 16:41:53.000000000","message":"Thanks, I think this got introduced while reworking the patch. I will fix this.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                          \u0027-j $%s\u0027 % f_chain, wrap\u003dFalse)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":378,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j neutron-common-ACCEPT\u0027,"},{"line_number":379,"context_line":"                                      wrap\u003dFalse)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        if not state_less:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_2767f3b7","line":378,"updated":"2017-02-08 19:30:10.000000000","message":"an (ASCII) image of all chains and their relationships would help understanding the logic here. If you think it doesn\u0027t fit in the code, consider adding a devref page and refer to it.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                          \u0027-j $%s\u0027 % f_chain, wrap\u003dFalse)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"            tables[\u0027filter\u0027].add_chain(\u0027neutron-common-ACCEPT\u0027, wrap\u003dFalse)"},{"line_number":378,"context_line":"            tables[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027, \u0027-j neutron-common-ACCEPT\u0027,"},{"line_number":379,"context_line":"                                      wrap\u003dFalse)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        if not state_less:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_173da1c3","line":378,"in_reply_to":"1a430d35_2767f3b7","updated":"2017-02-09 16:41:53.000000000","message":"Sure devref will be a better choice, I think ASCII art may become complicated with all the jump rules","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3a82ee5ce76942b1ef1ad38964e28508976b2875","unresolved":false,"context_lines":[{"line_number":729,"context_line":"    sg_chains \u003d []"},{"line_number":730,"context_line":"    other_chains \u003d []"},{"line_number":731,"context_line":"    for chain in sorted(old_chains | new_chains):"},{"line_number":732,"context_line":"        if \u0027-sg-\u0027 in chain or \u0027-fw-\u0027 in chain:"},{"line_number":733,"context_line":"            sg_chains.append(chain)"},{"line_number":734,"context_line":"        else:"},{"line_number":735,"context_line":"            other_chains.append(chain)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_079f575f","line":732,"updated":"2017-02-08 19:30:10.000000000","message":"would it make more sense to make external components to register their managed chains with the manager, and then make the manager to give the list of those managed by it?","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"},{"author":{"_account_id":5109,"name":"chandanc","email":"chandan.dutta.chowdhury@gmail.com","username":"chandanc"},"change_message_id":"7185d872793d6f4f481f9220954d36c0a2337f1e","unresolved":false,"context_lines":[{"line_number":729,"context_line":"    sg_chains \u003d []"},{"line_number":730,"context_line":"    other_chains \u003d []"},{"line_number":731,"context_line":"    for chain in sorted(old_chains | new_chains):"},{"line_number":732,"context_line":"        if \u0027-sg-\u0027 in chain or \u0027-fw-\u0027 in chain:"},{"line_number":733,"context_line":"            sg_chains.append(chain)"},{"line_number":734,"context_line":"        else:"},{"line_number":735,"context_line":"            other_chains.append(chain)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_5761e9d1","line":732,"in_reply_to":"1a430d35_079f575f","updated":"2017-02-09 16:41:53.000000000","message":"Agree, but we wanted to keep things simple at first, trying to get all the jump rules and wrapping correct. But I can look at that approach too.","commit_id":"6313059d13e2d2600d6d5d3c805dcd6c7b634592"}]}
