)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"893e487392c011a780e37d045e5d7c0eb99c8e7b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"modify or delete when deffered apply is switched off."},{"line_number":11,"context_line":"If another process add, modify or delete flows on that dict during"},{"line_number":12,"context_line":"another process called deffered_apply_off, its flows could be ignored."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This fix doesn\u0027t purge anymore the dict at the end of the method"},{"line_number":15,"context_line":"\u0027deferred_apply_off\u0027 to prevent above case."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2F2iU%3D","line":13,"updated":"2014-01-07 17:12:43.000000000","message":"I think this should be greenthreads instead processes?","commit_id":"6874acca3770c3cff645fe964f26a4abb241f8d6"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"c46bdd4722bc3d1da0dfc33e1d14e0894437d223","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The OVS lib deferred apply methods use a dict to save flows to add,"},{"line_number":10,"context_line":"modify or delete when deffered apply is switched off."},{"line_number":11,"context_line":"If another process add, modify or delete flows on that dict during"},{"line_number":12,"context_line":"another process called deffered_apply_off, its flows could be ignored."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This fix stash reference flows list and point the flows list to a new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"AAAAWH%2F%2FF7o%3D","line":11,"updated":"2014-03-20 10:19:50.000000000","message":"another process?\nthe dict can not be shared between unix processes.\ndo you mean threads?","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"746023d912020544c32a47406868a80d535939be","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The OVS lib deferred apply methods use a dict to save flows to add,"},{"line_number":10,"context_line":"modify or delete when deffered apply is switched off."},{"line_number":11,"context_line":"If another process add, modify or delete flows on that dict during"},{"line_number":12,"context_line":"another process called deffered_apply_off, its flows could be ignored."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This fix stash reference flows list and point the flows list to a new"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"AAAAWH%2F%2FEeo%3D","line":11,"in_reply_to":"AAAAWH%2F%2FF7o%3D","updated":"2014-03-20 14:06:12.000000000","message":"Yes, thread.","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"}],"neutron/agent/linux/ovs_lib.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"bb11060c579ff3aef4760fc928d8eea211aa7829","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":241,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"},{"line_number":242,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":243,"context_line":"                while flows:"},{"line_number":244,"context_line":"                    flow_str \u003d flows.pop(0)"},{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F7Us%3D","line":243,"updated":"2013-12-27 00:42:04.000000000","message":"IMHO, i would prefer to perform 2 loops: one for computing flows_str.and other for debug  logging which is only executed if logging.isEnabledFor(logging.DEBUG)","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"6f657d084b7afff47e514d88fa74f2d11876b1af","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":241,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"},{"line_number":242,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":243,"context_line":"                while flows:"},{"line_number":244,"context_line":"                    flow_str \u003d flows.pop(0)"},{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F5aI%3D","line":243,"in_reply_to":"AAAAT3%2F%2F7Us%3D","updated":"2014-01-03 10:34:42.000000000","message":"I don\u0027t think it\u0027s a good idea to separate it in to different loops because the list could evolve in meanwhile. I could call only once \u0027LOG.debug\u0027 with \u0027flows_str\u0027 because this method interpret \u0027\\n\u0027","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"e87255f1cd24e44689ceb86fa7f932a8c4c91893","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"},{"line_number":247,"context_line":"                    flows_str +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":249,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8mZA%3D","line":248,"updated":"2013-12-24 14:39:31.000000000","message":"In the end, isn\u0027t flows_str \u003d\u003d flows ? I didn\u0027t get why you had to pop all elements in flows to put them in flows_str, without modying any of the item.\n\nI find the previous approach more pythonic though I prefer the way you named the variable flow_str instead of line.","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"6f657d084b7afff47e514d88fa74f2d11876b1af","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"},{"line_number":247,"context_line":"                    flows_str +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":249,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F5Z8%3D","line":248,"in_reply_to":"AAAAT3%2F%2F6MY%3D","updated":"2014-01-03 10:34:42.000000000","message":"Done","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"fb2c2beadc0679bedc18a99afb208d0125a52ec8","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"},{"line_number":247,"context_line":"                    flows_str +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":249,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F6MY%3D","line":248,"in_reply_to":"AAAAT3%2F%2F7VE%3D","updated":"2013-12-27 11:01:41.000000000","message":"Not really So defered, since if there are some actions remaining after this defer_apply_off, it means that there is a new defer_apply_on started, and then it will call defer_apply_off just after.\n\nBut I think there is something to do around the the flag self.defer_apply_flows, because if there is a first defer_apply_off, all the next actions will not be defered. \n\nex:\n\nt1. defer_apply_on\nt2. actions defered\nt3. defer_apply_on\nt4. actions defered\nt5. defer_apply_off (this one set the flag defered to false)\nt6. actions not defered (but a defered apply is still opened)\nt7. defer_apply_off\n\nMaybe a counter of defered sessions would be better ?","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"bb11060c579ff3aef4760fc928d8eea211aa7829","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                    LOG.debug(_(\u0027%(action)s: %(flow)s\u0027),"},{"line_number":246,"context_line":"                              {\u0027action\u0027: action, \u0027flow\u0027: flow_str})"},{"line_number":247,"context_line":"                    flows_str +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":249,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F7VE%3D","line":248,"in_reply_to":"AAAATn%2F8mZA%3D","updated":"2013-12-27 00:42:04.000000000","message":"If i understand well, not exactly because of race conditions it\u0027s possible to have flows_str !\u003d flows and previous/new self.deferred_flows differs.\n\nFor example, if someone performs an add_flow after the beginning of the iteration where action \u003d\u003d \u0027add\u0027: \n\nUsing previous approach,  flows becomes outdated and some information are lost because of self.deferred_flows cleaning.\n\nUsing new approach, self.defer_apply_flows always stores actions not applied and not about to be applied.\n\n\nBut ... i don\u0027t feel comfortable with the fact that at the end of self.defer_apply_off, some actions could be still in self.deferred_flows ... so deferred !","commit_id":"98ddd74b3e0b00b94a09f6847ea53c0e6c1a0fc4"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"911861438ef9a7b1c7dfd8ed96685480e08b2b23","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        LOG.debug(_(\u0027defer_apply_on\u0027))"},{"line_number":234,"context_line":"        if self.defer_apply_flows \u003e 0:"},{"line_number":235,"context_line":"            LOG.debug(_(\u0027An OVS deferred apply flows already in progress\u0027))"},{"line_number":236,"context_line":"        self.defer_apply_flows +\u003d 1"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def defer_apply_off(self):"},{"line_number":239,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F29o%3D","line":236,"updated":"2014-01-07 15:41:44.000000000","message":"This is not an atomic operation in python.  Seems like the count could get out-of-sync.","commit_id":"6874acca3770c3cff645fe964f26a4abb241f8d6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d70b642d7eccb4dd57865b41b4067d0f3655b5f1","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                            \u0027\\n%(flows_str)s\u0027),"},{"line_number":248,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":249,"context_line":"                           \u0027flows_str\u0027: flows_str})"},{"line_number":250,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":251,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":252,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":253,"context_line":"            msg \u003d _(\u0027The OVS deferred apply flows ON was not call before the \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F0qs%3D","line":250,"updated":"2014-01-08 02:36:11.000000000","message":"Although I\u0027m not sure if this causes issue or not, it would be subtle mix from multiple threads.\nHow about using thread local storage?","commit_id":"6874acca3770c3cff645fe964f26a4abb241f8d6"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"911861438ef9a7b1c7dfd8ed96685480e08b2b23","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":249,"context_line":"                           \u0027flows_str\u0027: flows_str})"},{"line_number":250,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":251,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":252,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":253,"context_line":"            msg \u003d _(\u0027The OVS deferred apply flows ON was not call before the \u0027"},{"line_number":254,"context_line":"                    \u0027OFF. Binary need to be restarted\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F29k%3D","line":251,"updated":"2014-01-07 15:41:44.000000000","message":"Same","commit_id":"6874acca3770c3cff645fe964f26a4abb241f8d6"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"4f0f90b9ac608598aed9ec608424ce156cff3eaa","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def add_flow(self, **kwargs):"},{"line_number":209,"context_line":"        flow_str \u003d self.add_or_mod_flow_str(**kwargs)"},{"line_number":210,"context_line":"        if self.defer_apply_flows:"},{"line_number":211,"context_line":"            self.deferred_flows[\u0027add\u0027].append(flow_str)"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            self.run_ofctl(\"add-flow\", [flow_str])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FyhA%3D","line":210,"updated":"2014-01-08 13:02:45.000000000","message":"As discussed with Edouard, some rules could be deferred even if not in a deferred apply block due to the use a this counter. But I think this fix is quite good and fixes the main concurrency issue IHMO.","commit_id":"2961e7efb2186dde4e3809c830350bd77ea33a4f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6fa619413920782f00edda387e635debc0973ed6","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            if flows:"},{"line_number":245,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":246,"context_line":"                while flows:"},{"line_number":247,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":248,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":249,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":250,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fnig%3D","line":247,"updated":"2014-01-10 12:48:54.000000000","message":"I\u0027m just asking here...\nis there a 0.0000000001% possibility of infinite loop due to flows being never empty as add_flow might add some other?\n\nThis is clearly never going to happen in production, it will be crazy. Perhaps you might copy flows, clear it, and then process the copy iterating over it.","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"48eb379cb86afa6338ad1a4099bb97e9c0612193","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            if flows:"},{"line_number":245,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":246,"context_line":"                while flows:"},{"line_number":247,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":248,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":249,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":250,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHEw%3D","line":247,"in_reply_to":"AAAAUH%2F%2Fnig%3D","updated":"2014-01-17 11:52:54.000000000","message":"Yes, that\u0027s probably could not arrive in production but we must prevent it.\n\nThe copy and clear list will not be an atomic operation. So I propose to replace the while loop by a for loop which breaks if an IndexError is raised by the pop method.","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6fa619413920782f00edda387e635debc0973ed6","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                while flows:"},{"line_number":247,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":248,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":249,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":250,"context_line":"                            \u0027%(flows_str)s\u0027),"},{"line_number":251,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":252,"context_line":"                           \u0027flows_str\u0027: flows_str})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fnic%3D","line":249,"updated":"2014-01-10 12:48:54.000000000","message":"I think the newline will just make log processing harder","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"48eb379cb86afa6338ad1a4099bb97e9c0612193","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                while flows:"},{"line_number":247,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":248,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":249,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":250,"context_line":"                            \u0027%(flows_str)s\u0027),"},{"line_number":251,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":252,"context_line":"                           \u0027flows_str\u0027: flows_str})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHEM%3D","line":249,"in_reply_to":"AAAAUH%2F%2Fnic%3D","updated":"2014-01-17 11:52:54.000000000","message":"I understand but I\u0027ve do that because \u0027flows_str\u0027 already contains newline for each flow.\n\nIf you prefer I can replace newline (in flows_str and log) by string like \u0027, \u0027 to have all log on one line ?","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6fa619413920782f00edda387e635debc0973ed6","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application of flows was \u0027"},{"line_number":257,"context_line":"                    \u0027desynchronized.\u0027)"},{"line_number":258,"context_line":"            LOG.error(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FnjQ%3D","line":257,"updated":"2014-01-10 12:48:54.000000000","message":"I don\u0027t get why desynchronized. This will mean the caller has turned off defer application without turning it on first, and therefore it should just be a noop","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"48eb379cb86afa6338ad1a4099bb97e9c0612193","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application of flows was \u0027"},{"line_number":257,"context_line":"                    \u0027desynchronized.\u0027)"},{"line_number":258,"context_line":"            LOG.error(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FG%2B0%3D","line":257,"in_reply_to":"AAAAUH%2F%2FnjQ%3D","updated":"2014-01-17 11:52:54.000000000","message":"Yes, I will remove that test at the beginning of the method.","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6fa619413920782f00edda387e635debc0973ed6","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application of flows was \u0027"},{"line_number":257,"context_line":"                    \u0027desynchronized.\u0027)"},{"line_number":258,"context_line":"            LOG.error(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fnjc%3D","line":258,"updated":"2014-01-10 12:48:54.000000000","message":"is that really an error? Probably more a warning...","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"48eb379cb86afa6338ad1a4099bb97e9c0612193","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application of flows was \u0027"},{"line_number":257,"context_line":"                    \u0027desynchronized.\u0027)"},{"line_number":258,"context_line":"            LOG.error(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHCU%3D","line":258,"in_reply_to":"AAAAUH%2F%2Fnjc%3D","updated":"2014-01-17 11:52:54.000000000","message":"Done","commit_id":"2a365be1d58a40eddcf34e7a5dd8a11b1829f9d9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b722dbe217bebefde188fc02452f39ce3523f2a4","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":262,"context_line":"            if flows:"},{"line_number":263,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":264,"context_line":"                for __ in range(len(flows)):"},{"line_number":265,"context_line":"                    try:"},{"line_number":266,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":267,"context_line":"                    except IndexError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFXk%3D","line":264,"updated":"2014-01-17 16:07:08.000000000","message":"What is the typical length of flows ?\n\nIn python2, range creates an array where xrange creates an iterator.\nSo i would prefer you use xrange or six.range for python2/3 compatibility","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"09b411e758ed0ec1e0c3bfbb21f1f5f7a9ec9685","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":262,"context_line":"            if flows:"},{"line_number":263,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":264,"context_line":"                for __ in range(len(flows)):"},{"line_number":265,"context_line":"                    try:"},{"line_number":266,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":267,"context_line":"                    except IndexError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFMM%3D","line":264,"in_reply_to":"AAAAUH%2F%2FFXk%3D","updated":"2014-01-17 16:29:46.000000000","message":"Done","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"512e4ca12bac20781b98689a4d5e2eeb5129f94b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c\u003d 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application was not activated. Turn \u0027"},{"line_number":257,"context_line":"                    \u0027defer apply on befor off.\u0027)"},{"line_number":258,"context_line":"            LOG.warning(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FAAE%3D","line":257,"updated":"2014-01-20 04:50:04.000000000","message":"nit: \"Turn defer apply on before turning it off.\"\n\nAlso, this second sentence of the message is for neutron developers, so it is not really useful to deployers/users. Maybe it is better to keep just the first sentence in the message, and put the second in a comment.","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"562f4c403355eeaa8e6ab7a3b22c11632993ecb9","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c\u003d 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application was not activated. Turn \u0027"},{"line_number":257,"context_line":"                    \u0027defer apply on befor off.\u0027)"},{"line_number":258,"context_line":"            LOG.warning(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B8bg%3D","line":257,"in_reply_to":"AAAAUH%2F%2B%2BEM%3D","updated":"2014-01-20 17:01:11.000000000","message":"Yes, that would be fine.","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"fb18366df56d558800d6c5430f9848d81d9bb3c1","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c\u003d 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application was not activated. Turn \u0027"},{"line_number":257,"context_line":"                    \u0027defer apply on befor off.\u0027)"},{"line_number":258,"context_line":"            LOG.warning(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B3WE%3D","line":257,"in_reply_to":"AAAAUH%2F%2B8bg%3D","updated":"2014-01-21 10:20:43.000000000","message":"Done","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"646b926a7b6cb95348e48cf0040648a602c9f8c5","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":255,"context_line":"        if self.defer_apply_flows \u003c\u003d 0:"},{"line_number":256,"context_line":"            msg \u003d _(\u0027The OVS deferred application was not activated. Turn \u0027"},{"line_number":257,"context_line":"                    \u0027defer apply on befor off.\u0027)"},{"line_number":258,"context_line":"            LOG.warning(msg)"},{"line_number":259,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":260,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B%2BEM%3D","line":257,"in_reply_to":"AAAAUH%2F%2FAAE%3D","updated":"2014-01-20 09:25:10.000000000","message":"Or I could keep the first sentence as warn and the second as debug?","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"512e4ca12bac20781b98689a4d5e2eeb5129f94b","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    try:"},{"line_number":266,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":267,"context_line":"                    except IndexError:"},{"line_number":268,"context_line":"                        break"},{"line_number":269,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":270,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":271,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B%2F%2Bo%3D","line":268,"updated":"2014-01-20 04:50:04.000000000","message":"Suggest instead of 264-268:\n\n    while len(flows):\n        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"562f4c403355eeaa8e6ab7a3b22c11632993ecb9","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    try:"},{"line_number":266,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":267,"context_line":"                    except IndexError:"},{"line_number":268,"context_line":"                        break"},{"line_number":269,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":270,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":271,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B8bA%3D","line":268,"in_reply_to":"AAAAUH%2F%2B%2BDI%3D","updated":"2014-01-20 17:01:11.000000000","message":"Ah yes, since you are not synchronizing the add/mod/del methods.","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"646b926a7b6cb95348e48cf0040648a602c9f8c5","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    try:"},{"line_number":266,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":267,"context_line":"                    except IndexError:"},{"line_number":268,"context_line":"                        break"},{"line_number":269,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":270,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":271,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B%2BDI%3D","line":268,"in_reply_to":"AAAAUH%2F%2B%2F%2Bo%3D","updated":"2014-01-20 09:25:10.000000000","message":"No, it doesn\u0027t work. The \u0027while\u0027 condition is evaluated on each iteration.","commit_id":"a83582752b145d9a0a2d67991ddef6d5d75bfd8a"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"2cb0838336b49c1a902eceecb6c69e61722ca1a1","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BFiM%3D","line":273,"updated":"2014-01-30 09:36:10.000000000","message":"I think you can remove the try/execpt, an exception due to IndexError will never happen, since this is the only method where there is a pop on the flows array and this method is synchronized ?","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7430b5fb80c82bbd2c5165c77138b0f0f8b9f7a4","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BENw%3D","line":273,"in_reply_to":"AAAAUH%2F%2BERE%3D","updated":"2014-01-30 14:35:35.000000000","message":"True.","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8d08b92210b25f3a69e2cee3a72620b96009c0f5","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BERE%3D","line":273,"in_reply_to":"AAAAUH%2F%2BET0%3D","updated":"2014-01-30 14:27:07.000000000","message":"Indeed adding a lock on defer_apply_off make the try except IndexError useless","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"2ec6528c8b878d1f6aae2eb92c2238eb89c6533d","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BET0%3D","line":273,"in_reply_to":"AAAAUH%2F%2BEf4%3D","updated":"2014-01-30 14:20:06.000000000","message":"Ok, but add/mod/delete_flows increase the number of items in the list with append. So imho I think we never pop items than the number of items present in the list ?","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"3261c33be1fcf7af245111dd2bfbf5553051b544","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9%2Fgk%3D","line":273,"in_reply_to":"AAAAUH%2F%2BFiM%3D","updated":"2014-01-31 08:50:33.000000000","message":"Done","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"f57047ed340951d17123dee6042fddd962865609","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    try:"},{"line_number":272,"context_line":"                        flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":273,"context_line":"                    except IndexError:"},{"line_number":274,"context_line":"                        break"},{"line_number":275,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":276,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BEf4%3D","line":273,"in_reply_to":"AAAAUH%2F%2BFiM%3D","updated":"2014-01-30 13:32:21.000000000","message":"Unfortunately flows is pointing at self.deferred_flows, which is updated by add/mod/delete_flows which are not synchronized.","commit_id":"5830e2f244c2a3448fa2f45c0ad32e37ef3248f9"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7bd88949932a884743f5a46ed6416cbaf60c7583","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            msg \u003d _(\u0027Turn defer apply ON before OFF.\u0027)"},{"line_number":259,"context_line":"            LOG.debug(msg)"},{"line_number":260,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":261,"context_line":"            return"},{"line_number":262,"context_line":"        # NOTE(ethuleau): sort deferred flows list on the action key to be sure"},{"line_number":263,"context_line":"        # to set flows in this order: add, delete then modify."},{"line_number":264,"context_line":"        # Sometimes, when we need to modify flow, it\u0027s preferable to add flow"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B52U%3D","line":261,"updated":"2014-02-18 09:47:26.000000000","message":"There is no check if defer_apply_flows \u003e 0.","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"061bf7a0be9908a5b2a9e576dc1ab2f6db0ab6e8","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            msg \u003d _(\u0027Turn defer apply ON before OFF.\u0027)"},{"line_number":259,"context_line":"            LOG.debug(msg)"},{"line_number":260,"context_line":"            self.defer_apply_flows \u003d 0"},{"line_number":261,"context_line":"            return"},{"line_number":262,"context_line":"        # NOTE(ethuleau): sort deferred flows list on the action key to be sure"},{"line_number":263,"context_line":"        # to set flows in this order: add, delete then modify."},{"line_number":264,"context_line":"        # Sometimes, when we need to modify flow, it\u0027s preferable to add flow"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B408%3D","line":261,"in_reply_to":"AAAAUX%2F%2B52U%3D","updated":"2014-02-18 13:09:59.000000000","message":"As we check defer_apply_flows \u003c\u003d 0 at line 255 and return at line 261, defer_apply_flows is necessarily \u003e 0","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7bd88949932a884743f5a46ed6416cbaf60c7583","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            if flows:"},{"line_number":269,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":272,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":273,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":274,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B53M%3D","line":271,"updated":"2014-02-18 09:47:26.000000000","message":"How about flows_str \u003d \u0027\\n\u0027.join(flows)?","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"061bf7a0be9908a5b2a9e576dc1ab2f6db0ab6e8","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            if flows:"},{"line_number":269,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":270,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":271,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":272,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":273,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"},{"line_number":274,"context_line":"                            \u0027%(flows_str)s\u0027),"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B4vQ%3D","line":271,"in_reply_to":"AAAAUX%2F%2B53M%3D","updated":"2014-02-18 13:09:59.000000000","message":"I don\u0027t know if the \u0027join\u0027 method is thread safe, otherwise I need to pop the elements I concatenated into the string \u0027flows_str\u0027.\n\nIf join is thread safe, it\u0027s possible to do:\n\n flows_len \u003d len(flows)\n flows_str \u003d \u0027\\n\u0027.join(flows[:flows_len])\n del flows[:flows_len]","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7bd88949932a884743f5a46ed6416cbaf60c7583","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            \u0027%(flows_str)s\u0027),"},{"line_number":275,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":276,"context_line":"                           \u0027flows_str\u0027: flows_str})"},{"line_number":277,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":278,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B514%3D","line":277,"updated":"2014-02-18 09:47:26.000000000","message":"This can switch treads. race?","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"061bf7a0be9908a5b2a9e576dc1ab2f6db0ab6e8","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            \u0027%(flows_str)s\u0027),"},{"line_number":275,"context_line":"                          {\u0027bridge\u0027: self.br_name, \u0027action\u0027: action,"},{"line_number":276,"context_line":"                           \u0027flows_str\u0027: flows_str})"},{"line_number":277,"context_line":"                self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows_str)"},{"line_number":278,"context_line":"        self.defer_apply_flows -\u003d 1"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def add_tunnel_port(self, port_name, remote_ip, local_ip,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUX%2F%2B4gA%3D","line":277,"updated":"2014-02-18 13:09:59.000000000","message":"What do you mean?\n\nThe defer apply permit to apply multi flows in one ofctl command.\n\nIf some flows was added during the apply, they will be apply in the next defer apply off.","commit_id":"2d9cadb0a1f99a531c4cfcfa0fd512fdc2917468"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"7038aa66868205cc4819b8338a615cbb06753a4d","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            flows \u003d self.deferred_flows[action]"},{"line_number":273,"context_line":"            if flows:"},{"line_number":274,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":275,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":276,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":277,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":278,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAU3%2F%2F6j8%3D","line":275,"updated":"2014-02-24 04:26:36.000000000","message":"while flows:\n     flows_str +\u003d flows.pop(0) + \u0027\\n\u0027\n     ...","commit_id":"27a5c0018cc75f5c933c4f8cefc36696566b1071"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"45036c48dc7139c4f8d9958f326557377b5c1e78","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            flows \u003d self.deferred_flows[action]"},{"line_number":273,"context_line":"            if flows:"},{"line_number":274,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":275,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":276,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":277,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":278,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAU3%2F%2F4dE%3D","line":275,"in_reply_to":"AAAAU3%2F%2F6Wc%3D","updated":"2014-02-24 10:29:35.000000000","message":"Done","commit_id":"27a5c0018cc75f5c933c4f8cefc36696566b1071"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"55fcbad53dc6092b5d1f2c81bac5ca572c5bd9e4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            flows \u003d self.deferred_flows[action]"},{"line_number":273,"context_line":"            if flows:"},{"line_number":274,"context_line":"                flows_str \u003d \u0027\u0027"},{"line_number":275,"context_line":"                for __ in xrange(len(flows)):"},{"line_number":276,"context_line":"                    flows_str +\u003d flows.pop(0) + \u0027\\n\u0027"},{"line_number":277,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows to bridge \u0027"},{"line_number":278,"context_line":"                            \u0027%(bridge)s for action %(action)s:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAU3%2F%2F6Wc%3D","line":275,"in_reply_to":"AAAAU3%2F%2F6j8%3D","updated":"2014-02-24 05:11:36.000000000","message":"That would compete against add_flows() and might take a long time to empty the list. I agree this is not obvious and I think it a comment should be added in the code.","commit_id":"27a5c0018cc75f5c933c4f8cefc36696566b1071"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2017e7391bb71986ae2e8b26c5ab8d23e7a9ec50","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        # Note(ethuleau): copy flows and disable deferred mode. Then apply"},{"line_number":266,"context_line":"        # flows from the copy to be sure to not purge flows that was added"},{"line_number":267,"context_line":"        # between 2 ofctl commands."},{"line_number":268,"context_line":"        deferred_flows_copy \u003d copy.copy(self.deferred_flows)"},{"line_number":269,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":270,"context_line":"        self.deferred_flows \u003d {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":271,"context_line":"        for action, flows in deferred_flows_copy.items():"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2F2cE%3D","line":268,"updated":"2014-03-03 20:00:33.000000000","message":"what append if a defer_apply_on + an action is done during the copy ?\n\nI could be a UT for the patch (patching copy.copy in order to run a new defer_apply_on + action before the real copy.copy ... like in patchset 2)","commit_id":"83d0ac5992c8921670f2c4b0cdc35b86954b2394"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"3b6a447775442977e5dce87009b91d8297203897","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        # Note(ethuleau): copy flows and disable deferred mode. Then apply"},{"line_number":266,"context_line":"        # flows from the copy to be sure to not purge flows that was added"},{"line_number":267,"context_line":"        # between 2 ofctl commands."},{"line_number":268,"context_line":"        deferred_flows_copy \u003d copy.copy(self.deferred_flows)"},{"line_number":269,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":270,"context_line":"        self.deferred_flows \u003d {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":271,"context_line":"        for action, flows in deferred_flows_copy.items():"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAVn%2F%2FxOw%3D","line":268,"in_reply_to":"AAAAVn%2F%2F2cE%3D","updated":"2014-03-04 07:40:27.000000000","message":"As you said on IRC, copy.copy is not thread-safe. But it\u0027s not possible to interrupted during a copy. I\u0027m not sure but only a context switching could be use to change the main thread. And copy.copy does not generate context switching. Are you agree?\n\nYes the test in patch set #2 could be use here. I forget that unit test. I\u0027ll add it.","commit_id":"83d0ac5992c8921670f2c4b0cdc35b86954b2394"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"a7daef5dc2a08158f094be0049537cdf4acd0457","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        # Note(ethuleau): copy flows and disable deferred mode. Then apply"},{"line_number":266,"context_line":"        # flows from the copy to be sure to not purge flows that was added"},{"line_number":267,"context_line":"        # between 2 ofctl commands."},{"line_number":268,"context_line":"        deferred_flows_copy \u003d copy.copy(self.deferred_flows)"},{"line_number":269,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":270,"context_line":"        self.deferred_flows \u003d {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":271,"context_line":"        for action, flows in deferred_flows_copy.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2FVqs%3D","line":268,"updated":"2014-03-18 14:39:43.000000000","message":"copy.copy is not necessary here you only need to stash the reference, so this will work:\n\ndeferred_flows_copy \u003d self.deferred_flows","commit_id":"fe2423dd3eabf21fed9e62b9f951d6d8453f87d5"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"f853ea1fbd75b01b3570fc98a3f5a3a135a291e9","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        # Note(ethuleau): copy flows and disable deferred mode. Then apply"},{"line_number":266,"context_line":"        # flows from the copy to be sure to not purge flows that was added"},{"line_number":267,"context_line":"        # between 2 ofctl commands."},{"line_number":268,"context_line":"        deferred_flows_copy \u003d copy.copy(self.deferred_flows)"},{"line_number":269,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":270,"context_line":"        self.deferred_flows \u003d {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":271,"context_line":"        for action, flows in deferred_flows_copy.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2FTTg%3D","line":268,"in_reply_to":"AAAAWH%2F%2FVqs%3D","updated":"2014-03-18 18:49:09.000000000","message":"Done","commit_id":"fe2423dd3eabf21fed9e62b9f951d6d8453f87d5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e74aa0bf03fcfa2f66e6f2d4ea7b01961b1265bf","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            self.deferred_flows[\u0027del\u0027] +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"        else:"},{"line_number":249,"context_line":"            self.run_ofctl(\"del-flows\", [flow_str])"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def defer_apply_on(self):"},{"line_number":252,"context_line":"        LOG.debug(_(\u0027defer_apply_on\u0027))"},{"line_number":253,"context_line":"        self.defer_apply_flows \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BZFs%3D","line":250,"updated":"2014-03-27 05:36:39.000000000","message":"assert not self.defer_apply_flows","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"ffb34cd9cc2bcacee237765330e466b4a9861aab","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            self.deferred_flows[\u0027del\u0027] +\u003d flow_str + \u0027\\n\u0027"},{"line_number":248,"context_line":"        else:"},{"line_number":249,"context_line":"            self.run_ofctl(\"del-flows\", [flow_str])"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def defer_apply_on(self):"},{"line_number":252,"context_line":"        LOG.debug(_(\u0027defer_apply_on\u0027))"},{"line_number":253,"context_line":"        self.defer_apply_flows \u003d True"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BCUo%3D","line":250,"in_reply_to":"AAAAWH%2F%2BZFs%3D","updated":"2014-03-31 12:11:15.000000000","message":"The objective of that patch is to be able to handle concurrently deferred applying OVS flows.\n\nSo I can not add an assert here if a new thread deferred OVS flows when they are already deferred by another thread.","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e74aa0bf03fcfa2f66e6f2d4ea7b01961b1265bf","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        LOG.debug(_(\u0027defer_apply_on\u0027))"},{"line_number":253,"context_line":"        self.defer_apply_flows \u003d True"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def defer_apply_off(self):"},{"line_number":256,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":257,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":258,"context_line":"            if flows:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BZF8%3D","line":255,"updated":"2014-03-27 05:36:39.000000000","message":"assert self.defer_apply_flows","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"ffb34cd9cc2bcacee237765330e466b4a9861aab","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        LOG.debug(_(\u0027defer_apply_on\u0027))"},{"line_number":253,"context_line":"        self.defer_apply_flows \u003d True"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def defer_apply_off(self):"},{"line_number":256,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":257,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":258,"context_line":"            if flows:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BCUk%3D","line":255,"in_reply_to":"AAAAWH%2F%2BZF8%3D","updated":"2014-03-31 12:11:15.000000000","message":"Same as above.","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"46c8292acae017efa8e842c9dad2ad3efb0bf6ed","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        stashed_deferred_flows, self.deferred_flows \u003d ("},{"line_number":268,"context_line":"            self.deferred_flows, {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":271,"context_line":"        for action, flows in stashed_deferred_flows.items():"},{"line_number":272,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows)"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2B4TM%3D","line":270,"updated":"2014-03-22 02:29:08.000000000","message":"to make it a little more robust against threaded-use,\nhow about making defer_apply_flows a reference count like?","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"8330e65c6d1c6345a1bd20104a9995c790f0c28b","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        stashed_deferred_flows, self.deferred_flows \u003d ("},{"line_number":268,"context_line":"            self.deferred_flows, {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":271,"context_line":"        for action, flows in stashed_deferred_flows.items():"},{"line_number":272,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows)"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BgU8%3D","line":270,"in_reply_to":"AAAAWH%2F%2B4TM%3D","updated":"2014-03-26 10:38:07.000000000","message":"Edouard has tested this approach few patch set ago, much more complicated than this one","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"ffb34cd9cc2bcacee237765330e466b4a9861aab","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        stashed_deferred_flows, self.deferred_flows \u003d ("},{"line_number":268,"context_line":"            self.deferred_flows, {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":271,"context_line":"        for action, flows in stashed_deferred_flows.items():"},{"line_number":272,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows)"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BCSs%3D","line":270,"in_reply_to":"AAAAWH%2F%2BZGI%3D","updated":"2014-03-31 12:11:15.000000000","message":"Illegal usage?","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e74aa0bf03fcfa2f66e6f2d4ea7b01961b1265bf","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        stashed_deferred_flows, self.deferred_flows \u003d ("},{"line_number":268,"context_line":"            self.deferred_flows, {\u0027add\u0027: \u0027\u0027, \u0027mod\u0027: \u0027\u0027, \u0027del\u0027: \u0027\u0027}"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        self.defer_apply_flows \u003d False"},{"line_number":271,"context_line":"        for action, flows in stashed_deferred_flows.items():"},{"line_number":272,"context_line":"            self.run_ofctl(\u0027%s-flows\u0027 % action, [\u0027-\u0027], flows)"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BZGI%3D","line":270,"in_reply_to":"AAAAWH%2F%2BgU8%3D","updated":"2014-03-27 05:36:39.000000000","message":"please add assertions to prevent illegal usages then.","commit_id":"86702164f635341ead74f099894966bd0b4fc6ec"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"33bccc4056f0b8502b4419936c5c1f0e5f7c0811","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def defer_apply_off(self):"},{"line_number":210,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":211,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":212,"context_line":"            if flows:"},{"line_number":213,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":214,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ad9bd40_44c17b7f","line":211,"updated":"2014-05-01 06:26:24.000000000","message":"it\u0027s clearer to use stashed_deferred_flows for logging as well.","commit_id":"dc4ce5946de0686e07eff79704be497c649734d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9e269b1d3f668daf27e46e3d134b8cdf5ad9cb05","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def defer_apply_off(self):"},{"line_number":210,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":211,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":212,"context_line":"            if flows:"},{"line_number":213,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":214,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ad9bd40_6f548654","line":211,"in_reply_to":"9ad9bd40_44c17b7f","updated":"2014-05-01 22:58:49.000000000","message":"+1  It isn\u0027t just clearer, it is correct.","commit_id":"dc4ce5946de0686e07eff79704be497c649734d2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"41d898df8fd250c39bf22929742b24e9533e8b8c","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def defer_apply_off(self):"},{"line_number":210,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":211,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":212,"context_line":"            if flows:"},{"line_number":213,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":214,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ad9bd40_e5d35736","line":211,"in_reply_to":"9ad9bd40_6f548654","updated":"2014-05-02 01:01:45.000000000","message":"I agree.","commit_id":"dc4ce5946de0686e07eff79704be497c649734d2"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"8f200cf933614af9f9f8282ae989833184acfd3b","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def defer_apply_off(self):"},{"line_number":210,"context_line":"        LOG.debug(_(\u0027defer_apply_off\u0027))"},{"line_number":211,"context_line":"        for action, flows in self.deferred_flows.items():"},{"line_number":212,"context_line":"            if flows:"},{"line_number":213,"context_line":"                LOG.debug(_(\u0027Applying following deferred flows \u0027"},{"line_number":214,"context_line":"                            \u0027to bridge %s\u0027), self.br_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"7adec928_71e1b799","line":211,"in_reply_to":"9ad9bd40_e5d35736","updated":"2014-05-10 18:56:40.000000000","message":"Yes, sorry for missing that.","commit_id":"dc4ce5946de0686e07eff79704be497c649734d2"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b722dbe217bebefde188fc02452f39ce3523f2a4","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            agent_ports.pop(self.local_ip, None)"},{"line_number":355,"context_line":"            if len(agent_ports):"},{"line_number":356,"context_line":"                try:"},{"line_number":357,"context_line":"                    self.tun_br.defer_apply_on()"},{"line_number":358,"context_line":"                    for agent_ip, ports in agent_ports.items():"},{"line_number":359,"context_line":"                        # Ensure we have a tunnel port with this remote agent"},{"line_number":360,"context_line":"                        ofport \u003d self.tun_br_ofports["}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFWY%3D","line":357,"updated":"2014-01-17 16:07:08.000000000","message":"self.tun_br.defer_apply_on must be outside of the try finally otherwise self.tun_br.defer_apply_off is called even if self.tun_br.defer_apply_on crashes","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"09b411e758ed0ec1e0c3bfbb21f1f5f7a9ec9685","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            agent_ports.pop(self.local_ip, None)"},{"line_number":355,"context_line":"            if len(agent_ports):"},{"line_number":356,"context_line":"                try:"},{"line_number":357,"context_line":"                    self.tun_br.defer_apply_on()"},{"line_number":358,"context_line":"                    for agent_ip, ports in agent_ports.items():"},{"line_number":359,"context_line":"                        # Ensure we have a tunnel port with this remote agent"},{"line_number":360,"context_line":"                        ofport \u003d self.tun_br_ofports["}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFLw%3D","line":357,"in_reply_to":"AAAAUH%2F%2FFWY%3D","updated":"2014-01-17 16:29:46.000000000","message":"Done","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b722dbe217bebefde188fc02452f39ce3523f2a4","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            agent_ports.pop(self.local_ip, None)"},{"line_number":383,"context_line":"            if len(agent_ports):"},{"line_number":384,"context_line":"                try:"},{"line_number":385,"context_line":"                    self.tun_br.defer_apply_on()"},{"line_number":386,"context_line":"                    for agent_ip, ports in agent_ports.items():"},{"line_number":387,"context_line":"                        ofport \u003d self.tun_br_ofports["},{"line_number":388,"context_line":"                            lvm.network_type].get(agent_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFVY%3D","line":385,"updated":"2014-01-17 16:07:08.000000000","message":"itto","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"09b411e758ed0ec1e0c3bfbb21f1f5f7a9ec9685","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            agent_ports.pop(self.local_ip, None)"},{"line_number":383,"context_line":"            if len(agent_ports):"},{"line_number":384,"context_line":"                try:"},{"line_number":385,"context_line":"                    self.tun_br.defer_apply_on()"},{"line_number":386,"context_line":"                    for agent_ip, ports in agent_ports.items():"},{"line_number":387,"context_line":"                        ofport \u003d self.tun_br_ofports["},{"line_number":388,"context_line":"                            lvm.network_type].get(agent_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FFLo%3D","line":385,"in_reply_to":"AAAAUH%2F%2FFVY%3D","updated":"2014-01-17 16:29:46.000000000","message":"Done","commit_id":"f49669c0db3ed56b34b5f40bad3ffd5499372fc3"}],"neutron/tests/unit/agent/linux/test_ovs_lib.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9e269b1d3f668daf27e46e3d134b8cdf5ad9cb05","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                          **params)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_defer_apply_flows(self):"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        flow_expr \u003d mock.patch.object(ovs_lib, \u0027_build_flow_expr_str\u0027).start()"},{"line_number":385,"context_line":"        flow_expr.side_effect \u003d [\u0027added_flow_1\u0027, \u0027added_flow_2\u0027,"},{"line_number":386,"context_line":"                                 \u0027deleted_flow_1\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ad9bd40_2fd27ed2","side":"PARENT","line":383,"updated":"2014-05-01 22:58:49.000000000","message":"Don\u0027t remove this line please.  It is not related to the patch.","commit_id":"c13780dc4c4aa962bc0b4a6ddad18a02f7efbfdd"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"8f200cf933614af9f9f8282ae989833184acfd3b","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                          **params)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_defer_apply_flows(self):"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        flow_expr \u003d mock.patch.object(ovs_lib, \u0027_build_flow_expr_str\u0027).start()"},{"line_number":385,"context_line":"        flow_expr.side_effect \u003d [\u0027added_flow_1\u0027, \u0027added_flow_2\u0027,"},{"line_number":386,"context_line":"                                 \u0027deleted_flow_1\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"7adec928_31fe4f39","side":"PARENT","line":383,"in_reply_to":"9ad9bd40_2fd27ed2","updated":"2014-05-10 18:56:40.000000000","message":"Done","commit_id":"c13780dc4c4aa962bc0b4a6ddad18a02f7efbfdd"}]}
