)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4f139b9b3c386098cc18855d1e6b7b082a08c4c0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"in the process_router method"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partially-Implements:"},{"line_number":14,"context_line":"https://blueprints.launchpad.net/openstack/?searchtext\u003drestructure-l3-agent"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7594c16a3ee3b9c988c7db856f9f401e4742f4c2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_83f3299e","line":14,"updated":"2014-12-18 12:11:20.000000000","message":"blueprint restructure-l3-agent?","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"cbcb4533b6b59ea27537d6f6577092723a7e568d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Refactor of floating ip processing in L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Breaks down the processing of floating ip processing in 3 methods. A key goal"},{"line_number":10,"context_line":"is to make the handling of ip tables aplication deferal more logically cohesive"},{"line_number":11,"context_line":"in the process_router method"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partially-Implements: bp restructure-l3-agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_b51630a5","line":10,"updated":"2015-01-08 02:57:30.000000000","message":"nit: application deferral","commit_id":"06df3457da962b2e05dc473ddabd95ca7b928849"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6534af20f0d6b1a216ca15eb7c9abef350806744","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Refactor of floating ip processing in L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Breaks down the processing of floating ip processing in 3 methods. A key goal"},{"line_number":10,"context_line":"is to make the handling of ip tables aplication deferal more logically cohesive"},{"line_number":11,"context_line":"in the process_router method"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partially-Implements: bp restructure-l3-agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a961159_c2ddaf42","line":10,"in_reply_to":"3a961159_b51630a5","updated":"2015-01-08 17:18:42.000000000","message":"Yeah, good catch. Thanks","commit_id":"06df3457da962b2e05dc473ddabd95ca7b928849"}],"neutron/agent/l3/agent.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4f139b9b3c386098cc18855d1e6b7b082a08c4c0","unresolved":false,"context_lines":[{"line_number":669,"context_line":"        except Exception:"},{"line_number":670,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":671,"context_line":"            # All floating IPs must be put in error state"},{"line_number":672,"context_line":"            for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []):"},{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3e136a0e","line":672,"updated":"2014-12-18 12:11:20.000000000","message":"code duplication here and at #683. Please consider helper, like:\n def _put_fips_in_error_state(ri):\n   fip_statuses \u003d {}\n   for fip in ri.router.get(..):\n     ..\n   return fip_statuses","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":669,"context_line":"        except Exception:"},{"line_number":670,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":671,"context_line":"            # All floating IPs must be put in error state"},{"line_number":672,"context_line":"            for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []):"},{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_15a73251","line":672,"in_reply_to":"3a961159_3e136a0e","updated":"2014-12-22 01:49:37.000000000","message":"Done","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"54534071fb35b58c4cbeca20807d6ad1eb4bb889","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port, fip_statuses):"},{"line_number":677,"context_line":"        try:"},{"line_number":678,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":679,"context_line":"                ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3a9e0855","line":676,"updated":"2014-12-18 18:07:00.000000000","message":"I think you\u0027d need a \u0027fip_statuses \u003d {}\u0027 here if you didn\u0027t create another function as Oleg suggested - would it be initialized below if process_router_floating_ip_addresses() threw an exception?  My python is a little rusty in this area.","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4f139b9b3c386098cc18855d1e6b7b082a08c4c0","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port, fip_statuses):"},{"line_number":677,"context_line":"        try:"},{"line_number":678,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":679,"context_line":"                ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a3582557","line":676,"updated":"2014-12-18 12:11:20.000000000","message":"seems fip_statuses is not needed as a parameter","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port, fip_statuses):"},{"line_number":677,"context_line":"        try:"},{"line_number":678,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":679,"context_line":"                ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_c710a150","line":676,"in_reply_to":"3a961159_3a9e0855","updated":"2014-12-22 01:49:37.000000000","message":"I added a _put_fips_in_error_state per Oleg\u0027s suggestion and the except block doesn\u0027t have a for loop anymore. It just contains:\n\nfip_statuses \u003d self._put_fips_in_error_state(ri)\n\nSo we are now safe.","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":674,"context_line":"        return fip_statuses"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port, fip_statuses):"},{"line_number":677,"context_line":"        try:"},{"line_number":678,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":679,"context_line":"                ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_953882ef","line":676,"in_reply_to":"3a961159_a3582557","updated":"2014-12-22 01:49:37.000000000","message":"Done","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"54534071fb35b58c4cbeca20807d6ad1eb4bb889","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        return fip_statuses"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"    def _update_fip_status_in_neutron(self, ri, existing_floating_ips,"},{"line_number":688,"context_line":"                                      fip_statuses):"},{"line_number":689,"context_line":"        # Identify floating IPs which were disabled"},{"line_number":690,"context_line":"        ri.floating_ips \u003d set(fip_statuses.keys())"},{"line_number":691,"context_line":"        for fip_id in existing_floating_ips - ri.floating_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_faeac0aa","line":688,"updated":"2014-12-18 18:07:00.000000000","message":"nit: s/_update_fip_status_in_neutron/_update_fip_statuses/","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        return fip_statuses"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"    def _update_fip_status_in_neutron(self, ri, existing_floating_ips,"},{"line_number":688,"context_line":"                                      fip_statuses):"},{"line_number":689,"context_line":"        # Identify floating IPs which were disabled"},{"line_number":690,"context_line":"        ri.floating_ips \u003d set(fip_statuses.keys())"},{"line_number":691,"context_line":"        for fip_id in existing_floating_ips - ri.floating_ips:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a7dd5572","line":688,"in_reply_to":"3a961159_faeac0aa","updated":"2014-12-22 01:49:37.000000000","message":"Done","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"54534071fb35b58c4cbeca20807d6ad1eb4bb889","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            self.routes_updated(ri)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"            # Process SNAT/DNAT rules and addreses for floating IPs"},{"line_number":718,"context_line":"            ex_gw_port \u003d self._get_ex_gw_port(ri)"},{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9ae9bc1c","line":718,"updated":"2014-12-18 18:07:00.000000000","message":"nit: this can be outside the \u0027with\u0027 block, I\u0027d move above.","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            self.routes_updated(ri)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"            # Process SNAT/DNAT rules and addreses for floating IPs"},{"line_number":718,"context_line":"            ex_gw_port \u003d self._get_ex_gw_port(ri)"},{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_87ccd9bc","line":718,"in_reply_to":"3a961159_9ae9bc1c","updated":"2014-12-22 01:49:37.000000000","message":"Done","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4f139b9b3c386098cc18855d1e6b7b082a08c4c0","unresolved":false,"context_lines":[{"line_number":718,"context_line":"            ex_gw_port \u003d self._get_ex_gw_port(ri)"},{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"},{"line_number":722,"context_line":"        if ex_gw_port:"},{"line_number":723,"context_line":"            if not fip_statuses:"},{"line_number":724,"context_line":"                # Once NAT rules for floating IPs are safely in place"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fecac218","line":721,"updated":"2014-12-18 12:11:20.000000000","message":"nit: in fact, here fip_statuses is used for error detection only which might be confusing. May consider returning bool from self._process_snat_dnat_for_fip:\n\n nat_applied \u003d self._process_snat_dnat_for_fip(ri)\n ...\n if ex_gw_port:\n   fip_statuses \u003d {}\n   if nat_applied:\n     fip_statuses \u003d self._configure_fip_addresses(..)\n   else:\n     fip_statuses \u003d self._put_fips_in_error_state(..)","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":718,"context_line":"            ex_gw_port \u003d self._get_ex_gw_port(ri)"},{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"},{"line_number":722,"context_line":"        if ex_gw_port:"},{"line_number":723,"context_line":"            if not fip_statuses:"},{"line_number":724,"context_line":"                # Once NAT rules for floating IPs are safely in place"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_8784d90b","line":721,"in_reply_to":"3a961159_fecac218","updated":"2014-12-22 01:49:37.000000000","message":"Done","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4f139b9b3c386098cc18855d1e6b7b082a08c4c0","unresolved":false,"context_lines":[{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"},{"line_number":722,"context_line":"        if ex_gw_port:"},{"line_number":723,"context_line":"            if not fip_statuses:"},{"line_number":724,"context_line":"                # Once NAT rules for floating IPs are safely in place"},{"line_number":725,"context_line":"                # configure their addresses on the external gateway port"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5e13d65b","line":722,"updated":"2014-12-18 12:11:20.000000000","message":"if ex_gw_port and not fip_statuses:","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6b1249858d2b854673d95c2eeb16270282ce9f3f","unresolved":false,"context_lines":[{"line_number":719,"context_line":"            if ex_gw_port:"},{"line_number":720,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":721,"context_line":"                fip_statuses \u003d self._process_snat_dnat_for_fip(ri)"},{"line_number":722,"context_line":"        if ex_gw_port:"},{"line_number":723,"context_line":"            if not fip_statuses:"},{"line_number":724,"context_line":"                # Once NAT rules for floating IPs are safely in place"},{"line_number":725,"context_line":"                # configure their addresses on the external gateway port"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e7a91d7d","line":722,"in_reply_to":"3a961159_5e13d65b","updated":"2014-12-22 01:49:37.000000000","message":"I implemented your recommendation for line 721, so this is not needed anymore","commit_id":"13a32847437165c9b76d386983c05e7742394a5f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ca301bdf02778335837ca4587c61065102d79c05","unresolved":false,"context_lines":[{"line_number":682,"context_line":"        try:"},{"line_number":683,"context_line":"            existing_floating_ips \u003d ri.floating_ips"},{"line_number":684,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":685,"context_line":"            ri.iptables_manager.defer_apply_off()"},{"line_number":686,"context_line":"            # Once NAT rules for floating IPs are safely in place"},{"line_number":687,"context_line":"            # configure their addresses on the external gateway port"},{"line_number":688,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e9d5551c","side":"PARENT","line":685,"updated":"2014-12-22 18:09:06.000000000","message":"This is one call which I suspect could raise an exception from the underlying call to _apply().  In this old code, it is under this try/except clause and any exception would trigger fip statuses to go to error.\n\nIn the new code, it is not inside the try/except and any potential exception would not be handled appropriately.\n\nI\u0027m not sure how to catch this one without wrapping the \"with\" statement with a try/except.  The problem there is that it broadens the scope of the try to larger than the original code.  Hmmmm...","commit_id":"aa18aba3f26c6e497255fdeea7bb197508ef116b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"10e7d88b33e4ff4d8288e09e51ccdbf2559e4b03","unresolved":false,"context_lines":[{"line_number":682,"context_line":"        try:"},{"line_number":683,"context_line":"            existing_floating_ips \u003d ri.floating_ips"},{"line_number":684,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":685,"context_line":"            ri.iptables_manager.defer_apply_off()"},{"line_number":686,"context_line":"            # Once NAT rules for floating IPs are safely in place"},{"line_number":687,"context_line":"            # configure their addresses on the external gateway port"},{"line_number":688,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1991ba9a","side":"PARENT","line":685,"in_reply_to":"3a961159_e9d5551c","updated":"2014-12-27 17:25:00.000000000","message":"I agree with you. In the next patchset I am proposing a solution to this problem that doesn\u0027t require a try/except wrapping the with statement.","commit_id":"aa18aba3f26c6e497255fdeea7bb197508ef116b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ca301bdf02778335837ca4587c61065102d79c05","unresolved":false,"context_lines":[{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def _process_snat_dnat_for_fip(self, ri):"},{"line_number":684,"context_line":"        try:"},{"line_number":685,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":686,"context_line":"        except Exception:"},{"line_number":687,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":688,"context_line":"            # All floating IPs must be put in error state"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_49cca9bb","line":685,"updated":"2014-12-22 18:09:06.000000000","message":"I\u0027m not sure what is left in process_router_floating_ip_nat_rules which could raise an exception.  Do we need this try/except?","commit_id":"0c381be5aa613274e9780f56f54dc163e5448083"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"10e7d88b33e4ff4d8288e09e51ccdbf2559e4b03","unresolved":false,"context_lines":[{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def _process_snat_dnat_for_fip(self, ri):"},{"line_number":684,"context_line":"        try:"},{"line_number":685,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":686,"context_line":"        except Exception:"},{"line_number":687,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":688,"context_line":"            # All floating IPs must be put in error state"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b9e506de","line":685,"in_reply_to":"3a961159_49cca9bb","updated":"2014-12-27 17:25:00.000000000","message":"process_router_floating_ip_nat_rules calls the add_rule method in the IptablesTable class. This method raises the following exception:\n\nraise LookupError(_(\u0027Unknown chain: %r\u0027) % chain)\n\nI think this is the reason process_router_floating_ip_nat_rules was in the try / except block before we started the refactoring in Lehi. I think we should keep it this way","commit_id":"0c381be5aa613274e9780f56f54dc163e5448083"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ca301bdf02778335837ca4587c61065102d79c05","unresolved":false,"context_lines":[{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"},{"line_number":694,"context_line":"        try:"},{"line_number":695,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":696,"context_line":"                ri, ex_gw_port)"},{"line_number":697,"context_line":"        except Exception:"},{"line_number":698,"context_line":"            # TODO(salv-orlando): Less broad catching"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a9b7cd38","line":695,"updated":"2014-12-22 18:09:06.000000000","message":"nit:  Could simplify:\n\n        try:\n            return self.process_router_floating_ip_addresses(ri, ex_gw_port)\n        except Exception:\n            # TODO(salv-orlando): Less broad catching\n            # All floating IPs must be put in error state\n            return self._put_fips_in_error_state(ri)","commit_id":"0c381be5aa613274e9780f56f54dc163e5448083"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"10e7d88b33e4ff4d8288e09e51ccdbf2559e4b03","unresolved":false,"context_lines":[{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"},{"line_number":694,"context_line":"        try:"},{"line_number":695,"context_line":"            fip_statuses \u003d self.process_router_floating_ip_addresses("},{"line_number":696,"context_line":"                ri, ex_gw_port)"},{"line_number":697,"context_line":"        except Exception:"},{"line_number":698,"context_line":"            # TODO(salv-orlando): Less broad catching"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d97f3265","line":695,"in_reply_to":"3a961159_a9b7cd38","updated":"2014-12-27 17:25:00.000000000","message":"Done","commit_id":"0c381be5aa613274e9780f56f54dc163e5448083"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        try:"},{"line_number":685,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":686,"context_line":"        except Exception:"},{"line_number":687,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":688,"context_line":"            # All floating IPs must be put in error state"},{"line_number":689,"context_line":"            return False"},{"line_number":690,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_75523614","line":687,"updated":"2015-01-06 19:16:16.000000000","message":"I wonder if tackling this TODO would help us with this patch.  Creating and raising more specific exceptions might allow us to just surround the with on L726 with a try/except and not worry about setting booleans here to check later.  I think I\u0027d feel better using exception handling directly rather than booleans.\n\nI\u0027m thinking that we could identify which calls might actually throw a generic Exception, catch it right there at the lower level and raise a more specific exception for the higher level.  You could start by raising a more specific exception right here.","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            return self.process_router_floating_ip_addresses("},{"line_number":696,"context_line":"                ri, ex_gw_port)"},{"line_number":697,"context_line":"        except Exception:"},{"line_number":698,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":699,"context_line":"            # All floating IPs must be put in error state"},{"line_number":700,"context_line":"            return self._put_fips_in_error_state(ri)"},{"line_number":701,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_55e9ba18","line":698,"updated":"2015-01-06 19:16:16.000000000","message":"Ditto.","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":730,"context_line":"            # Process static routes for router"},{"line_number":731,"context_line":"            self.routes_updated(ri)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"            # Process SNAT/DNAT rules and addreses for floating IPs"},{"line_number":734,"context_line":"            if ex_gw_port:"},{"line_number":735,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":736,"context_line":"                fip_nat_processed \u003d self._process_snat_dnat_for_fip(ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_94d89af0","line":733,"updated":"2015-01-06 19:16:16.000000000","message":"nit:  addresses","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":741,"context_line":"                # configure their addresses on the external gateway port"},{"line_number":742,"context_line":"                fip_statuses \u003d self._configure_fip_addresses(ri, ex_gw_port)"},{"line_number":743,"context_line":"            else:"},{"line_number":744,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":745,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"        # Enable or disable keepalived for ha routers"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_5537faaf","line":744,"updated":"2015-01-06 19:16:16.000000000","message":"This is a bit-misleading because this is really exception handling in disguise.","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1051663276abbf0a7c28b65f199e808f3db16e94","unresolved":false,"context_lines":[{"line_number":567,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":568,"context_line":"        except Exception:"},{"line_number":569,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":570,"context_line":"            raise n_exc.AgentException(\u0027L3 agent failure to setup nat for \u0027"},{"line_number":571,"context_line":"                \u0027floating IPs\u0027)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_4be09e26","line":570,"updated":"2015-01-13 06:17:26.000000000","message":"See below.","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d27d04d5289ad9e0e2e11fbc263ada4a874e9887","unresolved":false,"context_lines":[{"line_number":567,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":568,"context_line":"        except Exception:"},{"line_number":569,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":570,"context_line":"            raise n_exc.AgentException(\u0027L3 agent failure to setup nat for \u0027"},{"line_number":571,"context_line":"                \u0027floating IPs\u0027)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_28e974b7","line":570,"in_reply_to":"3a961159_4be09e26","updated":"2015-01-14 00:12:58.000000000","message":"Done","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1051663276abbf0a7c28b65f199e808f3db16e94","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                ri, ex_gw_port)"},{"line_number":577,"context_line":"        except Exception:"},{"line_number":578,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":579,"context_line":"            raise n_exc.AgentException(\u0027L3 agent failure to setup floating \u0027"},{"line_number":580,"context_line":"                \u0027IPs\u0027)"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def _update_fip_statuses(self, ri, existing_floating_ips, fip_statuses):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d909c733","line":579,"updated":"2015-01-13 06:17:26.000000000","message":"I wonder if we should go a little more specific with this exception?  Maybe something like FloatingIpSetupException.  I don\u0027t really know.  Just thinking out loud.  Or, does it make more sense to use the same -- more generic -- exception for all three cases like you\u0027ve done?","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d27d04d5289ad9e0e2e11fbc263ada4a874e9887","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                ri, ex_gw_port)"},{"line_number":577,"context_line":"        except Exception:"},{"line_number":578,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":579,"context_line":"            raise n_exc.AgentException(\u0027L3 agent failure to setup floating \u0027"},{"line_number":580,"context_line":"                \u0027IPs\u0027)"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def _update_fip_statuses(self, ri, existing_floating_ips, fip_statuses):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_68ca9c47","line":579,"in_reply_to":"3a961159_d909c733","updated":"2015-01-14 00:12:58.000000000","message":"Done","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d758860a7a685d37e78227b7bb5a0026bb0f20d9","unresolved":false,"context_lines":[{"line_number":604,"context_line":""},{"line_number":605,"context_line":"        try:"},{"line_number":606,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":607,"context_line":"                self._process_internal_ports(ri)"},{"line_number":608,"context_line":"                self._process_external_gateway(ri)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                # Process static routes for router"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_c2ab7273","line":607,"updated":"2015-01-13 21:08:06.000000000","message":"Maybe I\u0027m not seeing it, but does self._process_internal_ports() actually make any iptables_manager calls?","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d27d04d5289ad9e0e2e11fbc263ada4a874e9887","unresolved":false,"context_lines":[{"line_number":604,"context_line":""},{"line_number":605,"context_line":"        try:"},{"line_number":606,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":607,"context_line":"                self._process_internal_ports(ri)"},{"line_number":608,"context_line":"                self._process_external_gateway(ri)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                # Process static routes for router"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_48c88056","line":607,"in_reply_to":"3a961159_c2ab7273","updated":"2015-01-14 00:12:58.000000000","message":"Brian Haley,\n\nWe want to prevent calls to apply() to actually apply the ip table rules. So I ran neutron.tests.unit.test_l3_agent and set a break in apply(). You are right. There was no case where I got the break and _process_internal_ports was in the stack. In all cases I could see in the stack _process_external_gateway and _process_snat_dnat_for_fip. So I think it is safe to move this line out of the with statement","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1051663276abbf0a7c28b65f199e808f3db16e94","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        if ex_gw_port:"},{"line_number":628,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":631,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_4b5b3e22","line":628,"updated":"2015-01-13 06:17:26.000000000","message":"This could go up to L622 to save a third \"if ex_gw_port\".  I understand the desire to minimize what\u0027s under a try but I\u0027m not sure that having this out here under another \"if ex_gw_port\" is worth it.","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d758860a7a685d37e78227b7bb5a0026bb0f20d9","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        if ex_gw_port:"},{"line_number":628,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":631,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_97e0caf9","line":628,"in_reply_to":"3a961159_4b5b3e22","updated":"2015-01-13 21:08:06.000000000","message":"This has to be after the exception so it uses the (possibly) updated fip_statuses value, right?","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d27d04d5289ad9e0e2e11fbc263ada4a874e9887","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        if ex_gw_port:"},{"line_number":628,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":631,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b24791a2","line":628,"in_reply_to":"3a961159_97e0caf9","updated":"2015-01-14 00:12:58.000000000","message":"Good observation! Brian is correct. In fact, after reading this I went to the \u0027original  branch\u0027, before we started the refactoring in Lehi, and this call is kept out of the try block within a duplicate \u0027if ex_gw_port\u0027. The intent is that the fip status update to the Neutron server includes the latest, possibly all the fips in error due to an exception caught in the try block.","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f9d9adfa7f8aa10c6daf332d4f00d9c7d4ae8b08","unresolved":false,"context_lines":[{"line_number":494,"context_line":"            ri.perform_snat_action(self._handle_router_snat_rules,"},{"line_number":495,"context_line":"                                   interface_name)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _put_fips_in_error_state(self, ri):"},{"line_number":498,"context_line":"        fip_statuses \u003d {}"},{"line_number":499,"context_line":"        for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []):"},{"line_number":500,"context_line":"            fip_statuses[fip[\u0027id\u0027]] \u003d l3_constants.FLOATINGIP_STATUS_ERROR"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_213dc6bb","line":497,"updated":"2015-01-15 16:14:51.000000000","message":"Can consider updating UTs in test_l3_agent.py to exercise these new helper methods, and specifically failure paths, versus testing through process_router().","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f9d9adfa7f8aa10c6daf332d4f00d9c7d4ae8b08","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":506,"context_line":"        except Exception:"},{"line_number":507,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":508,"context_line":"            raise n_exc.FloatingIpSetupException(\u0027L3 agent failure to setup \u0027"},{"line_number":509,"context_line":"                \u0027nat for floating IPs\u0027)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_c1eec220","line":508,"updated":"2015-01-15 16:14:51.000000000","message":"I don\u0027t see a test case that tests this new exception.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b87811760e1ccee3f6b8ecf4576513add1b3f2","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":506,"context_line":"        except Exception:"},{"line_number":507,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":508,"context_line":"            raise n_exc.FloatingIpSetupException(\u0027L3 agent failure to setup \u0027"},{"line_number":509,"context_line":"                \u0027nat for floating IPs\u0027)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_27c6b649","line":508,"in_reply_to":"3a961159_2c9f7d51","updated":"2015-01-15 17:20:53.000000000","message":"The UT for this method would be mocking process_router_floating_ip_nat_rules with a side_effect and asserting that it raises this exception.  Is this accomplishing enough to make it worth it?  I\u0027ll take this and update it today.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9ac7c544c4e04950616bfd685e4442ff38af3783","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"},{"line_number":506,"context_line":"        except Exception:"},{"line_number":507,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":508,"context_line":"            raise n_exc.FloatingIpSetupException(\u0027L3 agent failure to setup \u0027"},{"line_number":509,"context_line":"                \u0027nat for floating IPs\u0027)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_2c9f7d51","line":508,"in_reply_to":"3a961159_c1eec220","updated":"2015-01-15 16:43:25.000000000","message":"I would agree with Paul about adding new tests for the new exceptions.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9ac7c544c4e04950616bfd685e4442ff38af3783","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        except Exception:"},{"line_number":507,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":508,"context_line":"            raise n_exc.FloatingIpSetupException(\u0027L3 agent failure to setup \u0027"},{"line_number":509,"context_line":"                \u0027nat for floating IPs\u0027)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"},{"line_number":512,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_010b6a2b","line":509,"updated":"2015-01-15 16:43:25.000000000","message":"nit: s/nat/NAT","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b87811760e1ccee3f6b8ecf4576513add1b3f2","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        except Exception:"},{"line_number":507,"context_line":"            # TODO(salv-orlando): Less broad catching"},{"line_number":508,"context_line":"            raise n_exc.FloatingIpSetupException(\u0027L3 agent failure to setup \u0027"},{"line_number":509,"context_line":"                \u0027nat for floating IPs\u0027)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def _configure_fip_addresses(self, ri, ex_gw_port):"},{"line_number":512,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_479ae26f","line":509,"in_reply_to":"3a961159_010b6a2b","updated":"2015-01-15 17:20:53.000000000","message":"Done","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0576f01482e309c574aaccba115c96c1abf0bdcc","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                self._process_external_gateway(ri)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"                # Process static routes for router"},{"line_number":549,"context_line":"                self.routes_updated(ri)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":552,"context_line":"                if ex_gw_port:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_32150fe6","line":549,"updated":"2015-01-15 19:23:03.000000000","message":"I think this could be moved out to after L566.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b87811760e1ccee3f6b8ecf4576513add1b3f2","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if ex_gw_port:"},{"line_number":566,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":569,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_baed74ba","line":566,"updated":"2015-01-15 17:20:53.000000000","message":"This could move up to L564.  I\u0027ll take care of it.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f4c16f3a2af75095e7d319c323aba931eced307f","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                fip_statuses \u003d self._put_fips_in_error_state(ri)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if ex_gw_port:"},{"line_number":566,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":569,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_0f9f1051","line":566,"in_reply_to":"3a961159_baed74ba","updated":"2015-01-15 18:31:09.000000000","message":"Sorry, I\u0027m totally wrong about this.  Duh!","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"b468ccb82ce6ce06a302156e1c61519c19f187fc","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if ex_gw_port:"},{"line_number":566,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":569,"context_line":"        self._process_ha_router(ri)"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_87784af9","line":567,"updated":"2015-01-15 17:19:26.000000000","message":"I liked process_router being clean and \"small\" - can we move more of this added code to a sub method?","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0576f01482e309c574aaccba115c96c1abf0bdcc","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        if ex_gw_port:"},{"line_number":566,"context_line":"            self._update_fip_statuses(ri, existing_floating_ips, fip_statuses)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":569,"context_line":"        self._process_ha_router(ri)"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_2fedacb8","line":567,"in_reply_to":"3a961159_87784af9","updated":"2015-01-15 19:23:03.000000000","message":"I think I agree.  I\u0027ll work on it a bit.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"657db2c57104fc432f3ea0cd89d9890eedda3f02","unresolved":false,"context_lines":[{"line_number":533,"context_line":"            else:"},{"line_number":534,"context_line":"                ri.disable_keepalived()"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def _process_external(self, ri):"},{"line_number":537,"context_line":"        try:"},{"line_number":538,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":539,"context_line":"                self._process_external_gateway(ri)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_4de920e2","line":536,"updated":"2015-01-15 19:36:13.000000000","message":"I plan to UT this method by itself *after* it is refactored in to a the router class.  For now, existing UTs will cover it.","commit_id":"5f9ed96e79ad54f081c3be9b7099e8802efb9e6d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"668bef2296184ef6138f302c73f3b0768f10a101","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                # TODO(Carl) Return after setting existing_floating_ips and"},{"line_number":542,"context_line":"                # still call _update_fip_statuses?"},{"line_number":543,"context_line":"                if not ex_gw_port:"},{"line_number":544,"context_line":"                    return"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":547,"context_line":"                existing_floating_ips \u003d ri.floating_ips"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_be354846","line":544,"updated":"2015-01-15 21:11:38.000000000","message":"Note:  This return preserves the behavior in the previous patch where everything below, including _update_fip_statuses does not get run if not ex_gw_port.  I think I need to revisit this but it should be this way for this refactor.","commit_id":"5f9ed96e79ad54f081c3be9b7099e8802efb9e6d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"657db2c57104fc432f3ea0cd89d9890eedda3f02","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        self._process_internal_ports(ri)"},{"line_number":566,"context_line":"        self._process_external(ri)"},{"line_number":567,"context_line":"        # Process static routes for router"},{"line_number":568,"context_line":"        self.routes_updated(ri)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":571,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_cdab5086","line":568,"updated":"2015-01-15 19:36:13.000000000","message":"This change delays this call to self.routes_updated until after _process_snat_dnat_for_fip.  This was discussed in IRC with mlavelle and we think that this slight change in behavior (ordering of processing) is acceptable and allows us to improve readability by this patch.","commit_id":"5f9ed96e79ad54f081c3be9b7099e8802efb9e6d"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f76435ec2a47742dc294143c62201d901da32985","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        self._process_internal_ports(ri)"},{"line_number":566,"context_line":"        self._process_external(ri)"},{"line_number":567,"context_line":"        # Process static routes for router"},{"line_number":568,"context_line":"        self.routes_updated(ri)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        # Enable or disable keepalived for ha routers"},{"line_number":571,"context_line":"        self._process_ha_router(ri)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ed8b901b","line":568,"updated":"2015-01-16 14:17:29.000000000","message":"This patch changes the order of routes_update and defer_apply_off/process_snat_dnat_for_fip. I checked the logic and I believe this is safe and improves the readability. I agree the comment from Carl in the previous patch set.","commit_id":"f945d84fc973220e4bdf0897c003a39640960f0b"}],"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            return True"},{"line_number":371,"context_line":"        return requested_table.is_chain_empty(chain, wrap)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    @contextlib.contextmanager"},{"line_number":374,"context_line":"    def defer_apply(self, iptables_applied):"},{"line_number":375,"context_line":"        \"\"\"Defer apply context.\"\"\""},{"line_number":376,"context_line":"        self.defer_apply_on()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_35bd0eb2","line":373,"updated":"2015-01-06 19:16:16.000000000","message":"I really like this addition.  This is how it should have been done in the first place.","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2e910077f87e4671f7ad9d4a877b1e5187e4a0f","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            yield"},{"line_number":379,"context_line":"        finally:"},{"line_number":380,"context_line":"            try:"},{"line_number":381,"context_line":"                self.defer_apply_off()"},{"line_number":382,"context_line":"                iptables_applied[\u0027status\u0027] \u003d True"},{"line_number":383,"context_line":"            except Exception:"},{"line_number":384,"context_line":"                iptables_applied[\u0027status\u0027] \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_756316b1","line":381,"updated":"2015-01-06 19:16:16.000000000","message":"Maybe catch the broad Exception here and raise a more specific exception.","commit_id":"9417a313bfd0c8e97e53c8a79f93090dcf296d39"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d758860a7a685d37e78227b7bb5a0026bb0f20d9","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            try:"},{"line_number":382,"context_line":"                self.defer_apply_off()"},{"line_number":383,"context_line":"            except Exception:"},{"line_number":384,"context_line":"                raise n_exc.AgentException(\u0027Failure applying ip tables\u0027)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def defer_apply_on(self):"},{"line_number":387,"context_line":"        self.iptables_apply_deferred \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_e2bdceb2","line":384,"updated":"2015-01-13 21:08:06.000000000","message":"nit: s/ip tables/iptables rules (?)","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d27d04d5289ad9e0e2e11fbc263ada4a874e9887","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            try:"},{"line_number":382,"context_line":"                self.defer_apply_off()"},{"line_number":383,"context_line":"            except Exception:"},{"line_number":384,"context_line":"                raise n_exc.AgentException(\u0027Failure applying ip tables\u0027)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def defer_apply_on(self):"},{"line_number":387,"context_line":"        self.iptables_apply_deferred \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_a8bd64b3","line":384,"in_reply_to":"3a961159_e2bdceb2","updated":"2015-01-14 00:12:58.000000000","message":"Done","commit_id":"71ebf984f64ff103a342cdcc25f7926d52993a18"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"f9d9adfa7f8aa10c6daf332d4f00d9c7d4ae8b08","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            try:"},{"line_number":382,"context_line":"                self.defer_apply_off()"},{"line_number":383,"context_line":"            except Exception:"},{"line_number":384,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":385,"context_line":"                                                   \u0027tables rules\u0027)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def defer_apply_on(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_a16296aa","line":384,"updated":"2015-01-15 16:14:51.000000000","message":"Don\u0027t see a test case for this new exception.","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9ac7c544c4e04950616bfd685e4442ff38af3783","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                self.defer_apply_off()"},{"line_number":383,"context_line":"            except Exception:"},{"line_number":384,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":385,"context_line":"                                                   \u0027tables rules\u0027)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def defer_apply_on(self):"},{"line_number":388,"context_line":"        self.iptables_apply_deferred \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_8c2b1132","line":385,"updated":"2015-01-15 16:43:25.000000000","message":"nit:s/ip tables/iptables","commit_id":"1f2c0869641456cf7e2cb6599a58233239a5e95e"}],"neutron/common/exceptions.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f76435ec2a47742dc294143c62201d901da32985","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class FloatingIpSetupException(NeutronException):"},{"line_number":350,"context_line":"    def __init__(self, message\u003dNone):"},{"line_number":351,"context_line":"        self.message \u003d message"},{"line_number":352,"context_line":"        super(FloatingIpSetupException, self).__init__()"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ed2f103c","line":350,"updated":"2015-01-16 14:17:29.000000000","message":"(Out of scope of this patch) I see this kind of __init__ in several places and it is better to be handled in the base NeutronException class.","commit_id":"f945d84fc973220e4bdf0897c003a39640960f0b"}]}
