)]}'
{"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"bfebcb81224a5aa1c1ed86c7a353cae7c4c0d111","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dFalse):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_89261915","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":41},"updated":"2019-09-24 08:34:55.000000000","message":"In next upload, let\u0027s set this to True to see what will happen.","commit_id":"9f10cb1017bc67ef10b4e64f0dc27d3811758214"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6497a9e70f637f3d3ef451975303e86d4f321d82","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dFalse):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a980b5c0","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":41},"in_reply_to":"3fa7e38b_89261915","updated":"2019-09-24 08:36:29.000000000","message":"IMO, install rule once should be the expected behavior we want.","commit_id":"9f10cb1017bc67ef10b4e64f0dc27d3811758214"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2875e617a520770de50fab342c2381da2ed48210","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if once and any(r \u003d\u003d rule for r in self.rules):"},{"line_number":229,"context_line":"            return"},{"line_number":230,"context_line":"        self.rules.append(rule)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _wrap_target_chain(self, s, wrap):"},{"line_number":233,"context_line":"        if s.startswith(\u0027$\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_158c6c34","line":230,"updated":"2019-09-24 18:42:22.000000000","message":"I would still like to know how the duplicate rule is being added, if there is a neutron code path doing it we should fix it.","commit_id":"9f10cb1017bc67ef10b4e64f0dc27d3811758214"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a4ccd6edddb4ddd09cdbdb05f4c716ae16c41b29","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if once and any(r \u003d\u003d rule for r in self.rules):"},{"line_number":229,"context_line":"            return"},{"line_number":230,"context_line":"        self.rules.append(rule)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _wrap_target_chain(self, s, wrap):"},{"line_number":233,"context_line":"        if s.startswith(\u0027$\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f0967b93","line":230,"in_reply_to":"3fa7e38b_158c6c34","updated":"2019-09-24 23:15:47.000000000","message":"\u0027add_rule\u0027 is called widely, I may say any parallel processing may produce duplicate rules.\nhttp://codesearch.openstack.org/?q\u003dadd_rule\u0026i\u003dnope\u0026files\u003d\u0026repos\u003dopenstack/neutron","commit_id":"9f10cb1017bc67ef10b4e64f0dc27d3811758214"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7019063eadd55e98d6216e4155bbbf6e351e916a","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if once and any(r \u003d\u003d rule for r in self.rules):"},{"line_number":229,"context_line":"            return"},{"line_number":230,"context_line":"        self.rules.append(rule)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _wrap_target_chain(self, s, wrap):"},{"line_number":233,"context_line":"        if s.startswith(\u0027$\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4d3ecd8b","line":230,"in_reply_to":"3fa7e38b_f0967b93","updated":"2019-09-25 13:34:35.000000000","message":"It is called from a lot of places, but not typically with the same arguments.  And since these are wrapped rules two calls putting them in the same chain don\u0027t really happen.  If some script is adding rules manually and causing issues then the script should be fixed, that\u0027s something I\u0027ve seen happen before.","commit_id":"9f10cb1017bc67ef10b4e64f0dc27d3811758214"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"951a973ab6594d3cde2327841815485861feff87","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dFalse):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":9,"id":"91b1a41b_6ebba96f","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":41},"updated":"2021-04-21 07:47:45.000000000","message":"I expected this will be called with once\u003dTrue somewhere is this patch. Otherwise what\u0027s the point?","commit_id":"bb0edf0385ec55381a4656f59ae036714fa0f26c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b18c98622724a8c55acfcae16e7975dd88e771f6","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dFalse):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":9,"id":"e8ebd21e_dcd5b806","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":41},"in_reply_to":"380323a4_0b8824bd","updated":"2021-04-22 07:53:15.000000000","message":"I have the same opinion and I\u0027m going an step further: this should be \"True\" by default (actually I don\u0027t see any use case where this should be \"False\").\n\nWe should try it.\n\n\nBTW, nice to see this patch. That could skip hidden problems.","commit_id":"bb0edf0385ec55381a4656f59ae036714fa0f26c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b5479f972f746cb721b529e83e22167f828d5a55","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dFalse):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":9,"id":"380323a4_0b8824bd","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":41},"in_reply_to":"91b1a41b_6ebba96f","updated":"2021-04-21 08:39:46.000000000","message":"Just failed to make functional test happy 😞, it\u0027s really not human readable code...","commit_id":"bb0edf0385ec55381a4656f59ae036714fa0f26c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"63760d2a7390363210b24e38737f5dd66d5a133f","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dTrue):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":11,"id":"0453cc55_926d00e2","line":206,"updated":"2021-04-23 10:38:32.000000000","message":"where do we use that parameter and set it to False? Is it really needed?","commit_id":"b3525748424d5b9d3d14493b7b0c2bf374a74a8c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"42797f243e77814fefc63cc5dc9f36f9001bf26a","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                      if r.chain !\u003d name and jump_snippet not in r.rule]"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def add_rule(self, chain, rule, wrap\u003dTrue, top\u003dFalse, tag\u003dNone,"},{"line_number":206,"context_line":"                 comment\u003dNone, once\u003dTrue):"},{"line_number":207,"context_line":"        \"\"\"Add a rule to the table."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        This is just like what you\u0027d feed to iptables, just without"}],"source_content_type":"text/x-python","patch_set":11,"id":"58105685_00ecc7c9","line":206,"in_reply_to":"0453cc55_926d00e2","updated":"2021-04-25 00:47:13.000000000","message":"For backward compatibility, and give a chance for some projects which may use this.","commit_id":"b3525748424d5b9d3d14493b7b0c2bf374a74a8c"}],"neutron/tests/unit/agent/linux/test_iptables_manager.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"63760d2a7390363210b24e38737f5dd66d5a133f","unresolved":true,"context_lines":[{"line_number":830,"context_line":"        self.iptables.ipv4[\u0027filter\u0027].add_rule(\u0027INPUT\u0027,"},{"line_number":831,"context_line":"                                              \u0027-s 0/0 -d 192.168.0.2 -j\u0027"},{"line_number":832,"context_line":"                                              \u0027 %(bn)s-filter\u0027 % IPTABLES_ARG,"},{"line_number":833,"context_line":"                                              once\u003dTrue)"},{"line_number":834,"context_line":"        self.iptables.ipv4[\u0027filter\u0027].add_rule(\u0027INPUT\u0027,"},{"line_number":835,"context_line":"                                              \u0027-s 0/0 -d 192.168.0.3 -j\u0027"},{"line_number":836,"context_line":"                                              \u0027 %(bn)s-filter\u0027 % IPTABLES_ARG,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dcb722b5_f8b91b73","line":833,"range":{"start_line":833,"start_character":46,"end_line":833,"end_character":55},"updated":"2021-04-23 10:38:32.000000000","message":"this is default value, do You need to pass it here explicitly?","commit_id":"b3525748424d5b9d3d14493b7b0c2bf374a74a8c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"42797f243e77814fefc63cc5dc9f36f9001bf26a","unresolved":true,"context_lines":[{"line_number":830,"context_line":"        self.iptables.ipv4[\u0027filter\u0027].add_rule(\u0027INPUT\u0027,"},{"line_number":831,"context_line":"                                              \u0027-s 0/0 -d 192.168.0.2 -j\u0027"},{"line_number":832,"context_line":"                                              \u0027 %(bn)s-filter\u0027 % IPTABLES_ARG,"},{"line_number":833,"context_line":"                                              once\u003dTrue)"},{"line_number":834,"context_line":"        self.iptables.ipv4[\u0027filter\u0027].add_rule(\u0027INPUT\u0027,"},{"line_number":835,"context_line":"                                              \u0027-s 0/0 -d 192.168.0.3 -j\u0027"},{"line_number":836,"context_line":"                                              \u0027 %(bn)s-filter\u0027 % IPTABLES_ARG,"}],"source_content_type":"text/x-python","patch_set":11,"id":"2eb27988_55901b2c","line":833,"range":{"start_line":833,"start_character":46,"end_line":833,"end_character":55},"in_reply_to":"dcb722b5_f8b91b73","updated":"2021-04-25 00:47:13.000000000","message":"1. No matter the default value of the orignal function is, this test case always run the \"once\u003dTrue\" case.\n2. The Zen of Python: explicit is better than implicit.","commit_id":"b3525748424d5b9d3d14493b7b0c2bf374a74a8c"}]}
