)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"79745db3cbfbf4c1830821e134c0938526ad0a8e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"when l2 agent enables ipset, if a security group just updates its members,"},{"line_number":10,"context_line":"iptables should not be reloaded."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements: blueprint add-ipset-to-security"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I0bd6d62283e921026b387ecb8acb5d925b32948c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_2da7f1a8","line":12,"updated":"2014-09-18 09:50:52.000000000","message":"it doesn\u0027t implement bp, right? Please refer to a bug instead","commit_id":"d8267fa6e83bc4ba846ca4281caf540c70d16ddb"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"2004d2984d71211d74f138822d167885bd63b97b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"when l2 agent enables ipset, if a security group just updates its members,"},{"line_number":10,"context_line":"iptables should not be reloaded."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements: blueprint add-ipset-to-security"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I0bd6d62283e921026b387ecb8acb5d925b32948c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_903ab4e5","line":12,"in_reply_to":"fa98f980_2da7f1a8","updated":"2014-09-18 10:36:59.000000000","message":"got it","commit_id":"d8267fa6e83bc4ba846ca4281caf540c70d16ddb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7ecca44f18da3e727e57e3ad079e62f322cb7919","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove unnecessary iptables reload when L2 enable ipset"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"this patch is to improve L2 agent when l2 agent enables ipset, if a security"},{"line_number":10,"context_line":"group just updates its members, iptables should not be reloaded, it just need toadd members to ipset chain."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-bug: #1371435"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_2c0fd3e2","line":9,"updated":"2014-09-19 10:55:22.000000000","message":"Consider: \n When ipset is enabled on L2 agent, it does not need to reload \n iptables if only members of security group were changed, \n it should just update ipset set","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9121fec7306d91f82d9c63f0b9ef6a6dc378cd2d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove unnecessary iptables reload when L2 enable ipset"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"this patch is to improve L2 agent when l2 agent enables ipset, if a security"},{"line_number":10,"context_line":"group just updates its members, iptables should not be reloaded, it just need toadd members to ipset chain."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-bug: #1371435"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da9df570_bafef536","line":9,"in_reply_to":"fa98f980_2c0fd3e2","updated":"2014-09-20 06:45:32.000000000","message":"agree, thanks for your suggestion","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c7f4251230523e2e61ba96fbc9ab972321222103","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove unnecessary iptables reload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now in l2 agent, iptables rules being reloaded and ipset"},{"line_number":10,"context_line":"members being updated are all done in \u0027update_port_filter\u0027,"},{"line_number":11,"context_line":"it is expensive that iptables rules are reloaded, it does"},{"line_number":12,"context_line":"not need to reload iptables rules if only members of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"1aca2d91_89ffe0a9","line":9,"updated":"2015-05-07 15:54:20.000000000","message":"Please clarify commit message as requested in PS 12 by Oleg and me","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"bce7cb79f23cac1d215d9aa84176eb7c89479862","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove unnecessary iptables reload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now in l2 agent, iptables rules being reloaded and ipset"},{"line_number":10,"context_line":"members being updated are all done in \u0027update_port_filter\u0027,"},{"line_number":11,"context_line":"it is expensive that iptables rules are reloaded, it does"},{"line_number":12,"context_line":"not need to reload iptables rules if only members of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"1aca2d91_01570dcf","line":9,"in_reply_to":"1aca2d91_89ffe0a9","updated":"2015-05-08 07:57:42.000000000","message":"your question in patch set 12?","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e5c58e94856941e5898713636e23e44ddc71a7a7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     shihanzhang \u003cshihanzhang@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-17 20:28:46 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Just update ipset sets if sg mermbers update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now if a user adds or removes a member from a security group,"},{"line_number":10,"context_line":"neutron-server will notify all l2 agents with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"ba15a1d1_256c1207","line":7,"updated":"2015-09-17 19:00:16.000000000","message":"mermbers -\u003e members","commit_id":"54a56386902223c531b68f3d7fd4dd6548dc4e51"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"a97ad585ae88d33033b4d671e4a87387389009e5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     shihanzhang \u003cshihanzhang@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-17 20:28:46 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Just update ipset sets if sg mermbers update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now if a user adds or removes a member from a security group,"},{"line_number":10,"context_line":"neutron-server will notify all l2 agents with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"ba15a1d1_c2c3c136","line":7,"in_reply_to":"ba15a1d1_256c1207","updated":"2015-09-18 01:23:14.000000000","message":"it is a mistake","commit_id":"54a56386902223c531b68f3d7fd4dd6548dc4e51"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2e69b80c81f978e432ca69c1c7ddc0b8498b0f73","unresolved":false,"context_lines":[{"line_number":12,"context_line":"reload their iptable rules and update their ipset sets."},{"line_number":13,"context_line":"Actually, for this case, l2 agents just need to update their"},{"line_number":14,"context_line":"ipset sets."},{"line_number":15,"context_line":"This patch does the change that if a security gropu changes"},{"line_number":16,"context_line":"its members, all related l2 agetns just update their related"},{"line_number":17,"context_line":"ipset sets."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"3a29b11f_eba00744","line":15,"updated":"2015-10-23 08:23:12.000000000","message":"s/gropu/group/","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa670eaf9df55ee0a12571c4fa1bd2bf4df718a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"reload their iptable rules and update their ipset sets."},{"line_number":13,"context_line":"Actually, for this case, l2 agents just need to update their"},{"line_number":14,"context_line":"ipset sets."},{"line_number":15,"context_line":"This patch does the change that if a security gropu changes"},{"line_number":16,"context_line":"its members, all related l2 agetns just update their related"},{"line_number":17,"context_line":"ipset sets."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"3a29b11f_9cfbde78","line":15,"range":{"start_line":15,"start_character":46,"end_line":15,"end_character":51},"updated":"2015-10-23 04:18:49.000000000","message":"typo: group","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ae4d20674cb588d1680952463642aa1084221e94","unresolved":false,"context_lines":[{"line_number":12,"context_line":"reload their iptable rules and update their ipset sets."},{"line_number":13,"context_line":"Actually, for this case, l2 agents just need to update their"},{"line_number":14,"context_line":"ipset sets."},{"line_number":15,"context_line":"This patch does the change that if a security gropu changes"},{"line_number":16,"context_line":"its members, all related l2 agetns just update their related"},{"line_number":17,"context_line":"ipset sets."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"3a29b11f_e521169f","line":15,"in_reply_to":"3a29b11f_9cfbde78","updated":"2015-10-23 06:16:58.000000000","message":"Done","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa670eaf9df55ee0a12571c4fa1bd2bf4df718a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Actually, for this case, l2 agents just need to update their"},{"line_number":14,"context_line":"ipset sets."},{"line_number":15,"context_line":"This patch does the change that if a security gropu changes"},{"line_number":16,"context_line":"its members, all related l2 agetns just update their related"},{"line_number":17,"context_line":"ipset sets."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-bug: #1371435"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"3a29b11f_dcfcf673","line":16,"range":{"start_line":16,"start_character":28,"end_line":16,"end_character":34},"updated":"2015-10-23 04:18:49.000000000","message":"typo: agents","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ae4d20674cb588d1680952463642aa1084221e94","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Actually, for this case, l2 agents just need to update their"},{"line_number":14,"context_line":"ipset sets."},{"line_number":15,"context_line":"This patch does the change that if a security gropu changes"},{"line_number":16,"context_line":"its members, all related l2 agetns just update their related"},{"line_number":17,"context_line":"ipset sets."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-bug: #1371435"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"3a29b11f_853dc2c5","line":16,"in_reply_to":"3a29b11f_dcfcf673","updated":"2015-10-23 06:16:58.000000000","message":"Done","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"}],"neutron/agent/linux/iptables_firewall.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7ecca44f18da3e727e57e3ad079e62f322cb7919","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.sg_members \u003d {}"},{"line_number":67,"context_line":"        self.pre_sg_members \u003d None"},{"line_number":68,"context_line":"        self.enable_ipset \u003d cfg.CONF.SECURITYGROUP.enable_ipset"},{"line_number":69,"context_line":"        self._reload_iptables \u003d False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @property"},{"line_number":72,"context_line":"    def ports(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_3add4543","line":69,"updated":"2014-09-19 10:55:22.000000000","message":"should it be True initially?","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9121fec7306d91f82d9c63f0b9ef6a6dc378cd2d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.sg_members \u003d {}"},{"line_number":67,"context_line":"        self.pre_sg_members \u003d None"},{"line_number":68,"context_line":"        self.enable_ipset \u003d cfg.CONF.SECURITYGROUP.enable_ipset"},{"line_number":69,"context_line":"        self._reload_iptables \u003d False"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @property"},{"line_number":72,"context_line":"    def ports(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_cbd769be","line":69,"in_reply_to":"fa98f980_3add4543","updated":"2014-09-20 06:45:32.000000000","message":"when there are some ports in one \u0027defer_apply\u0027, as long as there is a port which need to reload iptables, the _reload_iptables will be true. If the _reload_iptables be true initially, it can not be  distinguished","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7ecca44f18da3e727e57e3ad079e62f322cb7919","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                self._update_ipset_members("},{"line_number":108,"context_line":"                    self._get_remote_sg_ids(port, direction))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _port_update_needs_iptables_reload(self, port):"},{"line_number":111,"context_line":"        sg_ids \u003d port.get(\u0027security_groups\u0027, [])"},{"line_number":112,"context_line":"        return any(self.sg_rules_changed_for_sg(sg_id) for sg_id in sg_ids)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_9a1ab116","line":110,"updated":"2014-09-19 10:55:22.000000000","message":"consider squash below 2 methods into one _iptables_reload_needed():","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9121fec7306d91f82d9c63f0b9ef6a6dc378cd2d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                self._update_ipset_members("},{"line_number":108,"context_line":"                    self._get_remote_sg_ids(port, direction))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _port_update_needs_iptables_reload(self, port):"},{"line_number":111,"context_line":"        sg_ids \u003d port.get(\u0027security_groups\u0027, [])"},{"line_number":112,"context_line":"        return any(self.sg_rules_changed_for_sg(sg_id) for sg_id in sg_ids)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_1a9541e4","line":110,"in_reply_to":"fa98f980_9a1ab116","updated":"2014-09-20 06:45:32.000000000","message":"agree","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7ecca44f18da3e727e57e3ad079e62f322cb7919","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return any(self.sg_rules_changed_for_sg(sg_id) for sg_id in sg_ids)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def sg_rules_changed_for_sg(self, sg_id):"},{"line_number":115,"context_line":"        return (self.sg_rules.get(sg_id, []) !\u003d"},{"line_number":116,"context_line":"                self.pre_sg_rules.get(sg_id, []))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def remove_port_filter(self, port):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_2f6ee5c9","line":115,"updated":"2014-09-19 10:55:22.000000000","message":"consider using sorted() when comparing lists","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9121fec7306d91f82d9c63f0b9ef6a6dc378cd2d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return any(self.sg_rules_changed_for_sg(sg_id) for sg_id in sg_ids)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def sg_rules_changed_for_sg(self, sg_id):"},{"line_number":115,"context_line":"        return (self.sg_rules.get(sg_id, []) !\u003d"},{"line_number":116,"context_line":"                self.pre_sg_rules.get(sg_id, []))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def remove_port_filter(self, port):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_5a9fc903","line":115,"in_reply_to":"fa98f980_2f6ee5c9","updated":"2014-09-20 06:45:32.000000000","message":"agree","commit_id":"e1e93276ac5abd460ca80f667846d0a1eb41c16b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"104a2ab54701f1ad7d0f01d24c534d09b1647af6","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        # each security group has it own chains"},{"line_number":89,"context_line":"        self._setup_chains()"},{"line_number":90,"context_line":"        self.iptables.apply()"},{"line_number":91,"context_line":"        self._reload_iptables \u003d True"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def update_port_filter(self, port):"},{"line_number":94,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_913ac4e5","line":91,"updated":"2015-02-16 09:46:11.000000000","message":"can you please clarify why can\u0027t we update ipset members without iptables reload in this case, like it\u0027s done in update_port_filter?","commit_id":"ca9fc964673a12355fd569f311e672c2f7d718fc"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"c0a19c8e00d87ecfb9c16aa35c5e2ba8a3f2f455","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        # each security group has it own chains"},{"line_number":89,"context_line":"        self._setup_chains()"},{"line_number":90,"context_line":"        self.iptables.apply()"},{"line_number":91,"context_line":"        self._reload_iptables \u003d True"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def update_port_filter(self, port):"},{"line_number":94,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_b47ed668","line":91,"in_reply_to":"da86d52c_913ac4e5","updated":"2015-02-16 09:53:22.000000000","message":"ok","commit_id":"ca9fc964673a12355fd569f311e672c2f7d718fc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"36b827f2929286894b4909928d8c6fe3fdd61610","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # each security group has it own chains"},{"line_number":87,"context_line":"        self._setup_chains()"},{"line_number":88,"context_line":"        self.iptables.apply()"},{"line_number":89,"context_line":"        self._reload_iptables \u003d True"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def update_port_filter(self, port):"},{"line_number":92,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_4a510835","line":89,"updated":"2015-02-25 09:00:00.000000000","message":"Same question as for previous patch set, just for my understanding: commit message says \"it does not need to reload iptables rules if only members of security group were changed\" - doesn\u0027t adding new port with same security groups fall under this case? Is it necessary to reload iptables in this case?","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6d69c192bb19337a430cef3ba366a3d73d43dbfa","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # each security group has it own chains"},{"line_number":87,"context_line":"        self._setup_chains()"},{"line_number":88,"context_line":"        self.iptables.apply()"},{"line_number":89,"context_line":"        self._reload_iptables \u003d True"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def update_port_filter(self, port):"},{"line_number":92,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_a62d5c97","line":89,"in_reply_to":"ba7be1f8_0050cfd2","updated":"2015-02-25 09:54:24.000000000","message":"Thanks for clarification, so this shoud better be stated in the commit message.","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f09736faedfc5111273383fb001963ee2c06765b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # each security group has it own chains"},{"line_number":87,"context_line":"        self._setup_chains()"},{"line_number":88,"context_line":"        self.iptables.apply()"},{"line_number":89,"context_line":"        self._reload_iptables \u003d True"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def update_port_filter(self, port):"},{"line_number":92,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_40a2c7fd","line":89,"in_reply_to":"ba7be1f8_4a510835","updated":"2015-02-25 09:26:00.000000000","message":"I believe it\u0027s dependent on the use of ipset or not.\n\nMay be we should make it dependent on having ipset enabled or not. Although my proposal was to remove non-ipset for this cycle, not sure if we will get there soon enough, and we should not break non-ipset behavior.","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"682d31d599620b3fa0053ea00e1fca4c1f95507c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # each security group has it own chains"},{"line_number":87,"context_line":"        self._setup_chains()"},{"line_number":88,"context_line":"        self.iptables.apply()"},{"line_number":89,"context_line":"        self._reload_iptables \u003d True"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def update_port_filter(self, port):"},{"line_number":92,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_0050cfd2","line":89,"in_reply_to":"ba7be1f8_4a510835","updated":"2015-02-25 09:33:28.000000000","message":"hi Oleg Bondarev, I am sorry I don\u0027t make myself understood.My meaning is that when members of security group were changed, just the compute nodes which have the changed members should reload their iptables rules, the other compute nodes should not, for example, a security group has two member port A and B, port A is on computeA, port B is on computeB, when security group add a member port C to computeA, computeA should reload iptables rules and update ipset member, but computeB just should update ipset member, meanwhile, if security group delete port C, computeB just should update ipset member.","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"23dacb7d8b1fda4890fb981b2a437ca986b263d7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # each security group has it own chains"},{"line_number":87,"context_line":"        self._setup_chains()"},{"line_number":88,"context_line":"        self.iptables.apply()"},{"line_number":89,"context_line":"        self._reload_iptables \u003d True"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def update_port_filter(self, port):"},{"line_number":92,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_abdf9c67","line":89,"in_reply_to":"ba7be1f8_a62d5c97","updated":"2015-02-26 17:05:54.000000000","message":"+1 for clarifying the commit message.\nIt would help explaining that prepare_port_filter and remove_port_filter involve a change for member of security group in this host, while update_port_filter is triggered also for changes that involve members not residing in this host.","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"36b827f2929286894b4909928d8c6fe3fdd61610","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.filtered_ports.pop(port[\u0027device\u0027], None)"},{"line_number":121,"context_line":"        self._setup_chains()"},{"line_number":122,"context_line":"        self.iptables.apply()"},{"line_number":123,"context_line":"        self._reload_iptables \u003d True"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _setup_chains(self):"},{"line_number":126,"context_line":"        \"\"\"Setup ingress and egress chain for a port.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_4a3828ef","line":123,"updated":"2015-02-25 09:00:00.000000000","message":"same question as for prepare_port_filter: isn\u0027t it the case when only members of security group(s) were changed?","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"682d31d599620b3fa0053ea00e1fca4c1f95507c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.filtered_ports.pop(port[\u0027device\u0027], None)"},{"line_number":121,"context_line":"        self._setup_chains()"},{"line_number":122,"context_line":"        self.iptables.apply()"},{"line_number":123,"context_line":"        self._reload_iptables \u003d True"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _setup_chains(self):"},{"line_number":126,"context_line":"        \"\"\"Setup ingress and egress chain for a port.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_4033a7aa","line":123,"in_reply_to":"ba7be1f8_4a3828ef","updated":"2015-02-25 09:33:28.000000000","message":"the explai same as above","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c7f4251230523e2e61ba96fbc9ab972321222103","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.iptables.apply()"},{"line_number":111,"context_line":"        self._reload_iptables \u003d True"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def update_port_filter(self, port):"},{"line_number":114,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"},{"line_number":115,"context_line":"        if port[\u0027device\u0027] not in self.ports:"},{"line_number":116,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_4d1b131c","line":113,"updated":"2015-05-07 15:54:20.000000000","message":"this method is called also when a sec group rule is changed. In this case should the iptables be reloaded?","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"bce7cb79f23cac1d215d9aa84176eb7c89479862","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.iptables.apply()"},{"line_number":111,"context_line":"        self._reload_iptables \u003d True"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def update_port_filter(self, port):"},{"line_number":114,"context_line":"        LOG.debug(\"Updating device (%s) filter\", port[\u0027device\u0027])"},{"line_number":115,"context_line":"        if port[\u0027device\u0027] not in self.ports:"},{"line_number":116,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_34f48a84","line":113,"in_reply_to":"1aca2d91_4d1b131c","updated":"2015-05-08 07:57:42.000000000","message":"yes, when a sec group rule is changed, all related l2 agents should reload their iptables","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c7f4251230523e2e61ba96fbc9ab972321222103","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":117,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":118,"context_line":"            return"},{"line_number":119,"context_line":"        if not self.enable_ipset or self._iptables_reload_needed(port):"},{"line_number":120,"context_line":"            self._remove_chains()"},{"line_number":121,"context_line":"            self._set_ports(port)"},{"line_number":122,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_ad298739","line":119,"updated":"2015-05-07 15:54:20.000000000","message":"This change requires a unit test, you are adding logic to this method that should be tested.","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"bce7cb79f23cac1d215d9aa84176eb7c89479862","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":117,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":118,"context_line":"            return"},{"line_number":119,"context_line":"        if not self.enable_ipset or self._iptables_reload_needed(port):"},{"line_number":120,"context_line":"            self._remove_chains()"},{"line_number":121,"context_line":"            self._set_ports(port)"},{"line_number":122,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_14ef4eb1","line":119,"in_reply_to":"1aca2d91_ad298739","updated":"2015-05-08 07:57:42.000000000","message":"agree","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c7f4251230523e2e61ba96fbc9ab972321222103","unresolved":false,"context_lines":[{"line_number":689,"context_line":"    def filter_defer_apply_off(self):"},{"line_number":690,"context_line":"        if self._defer_apply:"},{"line_number":691,"context_line":"            self._defer_apply \u003d False"},{"line_number":692,"context_line":"            if not self.enable_ipset or self._reload_iptables:"},{"line_number":693,"context_line":"                self._remove_chains_apply(self._pre_defer_filtered_ports,"},{"line_number":694,"context_line":"                                          self._pre_defer_unfiltered_ports)"},{"line_number":695,"context_line":"                self._setup_chains_apply(self.filtered_ports,"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_491668a8","line":692,"updated":"2015-05-07 15:54:20.000000000","message":"this change would also require a UTs. You are adding this new flag \"self._reload_iptables\" , you should check that it\u0027s set appropriately. You should add some UTs or modify the existent ones in test_iptables_firewall to check for example that if \"remove_port_filter\" or \"prepare_port_filter\" are called, these lines are executed, otherwise they are not. You can probably figure out better than me some test cases.","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"bce7cb79f23cac1d215d9aa84176eb7c89479862","unresolved":false,"context_lines":[{"line_number":689,"context_line":"    def filter_defer_apply_off(self):"},{"line_number":690,"context_line":"        if self._defer_apply:"},{"line_number":691,"context_line":"            self._defer_apply \u003d False"},{"line_number":692,"context_line":"            if not self.enable_ipset or self._reload_iptables:"},{"line_number":693,"context_line":"                self._remove_chains_apply(self._pre_defer_filtered_ports,"},{"line_number":694,"context_line":"                                          self._pre_defer_unfiltered_ports)"},{"line_number":695,"context_line":"                self._setup_chains_apply(self.filtered_ports,"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_d42f96f4","line":692,"in_reply_to":"1aca2d91_491668a8","updated":"2015-05-08 07:57:42.000000000","message":"agree to add UTs","commit_id":"76fb568bd16989519f97e9c772d263df680e48f1"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1d6ff9567e97caf5b3c32bbb7eeaa10fd8c5aaa3","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.pre_sg_rules.get(sg_id, [])) for sg_id in sg_ids)"},{"line_number":191,"context_line":"        return self._check_port_ip_or_mac_change(port) or rule_change"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _check_port_ip_or_mac_change(self, port):"},{"line_number":194,"context_line":"        ip_or_mac_change \u003d False"},{"line_number":195,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":196,"context_line":"        if port_id in self.filtered_ports:"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a1a9d01_ae9ecab6","line":193,"updated":"2015-09-30 10:33:31.000000000","message":"Do the UTs have coverage for both of these conditions to signal a IP table reload?","commit_id":"a9ec3aa6815cfa0181c1a91c0cbec2a6b7defd71"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f938e053cd38e6ed380dbc0fa8232b9ab222ebb8","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self.pre_sg_rules.get(sg_id, [])) for sg_id in sg_ids)"},{"line_number":191,"context_line":"        return self._check_port_ip_or_mac_change(port) or rule_change"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _check_port_ip_or_mac_change(self, port):"},{"line_number":194,"context_line":"        ip_or_mac_change \u003d False"},{"line_number":195,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":196,"context_line":"        if port_id in self.filtered_ports:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a29b11f_1f4ba42b","line":193,"in_reply_to":"9a1a9d01_ae9ecab6","updated":"2015-10-21 06:27:44.000000000","message":"Done","commit_id":"a9ec3aa6815cfa0181c1a91c0cbec2a6b7defd71"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"1d6ff9567e97caf5b3c32bbb7eeaa10fd8c5aaa3","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        return self._check_port_ip_or_mac_change(port) or rule_change"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _check_port_ip_or_mac_change(self, port):"},{"line_number":194,"context_line":"        ip_or_mac_change \u003d False"},{"line_number":195,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":196,"context_line":"        if port_id in self.filtered_ports:"},{"line_number":197,"context_line":"            old_mac_address \u003d self.filtered_ports[port_id][\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a1a9d01_dbc2dee8","line":194,"updated":"2015-09-30 10:33:31.000000000","message":"nit: could remove this line and return False on L201.","commit_id":"a9ec3aa6815cfa0181c1a91c0cbec2a6b7defd71"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f938e053cd38e6ed380dbc0fa8232b9ab222ebb8","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        return self._check_port_ip_or_mac_change(port) or rule_change"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _check_port_ip_or_mac_change(self, port):"},{"line_number":194,"context_line":"        ip_or_mac_change \u003d False"},{"line_number":195,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":196,"context_line":"        if port_id in self.filtered_ports:"},{"line_number":197,"context_line":"            old_mac_address \u003d self.filtered_ports[port_id][\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a29b11f_ff4d883e","line":194,"in_reply_to":"9a1a9d01_dbc2dee8","updated":"2015-10-21 06:27:44.000000000","message":"agree","commit_id":"a9ec3aa6815cfa0181c1a91c0cbec2a6b7defd71"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"0180ed9f36b3bd8ff7e190fc8e60b59056cc97ff","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            self.pre_sg_rules.get(sg_id, []) for sg_id in sg_ids))"},{"line_number":197,"context_line":"        return self._check_port_changed(port) or rule_change"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def _check_port_changed(self, port):"},{"line_number":200,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":201,"context_line":"        if port_id in self.filtered_ports:"},{"line_number":202,"context_line":"            old_mac_address \u003d self.filtered_ports[port_id][\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a29b11f_205e7512","line":199,"updated":"2015-10-21 11:16:00.000000000","message":"Is there a unit test for this new logic?","commit_id":"27ef7e0336dd083f573ef711d03fb3710b15d047"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"b129156a50f500a5b506724e3e230fd11d71a4fa","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                self._update_ipset_members("},{"line_number":192,"context_line":"                    self._get_remote_sg_ids(port, direction))"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _iptables_reload_needed(self, port):"},{"line_number":195,"context_line":"        sg_ids \u003d port.get(\u0027security_groups\u0027, [])"},{"line_number":196,"context_line":"        for sg_id in sg_ids:"},{"line_number":197,"context_line":"            sg_rules \u003d self.sg_rules.get(sg_id, [])"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_b24c5543","line":194,"updated":"2015-11-17 12:46:31.000000000","message":"instead of doing this processing can we use the info stored in self.updated_rule_sg_ids and self.devices_with_udpated_sg_members ? these variable are updated by security_group_updated that it\u0027s called when security_groups_rule_updated or security_groups_member_updated is received","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6563f23ca7ad26faa2b5db51031bb5c779f5577a","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                self._update_ipset_members("},{"line_number":192,"context_line":"                    self._get_remote_sg_ids(port, direction))"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _iptables_reload_needed(self, port):"},{"line_number":195,"context_line":"        sg_ids \u003d port.get(\u0027security_groups\u0027, [])"},{"line_number":196,"context_line":"        for sg_id in sg_ids:"},{"line_number":197,"context_line":"            sg_rules \u003d self.sg_rules.get(sg_id, [])"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_f9a4dda6","line":194,"in_reply_to":"ba8a016a_b24c5543","updated":"2015-11-18 02:03:24.000000000","message":"here we must find the changed security group which is related to this port, so I don\u0027t know how to use the info stored in self.updated_rule_sg_ids and self.devices_with_udpated_sg_members","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"b129156a50f500a5b506724e3e230fd11d71a4fa","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                pre_sg_rules \u003d self.pre_sg_rules.get(sg_id, [])"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                pre_sg_rules \u003d []"},{"line_number":202,"context_line":"            if len(sg_rules) !\u003d len(pre_sg_rules):"},{"line_number":203,"context_line":"                return True"},{"line_number":204,"context_line":"            for rule in sg_rules:"},{"line_number":205,"context_line":"                if rule not in pre_sg_rules:"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_5782be95","line":202,"updated":"2015-11-17 12:46:31.000000000","message":"instead of lines 202-206 can we simply check convert the list to set and check for equality between sg_rules and pre_sg_rules?","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6563f23ca7ad26faa2b5db51031bb5c779f5577a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                pre_sg_rules \u003d self.pre_sg_rules.get(sg_id, [])"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                pre_sg_rules \u003d []"},{"line_number":202,"context_line":"            if len(sg_rules) !\u003d len(pre_sg_rules):"},{"line_number":203,"context_line":"                return True"},{"line_number":204,"context_line":"            for rule in sg_rules:"},{"line_number":205,"context_line":"                if rule not in pre_sg_rules:"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_d9c47960","line":202,"in_reply_to":"ba8a016a_5782be95","updated":"2015-11-18 02:03:24.000000000","message":"the security group rule is a dict, so it can\u0027t convert to set","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"b129156a50f500a5b506724e3e230fd11d71a4fa","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            for rule in sg_rules:"},{"line_number":205,"context_line":"                if rule not in pre_sg_rules:"},{"line_number":206,"context_line":"                    return True"},{"line_number":207,"context_line":"        return self._check_port_changed(port)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _check_port_changed(self, port):"},{"line_number":210,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_b2f9b582","line":207,"updated":"2015-11-17 12:46:31.000000000","message":"it\u0027s confusing here that you return calling another internal method. I\u0027d prefer something like\n\ndef _iptables_reload_needed(self, port):\n    return check_rules_changed(port) or _check_port_changed(port)\n\nwhere check_rules_changed is the current _iptables_reload_needed without the return at the end and modified according to the comments I made earlier","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6563f23ca7ad26faa2b5db51031bb5c779f5577a","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            for rule in sg_rules:"},{"line_number":205,"context_line":"                if rule not in pre_sg_rules:"},{"line_number":206,"context_line":"                    return True"},{"line_number":207,"context_line":"        return self._check_port_changed(port)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _check_port_changed(self, port):"},{"line_number":210,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_19a0c18f","line":207,"in_reply_to":"ba8a016a_b2f9b582","updated":"2015-11-18 02:03:24.000000000","message":"good suggestion","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"37b2779455d845fcfb948607ae8803f190e8c24c","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        LOG.debug(\"Update rules of security group (%s)\", sg_id)"},{"line_number":144,"context_line":"        self.sg_rules[sg_id] \u003d sg_rules"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _check_sg_members_changed(self, new_members, old_members):"},{"line_number":147,"context_line":"        for type in [constants.IPv4, constants.IPv6]:"},{"line_number":148,"context_line":"            if set(new_members.get(type, [])) !\u003d set("},{"line_number":149,"context_line":"                    old_members.get(type, [])):"}],"source_content_type":"text/x-python","patch_set":36,"id":"7a740942_b803fdb7","line":146,"updated":"2015-12-04 01:54:57.000000000","message":"this function says check_sg_members_changed but it results in a side effect that disables the reload of the iptables rules. It shouldn\u0027t be the case that the fact members have changed disables the reload of the iptables rules.\n\nIf this function sets a flag, the flag should be something like \u0027_sg_members_changed\u0027.","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"754d4e64a1e51754cbdc9899cab7aeddb083dfa7","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        LOG.debug(\"Update rules of security group (%s)\", sg_id)"},{"line_number":144,"context_line":"        self.sg_rules[sg_id] \u003d sg_rules"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _check_sg_members_changed(self, new_members, old_members):"},{"line_number":147,"context_line":"        for type in [constants.IPv4, constants.IPv6]:"},{"line_number":148,"context_line":"            if set(new_members.get(type, [])) !\u003d set("},{"line_number":149,"context_line":"                    old_members.get(type, [])):"}],"source_content_type":"text/x-python","patch_set":36,"id":"7a740942_8cba31bf","line":146,"in_reply_to":"7a740942_b803fdb7","updated":"2015-12-07 07:52:57.000000000","message":"agree","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"87b4006a9ab6be69108c0fc649929ada5935d9eb","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":188,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":"        if not self.enable_ipset or self._reload_iptables:"},{"line_number":191,"context_line":"            self._remove_chains()"},{"line_number":192,"context_line":"            self._set_ports(port)"},{"line_number":193,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a8ffd7b_f12ab78f","line":190,"updated":"2015-12-02 04:50:54.000000000","message":"this logic shouldn\u0027t be in this method. we don\u0027t want to have update_port_filter do nothing when rules could be changed because a flag hasn\u0027t been set.\n\nThe better approach is to make sure update_port_filter isn\u0027t called if it was only a change to the set members.","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"37b2779455d845fcfb948607ae8803f190e8c24c","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":188,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":"        if not self.enable_ipset or self._reload_iptables:"},{"line_number":191,"context_line":"            self._remove_chains()"},{"line_number":192,"context_line":"            self._set_ports(port)"},{"line_number":193,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":36,"id":"7a740942_d80049ad","line":190,"updated":"2015-12-04 01:54:57.000000000","message":"what guaruntees that self._reload_iptables is True when this function is called? It\u0027s depending too much on assumptions about what functions will be called before it.\n\n\nwhat I would rather see is separate logic for both paths. One to detect if the rules have changed, and one to detect if the set members have changed. Otherwise we are relying too much on assumptions about when it\u0027s safe to skip the rule reloading.","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"754d4e64a1e51754cbdc9899cab7aeddb083dfa7","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":188,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":"        if not self.enable_ipset or self._reload_iptables:"},{"line_number":191,"context_line":"            self._remove_chains()"},{"line_number":192,"context_line":"            self._set_ports(port)"},{"line_number":193,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":36,"id":"7a740942_2cb1bde1","line":190,"in_reply_to":"7a740942_d80049ad","updated":"2015-12-07 07:52:57.000000000","message":"agree","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f3e4108dec0059dbe50088f1eb92c36c7d983823","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.info(_LI(\u0027Attempted to update port filter which is not \u0027"},{"line_number":188,"context_line":"                         \u0027filtered %s\u0027), port[\u0027device\u0027])"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":"        if not self.enable_ipset or self._reload_iptables:"},{"line_number":191,"context_line":"            self._remove_chains()"},{"line_number":192,"context_line":"            self._set_ports(port)"},{"line_number":193,"context_line":"            self._setup_chains()"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a8ffd7b_1e918352","line":190,"in_reply_to":"9a8ffd7b_f12ab78f","updated":"2015-12-02 06:58:33.000000000","message":"hi kevin, I don\u0027t fully understand your meaning \"update_port_filter do nothing when rules could be changed\", if a security group rules change, we must reload iptable rules, so the self._reload_iptables is True. update_port_filter is called in securitygroups_rpc.py, if we make update_port_filter isn\u0027t called, we must add new method for self.firewall, feel free to correct me if I am wrong","commit_id":"d4d178e0f28dfaaf006484a58f30426c364957bd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c870fec2655117bdf84984e17b4128f164301444","unresolved":false,"context_lines":[{"line_number":854,"context_line":"    def _refresh_ipset_members(self):"},{"line_number":855,"context_line":"        changed_sg_info \u003d {constants.IPv4: set(), constants.IPv6: set()}"},{"line_number":856,"context_line":"        for sg_id in self.devices_with_updated_sg_members:"},{"line_number":857,"context_line":"            for type in [constants.IPv4, constants.IPv6]:"},{"line_number":858,"context_line":"                changed_sg_info[type].add(sg_id)"},{"line_number":859,"context_line":"        if changed_sg_info[constants.IPv4] or changed_sg_info[constants.IPv6]:"},{"line_number":860,"context_line":"            self._update_ipset_members(changed_sg_info)"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa69d971_474cda9d","line":857,"range":{"start_line":857,"start_character":16,"end_line":857,"end_character":20},"updated":"2016-01-05 20:41:28.000000000","message":"Please select a different variable name, so as not to be ambiguous with the type() method.","commit_id":"460feca93a6265c336bb0f1c726c17dbf0cb538f"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"25b126c6bc70916b8c9d48df0c4b2c47d4dc9bd9","unresolved":false,"context_lines":[{"line_number":854,"context_line":"    def _refresh_ipset_members(self):"},{"line_number":855,"context_line":"        changed_sg_info \u003d {constants.IPv4: set(), constants.IPv6: set()}"},{"line_number":856,"context_line":"        for sg_id in self.devices_with_updated_sg_members:"},{"line_number":857,"context_line":"            for type in [constants.IPv4, constants.IPv6]:"},{"line_number":858,"context_line":"                changed_sg_info[type].add(sg_id)"},{"line_number":859,"context_line":"        if changed_sg_info[constants.IPv4] or changed_sg_info[constants.IPv6]:"},{"line_number":860,"context_line":"            self._update_ipset_members(changed_sg_info)"}],"source_content_type":"text/x-python","patch_set":41,"id":"9a68dd71_9ad96c86","line":857,"range":{"start_line":857,"start_character":16,"end_line":857,"end_character":20},"in_reply_to":"fa69d971_474cda9d","updated":"2016-01-26 12:19:38.000000000","message":"agree","commit_id":"460feca93a6265c336bb0f1c726c17dbf0cb538f"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c870fec2655117bdf84984e17b4128f164301444","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        for sg_id in self.devices_with_updated_sg_members:"},{"line_number":857,"context_line":"            for type in [constants.IPv4, constants.IPv6]:"},{"line_number":858,"context_line":"                changed_sg_info[type].add(sg_id)"},{"line_number":859,"context_line":"        if changed_sg_info[constants.IPv4] or changed_sg_info[constants.IPv6]:"},{"line_number":860,"context_line":"            self._update_ipset_members(changed_sg_info)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def filter_defer_apply_off(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa69d971_aaa8fd77","line":859,"updated":"2016-01-05 20:41:28.000000000","message":"Maybe you could do a short-circuit test at the top of the method to see if devices_with_updated_sg_members is empty and return, otherwise, unconditionally call update_ipset_members().\n\n    if not self.devices_with_updated_sg_members:\n        return\n    changed_sg_info \u003d {constants.IPv4: set(self.devices_with_udpated_sg_members),\n                       constants.IPv6: set(self.devices_with_udpated_sg_members)}\n    self._update_ipset_members(changed_sg_info)\n\n\nIf the two dict entries could be the same, you could do:\n    sg_ids \u003d set(self.devices_with_udpated_sg_members)\n    changed_sg_info \u003d {constants.IPv4: sg_id, constants.IPv6: sg_id}","commit_id":"460feca93a6265c336bb0f1c726c17dbf0cb538f"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"25b126c6bc70916b8c9d48df0c4b2c47d4dc9bd9","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        for sg_id in self.devices_with_updated_sg_members:"},{"line_number":857,"context_line":"            for type in [constants.IPv4, constants.IPv6]:"},{"line_number":858,"context_line":"                changed_sg_info[type].add(sg_id)"},{"line_number":859,"context_line":"        if changed_sg_info[constants.IPv4] or changed_sg_info[constants.IPv6]:"},{"line_number":860,"context_line":"            self._update_ipset_members(changed_sg_info)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def filter_defer_apply_off(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"9a68dd71_f95bd5f4","line":859,"in_reply_to":"fa69d971_aaa8fd77","updated":"2016-01-26 12:19:38.000000000","message":"you are right","commit_id":"460feca93a6265c336bb0f1c726c17dbf0cb538f"}],"neutron/agent/securitygroups_rpc.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"ffa3575e6e270315619d281b48cce0c49c98a9d6","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                self._update_security_group_info("},{"line_number":294,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":295,"context_line":"            for device in devices.values():"},{"line_number":296,"context_line":"                LOG.debug(_(\"Update port filter for %s\"), device[\u0027device\u0027])"},{"line_number":297,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def firewall_refresh_needed(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_0c078f1d","line":296,"updated":"2014-09-23 12:43:20.000000000","message":"Can remove i18n from debug level logs.","commit_id":"5e31228854d2fa7e4b81ac3ce53be11a4afdaf7a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"1cbf8a91e3cd58988cce66348234807ded0485a1","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                self._update_security_group_info("},{"line_number":294,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":295,"context_line":"            for device in devices.values():"},{"line_number":296,"context_line":"                LOG.debug(_(\"Update port filter for %s\"), device[\u0027device\u0027])"},{"line_number":297,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def firewall_refresh_needed(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_2b695e25","line":296,"in_reply_to":"da9df570_0c078f1d","updated":"2014-09-25 06:24:33.000000000","message":"thanks for your suggestion, I will modify it in next patch","commit_id":"5e31228854d2fa7e4b81ac3ce53be11a4afdaf7a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"cf65113f04ce2b5c41dea4660ea5a24a49cd4fcd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3a961159_83f9fb4f","updated":"2015-01-08 08:11:35.000000000","message":"Why are all of these being re-ordered? If they are asbolutely necessary for this change, add something to the commit message to explain why.","commit_id":"5010dec4c351165c08cef023ebc75e2faf19fdd2"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e068a939b832795516df16872af11d023907ede1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1a930d6b_0fe00ecc","in_reply_to":"3a961159_83f9fb4f","updated":"2015-01-26 04:03:18.000000000","message":"ok, thanks for you suggestion","commit_id":"5010dec4c351165c08cef023ebc75e2faf19fdd2"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"df0a10e0b25b5c55fd59a88fa5d0fe0999f35408","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_0beb6b78","line":313,"updated":"2015-01-27 09:01:54.000000000","message":"this module seems to have too much knowledge of the driver implementation, or vice versa.\n\ncan you at least document the expected calling order of these firewall driver methods somewhere?\nupdate_port_filter, filter_defer_apply_on, and update_security_group_*, ...","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"0143bea25519ef1eab27afaaca275ae800698aee","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_71aee3e7","line":313,"in_reply_to":"1a930d6b_0beb6b78","updated":"2015-02-04 06:21:18.000000000","message":"hi YAMAMOTO Takashi, thanks for your review, do you mean add what you said to commit message?","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"281d6f713a065ace70fc6bbab431d4f0bfaa976a","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_a8a06e92","line":313,"in_reply_to":"da86d52c_521eca60","updated":"2015-02-13 12:57:00.000000000","message":"+1,","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"92303888237c5fae4c639dd4e99f8f254d65db36","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_734487b7","line":313,"in_reply_to":"da86d52c_521eca60","updated":"2015-02-15 02:25:31.000000000","message":"agree, thanks for your review!","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1640481e97d2e85d7cd476ae6f5e27ede7dde4da","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_521eca60","line":313,"in_reply_to":"da86d52c_71aee3e7","updated":"2015-02-13 09:51:37.000000000","message":"I think at least commenting in this func (and in prepare_devices_filter() above) why the order of calls to driver matters fits the scope of this patch. Better documentation of proper firewall driver usage would be great but I believe deserves a separate patch.","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"90f68742973f2a74967da92ab24b00d5e9e01b2d","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_b115bbe6","line":313,"in_reply_to":"da86d52c_71aee3e7","updated":"2015-02-04 06:35:31.000000000","message":"docstring of FirewallDriver abs class is the best place i can think of.","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"92303888237c5fae4c639dd4e99f8f254d65db36","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":311,"context_line":"            for device in devices.values():"},{"line_number":312,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":313,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":316,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_93101bad","line":313,"in_reply_to":"da86d52c_a8a06e92","updated":"2015-02-15 02:25:31.000000000","message":"thanks","commit_id":"97f61be703bdadef92494d4599557d54a7ff9996"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"23dacb7d8b1fda4890fb981b2a437ca986b263d7","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                self.context, list(device_ids))"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        with self.firewall.defer_apply():"},{"line_number":238,"context_line":"            # When there are devices which need update their filter,"},{"line_number":239,"context_line":"            # it should firstly update security group rules and"},{"line_number":240,"context_line":"            # members residing on this host."},{"line_number":241,"context_line":"            if self.use_enhanced_rpc:"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_f58ed177","line":238,"updated":"2015-02-26 17:05:54.000000000","message":"I don\u0027t understand your comment here, aren\u0027t line 246 and 247 that deal with the devices that reside on this host? It seems you are doing exactly the opposite of what\u0027s stated in the comment","commit_id":"4d0b0c82a58c826a08af9c9cb526102616f1919b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa670eaf9df55ee0a12571c4fa1bd2bf4df718a","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                self._update_security_group_info("},{"line_number":165,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":166,"context_line":"            for device in devices.values():"},{"line_number":167,"context_line":"                self.firewall.prepare_port_filter(device)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _update_security_group_info(self, security_groups,"},{"line_number":170,"context_line":"                                    security_group_member_ips):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a29b11f_bc249a0c","line":167,"updated":"2015-10-23 04:18:49.000000000","message":"can you add a comment why the order matters?","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ae4d20674cb588d1680952463642aa1084221e94","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                self._update_security_group_info("},{"line_number":165,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":166,"context_line":"            for device in devices.values():"},{"line_number":167,"context_line":"                self.firewall.prepare_port_filter(device)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _update_security_group_info(self, security_groups,"},{"line_number":170,"context_line":"                                    security_group_member_ips):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a29b11f_65174645","line":167,"in_reply_to":"3a29b11f_bc249a0c","updated":"2015-10-23 06:16:58.000000000","message":"got it","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa670eaf9df55ee0a12571c4fa1bd2bf4df718a","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":255,"context_line":"            for device in devices.values():"},{"line_number":256,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":257,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":260,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a29b11f_7c1a82c7","line":257,"updated":"2015-10-23 04:18:49.000000000","message":"ditto","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ae4d20674cb588d1680952463642aa1084221e94","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":255,"context_line":"            for device in devices.values():"},{"line_number":256,"context_line":"                LOG.debug(\"Update port filter for %s\", device[\u0027device\u0027])"},{"line_number":257,"context_line":"                self.firewall.update_port_filter(device)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def firewall_refresh_needed(self):"},{"line_number":260,"context_line":"        return self.global_refresh_firewall or self.devices_to_refilter"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a29b11f_0529b289","line":257,"in_reply_to":"3a29b11f_7c1a82c7","updated":"2015-10-23 06:16:58.000000000","message":"Done","commit_id":"8a51339b17dfc463fa5da43dcfe0c1bbcd1bedca"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"b129156a50f500a5b506724e3e230fd11d71a4fa","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                          devices.keys())"},{"line_number":166,"context_line":"                self._update_security_group_info("},{"line_number":167,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":168,"context_line":"            for device in devices.values():"},{"line_number":169,"context_line":"                self.firewall.prepare_port_filter(device)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _update_security_group_info(self, security_groups,"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_a2cbaa52","line":168,"updated":"2015-11-17 12:46:31.000000000","message":"how are this lines related to the change?","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6563f23ca7ad26faa2b5db51031bb5c779f5577a","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                          devices.keys())"},{"line_number":166,"context_line":"                self._update_security_group_info("},{"line_number":167,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":168,"context_line":"            for device in devices.values():"},{"line_number":169,"context_line":"                self.firewall.prepare_port_filter(device)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _update_security_group_info(self, security_groups,"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba8a016a_79dead12","line":168,"in_reply_to":"ba8a016a_a2cbaa52","updated":"2015-11-18 02:03:24.000000000","message":"yes, we must firstly update the security group info in l2 agent local cache(in its memory), then update or prepare port filter","commit_id":"8a8684b567325c929109d1f9352c42f62b7ca29a"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ed49ec11e59d16004866d9163daad02c63a8b783","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                          devices.keys())"},{"line_number":168,"context_line":"                self._update_security_group_info("},{"line_number":169,"context_line":"                    security_groups, security_group_member_ips)"},{"line_number":170,"context_line":"            for device in devices.values():"},{"line_number":171,"context_line":"                self.firewall.prepare_port_filter(device)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _update_security_group_info(self, security_groups,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_99db2c4f","line":170,"updated":"2015-12-28 13:34:40.000000000","message":"What about splitting changes of this file into separate one? I think this improvements is worth to be backported.","commit_id":"460feca93a6265c336bb0f1c726c17dbf0cb538f"}],"neutron/tests/unit/agent/test_securitygroups_rpc.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c7f4251230523e2e61ba96fbc9ab972321222103","unresolved":false,"context_lines":[{"line_number":2855,"context_line":"        self.agent.prepare_devices_filter([\u0027tap_port1\u0027])"},{"line_number":2856,"context_line":"        self.sg_info.return_value \u003d self.devices_info2"},{"line_number":2857,"context_line":"        self.agent.security_groups_member_updated([\u0027security_group1\u0027])"},{"line_number":2858,"context_line":"        self.agent.prepare_devices_filter([\u0027tap_port2\u0027])"},{"line_number":2859,"context_line":"        self.sg_info.return_value \u003d self.devices_info1"},{"line_number":2860,"context_line":"        self.agent.security_groups_member_updated([\u0027security_group1\u0027])"},{"line_number":2861,"context_line":"        self.agent.remove_devices_filter([\u0027tap_port2\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_cdf3a309","side":"PARENT","line":2858,"updated":"2015-05-07 15:54:20.000000000","message":"why removing this line and line 2861?","commit_id":"48c336e4507d153b8f76e53589305b7dd5c45534"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"bce7cb79f23cac1d215d9aa84176eb7c89479862","unresolved":false,"context_lines":[{"line_number":2855,"context_line":"        self.agent.prepare_devices_filter([\u0027tap_port1\u0027])"},{"line_number":2856,"context_line":"        self.sg_info.return_value \u003d self.devices_info2"},{"line_number":2857,"context_line":"        self.agent.security_groups_member_updated([\u0027security_group1\u0027])"},{"line_number":2858,"context_line":"        self.agent.prepare_devices_filter([\u0027tap_port2\u0027])"},{"line_number":2859,"context_line":"        self.sg_info.return_value \u003d self.devices_info1"},{"line_number":2860,"context_line":"        self.agent.security_groups_member_updated([\u0027security_group1\u0027])"},{"line_number":2861,"context_line":"        self.agent.remove_devices_filter([\u0027tap_port2\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aca2d91_6145a115","side":"PARENT","line":2858,"in_reply_to":"1aca2d91_cdf3a309","updated":"2015-05-08 07:57:42.000000000","message":"in self.devices_info2, it is already include tap_port2 ip \"10.0.0.4\", this is to simulate this case: tap_port2 in different l2 agent will tap_port1, when tap_port2 was added to this sg, the l2 agent which tap_port1 residing on does not need reload iptables","commit_id":"48c336e4507d153b8f76e53589305b7dd5c45534"}]}
