)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"622a7476140e5dffe7feb54ac35c5a733ce2dd5b","unresolved":false,"context_lines":[{"line_number":988,"context_line":"                subnet[\u0027shared\u0027] \u003d network[\u0027shared\u0027]"},{"line_number":989,"context_line":"        return self._make_network_dict(network)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"    def _delete_disassociated_floatingips(self, context, network_id):"},{"line_number":992,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":993,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":994,"context_line":"        if not l3plugin:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2B1w%3D","line":991,"updated":"2013-10-24 12:11:03.000000000","message":"This is specific to L3 implementation, so I think it is better to move L3 db plugin (though I understand it is used in ML2 plugin).","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"acf458db8c92994898ee96ed8c3e915e6aafb253","unresolved":false,"context_lines":[{"line_number":988,"context_line":"                subnet[\u0027shared\u0027] \u003d network[\u0027shared\u0027]"},{"line_number":989,"context_line":"        return self._make_network_dict(network)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"    def _delete_disassociated_floatingips(self, context, network_id):"},{"line_number":992,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":993,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":994,"context_line":"        if not l3plugin:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2BW8%3D","line":991,"in_reply_to":"AAAATn%2F%2F%2B1w%3D","updated":"2013-10-24 12:18:54.000000000","message":"Agree","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"337d1ffff8094a516ff77a6eea224a6268d21a91","unresolved":false,"context_lines":[{"line_number":997,"context_line":"        fips \u003d l3plugin.get_disassociated_floatingips(context, network_id)"},{"line_number":998,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":999,"context_line":"            for fip in fips:"},{"line_number":1000,"context_line":"                l3plugin.delete_floatingip(context, fip[\u0027id\u0027])"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def delete_network(self, context, id):"},{"line_number":1003,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2B6A%3D","line":1000,"updated":"2013-10-24 09:24:44.000000000","message":"Deadlock alert: in this function is notified L3 agent via rpc while db is locked","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cc5fdcd43db6a4482f146b3f31026bbd0378202d","unresolved":false,"context_lines":[{"line_number":997,"context_line":"        fips \u003d l3plugin.get_disassociated_floatingips(context, network_id)"},{"line_number":998,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":999,"context_line":"            for fip in fips:"},{"line_number":1000,"context_line":"                l3plugin.delete_floatingip(context, fip[\u0027id\u0027])"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def delete_network(self, context, id):"},{"line_number":1003,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2B5Y%3D","line":1000,"in_reply_to":"AAAATn%2F%2F%2B6A%3D","updated":"2013-10-24 09:27:24.000000000","message":"L3 agent is notified only if router_id of the floating ip is not None. In this case only disassociated floating ips are deleted (router_id is None)","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ee76c21ab648811004c3be2a550fc523f256905d","unresolved":false,"context_lines":[{"line_number":998,"context_line":"            l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":999,"context_line":"                service_constants.L3_ROUTER_NAT)"},{"line_number":1000,"context_line":"            if l3plugin:"},{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxs8%3D","line":1001,"updated":"2013-11-20 10:49:40.000000000","message":"If only_auto_del \u003d\u003d False, then this floating IPs which you\u0027re deleting here should be restored.\n\nI think this might happen if one tries to delete an external network connected to one or more routers and with some disassociated floating IPs","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"61f14ae82d820bd5db0d69c787a2d6c054259bdb","unresolved":false,"context_lines":[{"line_number":998,"context_line":"            l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":999,"context_line":"                service_constants.L3_ROUTER_NAT)"},{"line_number":1000,"context_line":"            if l3plugin:"},{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bw6U%3D","line":1001,"in_reply_to":"AAAATn%2F%2Bxog%3D","updated":"2013-11-20 14:34:26.000000000","message":"I\u0027m okay with this.  I can\u0027t speak for all plugins though.  I think, in general, plugins should not take any action until this base code has been run without exception.","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"238a0979faf3b04da2b4d81f3178e411147c1c88","unresolved":false,"context_lines":[{"line_number":998,"context_line":"            l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":999,"context_line":"                service_constants.L3_ROUTER_NAT)"},{"line_number":1000,"context_line":"            if l3plugin:"},{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxog%3D","line":1001,"in_reply_to":"AAAATn%2F%2Bxpc%3D","updated":"2013-11-20 11:14:42.000000000","message":"This is true if delete_floating_ip is a DB only action.\nPlugins might override it leading to inconsistency with backend.\n\nAnyway, this is probably a problem which is not only here, and it\u0027s the plugin implementor who should be aware of this, not the base db class.","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5d972123e985d41a1969474b23a271a4cf92bb06","unresolved":false,"context_lines":[{"line_number":998,"context_line":"            l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":999,"context_line":"                service_constants.L3_ROUTER_NAT)"},{"line_number":1000,"context_line":"            if l3plugin:"},{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxpc%3D","line":1001,"in_reply_to":"AAAATn%2F%2Bxs8%3D","updated":"2013-11-20 11:04:44.000000000","message":"I thought the whole transaction started at #992 will be rolled back in case a error is raised on #1008. I might be not a good specialist in db transactions though..","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"238a0979faf3b04da2b4d81f3178e411147c1c88","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"},{"line_number":1005,"context_line":"                                for p in ports)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"            if not only_auto_del:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxn0%3D","line":1004,"updated":"2013-11-20 11:14:42.000000000","message":"get_ports returns a list of ports - which might include disassociate floating IPs.\n\nI don\u0027t think that when you then remove them with delete_disassociated_floatingips they\u0027re removed from the ports list as well.","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d0ffc3f71b0949f2108518ef3458abd8cbd72915","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":1002,"context_line":""},{"line_number":1003,"context_line":"            # check if there are any tenant owned ports in-use"},{"line_number":1004,"context_line":"            only_auto_del \u003d all(p[\u0027device_owner\u0027] in AUTO_DELETE_PORT_OWNERS"},{"line_number":1005,"context_line":"                                for p in ports)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"            if not only_auto_del:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxm4%3D","line":1004,"in_reply_to":"AAAATn%2F%2Bxn0%3D","updated":"2013-11-20 11:28:51.000000000","message":"Sure, the deleting should be done before fetching ports. Thanks for pointing!","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b41f8cbb06f98d54bdd970acf91c217ff8c71fb5","unresolved":false,"context_lines":[{"line_number":995,"context_line":"            l3plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":996,"context_line":"                service_constants.L3_ROUTER_NAT)"},{"line_number":997,"context_line":"            if l3plugin:"},{"line_number":998,"context_line":"                l3plugin.delete_disassociated_floatingips(context, id)"},{"line_number":999,"context_line":""},{"line_number":1000,"context_line":"            filter \u003d {\u0027network_id\u0027: [id]}"},{"line_number":1001,"context_line":"            ports \u003d self.get_ports(context, filters\u003dfilter)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BPmk%3D","line":998,"updated":"2013-11-28 12:10:09.000000000","message":"Hopefully I would like to keep db_plugin without L3 code.\nThis is very similar to _process_l3_create/update in create/update_network. How about moving this to db/external_net_db as _process_l3_delete and call it from each plugin?","commit_id":"86a1286797c865b491be983251463abebf5af54e"}],"neutron/db/l3_db.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"87dd4cfa8a9a2bc8ec7daaed8af7daf17dc0208b","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        query \u003d self._model_query(context, FloatingIP)"},{"line_number":710,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":711,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        return [self._make_floatingip_dict(fip) for fip in query]"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATX%2F%2F7ww%3D","line":712,"updated":"2013-10-24 01:00:41.000000000","message":"This query seems incomplete? should have .all() at the end?","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5f4cf6b75764a989b8771da977b7b674133e21c3","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        query \u003d self._model_query(context, FloatingIP)"},{"line_number":710,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":711,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        return [self._make_floatingip_dict(fip) for fip in query]"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2FJo%3D","line":712,"in_reply_to":"AAAATX%2F%2F7ww%3D","updated":"2013-10-24 08:10:12.000000000","message":"Actually no: I only need an iterator here which is used on #713","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"622a7476140e5dffe7feb54ac35c5a733ce2dd5b","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        query \u003d self._model_query(context, FloatingIP)"},{"line_number":710,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":711,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        return [self._make_floatingip_dict(fip) for fip in query]"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2F%2B1I%3D","line":712,"in_reply_to":"AAAATn%2F%2F%2FJo%3D","updated":"2013-10-24 12:11:03.000000000","message":"Oleg is correct.","commit_id":"e5f2904f53d9c3634de7ebafc407c1d4619d7aaa"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"change_message_id":"bb55fc8de488b06ec8de9c0c6838184040e538e6","unresolved":false,"context_lines":[{"line_number":711,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":714,"context_line":"            for fip in query:"},{"line_number":715,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F2OI%3D","line":714,"updated":"2014-01-07 18:37:44.000000000","message":"nit: i prefer floating_ip here","commit_id":"d9305b2a625e985c32b10484551cf072eef5f2fc"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"fcb4c49079634b2e247e42c6553d329a76a5e796","unresolved":false,"context_lines":[{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":714,"context_line":"            for fip in query:"},{"line_number":715,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":718,"context_line":"        return self._get_collection_count(context, FloatingIP,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9XM8%3D","line":715,"updated":"2013-12-12 08:55:20.000000000","message":"Isn\u0027t it possible to delete all floating ips at once ?","commit_id":"d9305b2a625e985c32b10484551cf072eef5f2fc"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"56576d7797fead7caf89eb76f3a7ce8fc3f37226","unresolved":false,"context_lines":[{"line_number":712,"context_line":"                                router_id\u003dNone)"},{"line_number":713,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":714,"context_line":"            for fip in query:"},{"line_number":715,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":718,"context_line":"        return self._get_collection_count(context, FloatingIP,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9XGU%3D","line":715,"in_reply_to":"AAAATn%2F9XM8%3D","updated":"2013-12-12 09:00:50.000000000","message":"we need to delete both floating ip and floating port, please see to self.delete_floatingip(), so I think we need to handle each fip individually","commit_id":"d9305b2a625e985c32b10484551cf072eef5f2fc"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dd6005490e7729e56e0aa971c48e0e42782002b8","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":723,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":724,"context_line":"                                router_id\u003dNone)"},{"line_number":725,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":726,"context_line":"            for fip in query:"},{"line_number":727,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2FEUY%3D","line":725,"updated":"2014-03-10 08:37:16.000000000","message":"Is the context needed here? Every call of delete_floatingip() creates its own transaction context.","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4a762a72018205ac3da491bea69f422d3ddf0a39","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":723,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":724,"context_line":"                                router_id\u003dNone)"},{"line_number":725,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":726,"context_line":"            for fip in query:"},{"line_number":727,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2B6Qg%3D","line":725,"in_reply_to":"AAAAVn%2F%2FD7Y%3D","updated":"2014-03-11 14:57:44.000000000","message":"Done","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d9a1d1f66fcb4d9ec44454775ddca417655812a7","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":723,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":724,"context_line":"                                router_id\u003dNone)"},{"line_number":725,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":726,"context_line":"            for fip in query:"},{"line_number":727,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2FD7Y%3D","line":725,"in_reply_to":"AAAAVn%2F%2FEUY%3D","updated":"2014-03-10 09:44:07.000000000","message":"+1 I think you\u0027re right here. I was going to say \u0027yes it needs it for the first query in delete_floatingip (to get the floatingip) but this method could just pass the context from parameters through. The deletion then uses its own context session","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"2bc2740b1cc2755d2ce168b8f5d8c51021ac9d23","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id,"},{"line_number":723,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":724,"context_line":"                                router_id\u003dNone)"},{"line_number":725,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":726,"context_line":"            for fip in query:"},{"line_number":727,"context_line":"                self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2FEMY%3D","line":725,"in_reply_to":"AAAAVn%2F%2FEUY%3D","updated":"2014-03-10 09:09:41.000000000","message":"I believe It could go away. If you delete a few floating IP\u0027s, but you fail to remove some others, it\u0027s not a consistency problem.","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"3796776c36c3c3d7b2e6cff7250e1fe8116d58fe","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":725,"context_line":"                                router_id\u003dNone)"},{"line_number":726,"context_line":"        for fip in query:"},{"line_number":727,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":730,"context_line":"        return self._get_collection_count(context, FloatingIP,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAXH%2F%2FRlw%3D","line":727,"updated":"2014-04-22 20:14:25.000000000","message":"I\u0027m a bit concerned about the fact that delete_disassociated_floatingips, which eventually triggers sending rpc message is called from within the transaction (looking up the call chain), which in turn may lead to transaction deadlocks triggered by multiple greenthread switches.","commit_id":"1763c80711993c55f4f13afe56f449b1dd6d3d3a"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"beb647b76715146ca37762b6d7bba3b54b9e9159","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                                fixed_port_id\u003dNone,"},{"line_number":725,"context_line":"                                router_id\u003dNone)"},{"line_number":726,"context_line":"        for fip in query:"},{"line_number":727,"context_line":"            self.delete_floatingip(context, fip.id)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    def get_floatingips_count(self, context, filters\u003dNone):"},{"line_number":730,"context_line":"        return self._get_collection_count(context, FloatingIP,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAXH%2F%2FOkA%3D","line":727,"in_reply_to":"AAAAXH%2F%2FRlw%3D","updated":"2014-04-23 07:27:34.000000000","message":"Actually it won\u0027t trigger rpc message as disassociated fips are those with router_id\u003d\u003d\u003dNone (#725) so the if condition will always be False on #694","commit_id":"1763c80711993c55f4f13afe56f449b1dd6d3d3a"}],"neutron/plugins/bigswitch/plugin.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bf3233d58b8676b79a94b64e227caf0462086b1c","unresolved":false,"context_lines":[{"line_number":604,"context_line":""},{"line_number":605,"context_line":"        # Validate args"},{"line_number":606,"context_line":"        orig_net \u003d super(NeutronRestProxyV2, self).get_network(context, net_id)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        filter \u003d {\u0027network_id\u0027: [net_id]}"},{"line_number":609,"context_line":"        ports \u003d self.get_ports(context, filters\u003dfilter)"},{"line_number":610,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2B3Tc%3D","side":"PARENT","line":607,"updated":"2014-03-22 14:34:57.000000000","message":"L.607-617 checks auto delete ports and it seems unrelated to this change.","commit_id":"3067748798b1c7da9cba2aa62853805bb1024ce6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1375a6d423944908d65bc6fef3a9c48b47aae745","unresolved":false,"context_lines":[{"line_number":604,"context_line":""},{"line_number":605,"context_line":"        # Validate args"},{"line_number":606,"context_line":"        orig_net \u003d super(NeutronRestProxyV2, self).get_network(context, net_id)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        filter \u003d {\u0027network_id\u0027: [net_id]}"},{"line_number":609,"context_line":"        ports \u003d self.get_ports(context, filters\u003dfilter)"},{"line_number":610,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2BzpQ%3D","side":"PARENT","line":607,"in_reply_to":"AAAAWH%2F%2B3Tc%3D","updated":"2014-03-24 07:16:11.000000000","message":"In fact this check isn\u0027t needed here as there is such check in base class. So I filed bug 1259144 and fixed it within this patch (Closes-Bug: #1259144 in the commit message) Do you think it should be fixed with a separate patch?","commit_id":"3067748798b1c7da9cba2aa62853805bb1024ce6"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"752e8a20c81d12623fff9435235308d6854004b0","unresolved":false,"context_lines":[{"line_number":604,"context_line":""},{"line_number":605,"context_line":"        # Validate args"},{"line_number":606,"context_line":"        orig_net \u003d super(NeutronRestProxyV2, self).get_network(context, net_id)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        filter \u003d {\u0027network_id\u0027: [net_id]}"},{"line_number":609,"context_line":"        ports \u003d self.get_ports(context, filters\u003dfilter)"},{"line_number":610,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2ByWM%3D","side":"PARENT","line":607,"in_reply_to":"AAAAWH%2F%2BzpQ%3D","updated":"2014-03-24 11:27:10.000000000","message":"I see. It looks no problem the bug is fixed in this patch.","commit_id":"3067748798b1c7da9cba2aa62853805bb1024ce6"}],"neutron/plugins/ibm/sdnve_neutron_plugin.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bf3233d58b8676b79a94b64e227caf0462086b1c","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        LOG.debug(_(\"Delete network in progress: %s\"), id)"},{"line_number":237,"context_line":"        session \u003d context.session"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":240,"context_line":"            self._process_l3_delete(context, id)"},{"line_number":241,"context_line":"            super(SdnvePluginV2, self).delete_network(context, id)"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2B3TU%3D","line":239,"updated":"2014-03-22 14:34:57.000000000","message":"L.237 and 239 can be merged.\n\n  with context.session(subtransactions\u003dTrue):","commit_id":"483c3dd04e292a844b142668e6a36356861763a9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1375a6d423944908d65bc6fef3a9c48b47aae745","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        LOG.debug(_(\"Delete network in progress: %s\"), id)"},{"line_number":237,"context_line":"        session \u003d context.session"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":240,"context_line":"            self._process_l3_delete(context, id)"},{"line_number":241,"context_line":"            super(SdnvePluginV2, self).delete_network(context, id)"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2BzrQ%3D","line":239,"in_reply_to":"AAAAWH%2F%2B3TU%3D","updated":"2014-03-24 07:16:11.000000000","message":"just tried to be consistent with the rest methods in this module (#182, #211...)","commit_id":"483c3dd04e292a844b142668e6a36356861763a9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"752e8a20c81d12623fff9435235308d6854004b0","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        LOG.debug(_(\"Delete network in progress: %s\"), id)"},{"line_number":237,"context_line":"        session \u003d context.session"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":240,"context_line":"            self._process_l3_delete(context, id)"},{"line_number":241,"context_line":"            super(SdnvePluginV2, self).delete_network(context, id)"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2ByUE%3D","line":239,"in_reply_to":"AAAAWH%2F%2BzrQ%3D","updated":"2014-03-24 11:27:10.000000000","message":"I got it. Looks good.","commit_id":"483c3dd04e292a844b142668e6a36356861763a9"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"66a47b4992945bbb6c1dc3023ddafad1bec7a07f","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        while True:"},{"line_number":383,"context_line":"            try:"},{"line_number":384,"context_line":"                with session.begin(subtransactions\u003dTrue):"},{"line_number":385,"context_line":"                    l3plugin \u003d (manager.NeutronManager.get_service_plugins()."},{"line_number":386,"context_line":"                                get(service_constants.L3_ROUTER_NAT))"},{"line_number":387,"context_line":"                    if l3plugin:"},{"line_number":388,"context_line":"                        l3plugin.delete_disassociated_floatingips(context, id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2B7Lo%3D","line":385,"updated":"2013-11-18 14:52:19.000000000","message":"I\u0027m not thrilled about perpetuating the problem noted in the comment about.  But, okay.  I see why you have to do this.","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ee76c21ab648811004c3be2a550fc523f256905d","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        while True:"},{"line_number":383,"context_line":"            try:"},{"line_number":384,"context_line":"                with session.begin(subtransactions\u003dTrue):"},{"line_number":385,"context_line":"                    l3plugin \u003d (manager.NeutronManager.get_service_plugins()."},{"line_number":386,"context_line":"                                get(service_constants.L3_ROUTER_NAT))"},{"line_number":387,"context_line":"                    if l3plugin:"},{"line_number":388,"context_line":"                        l3plugin.delete_disassociated_floatingips(context, id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Bxss%3D","line":385,"in_reply_to":"AAAATn%2F%2B7Lo%3D","updated":"2013-11-20 10:49:40.000000000","message":"I agree with Carl (personally what thrills me even less is the while True loop)","commit_id":"e828acf778b65209aec5bcf11d2a33f56cfb2e09"},{"author":{"_account_id":7962,"name":"Ronak Shah","email":"ronak.malav.shah@gmail.com","username":"ronak"},"change_message_id":"e33669a7cb510ed8434351a9a1d7375b689f7a32","unresolved":false,"context_lines":[{"line_number":441,"context_line":"            try:"},{"line_number":442,"context_line":"                with session.begin(subtransactions\u003dTrue):"},{"line_number":443,"context_line":"                    self._process_l3_delete(context, id)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                    # Get ports to auto-delete."},{"line_number":446,"context_line":"                    ports \u003d (session.query(models_v2.Port)."},{"line_number":447,"context_line":"                             enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2Fbk8%3D","line":444,"updated":"2014-03-06 04:53:08.000000000","message":"Minor thing but shouldnt this happen after the raise condition is taken care of?","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4a762a72018205ac3da491bea69f422d3ddf0a39","unresolved":false,"context_lines":[{"line_number":441,"context_line":"            try:"},{"line_number":442,"context_line":"                with session.begin(subtransactions\u003dTrue):"},{"line_number":443,"context_line":"                    self._process_l3_delete(context, id)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                    # Get ports to auto-delete."},{"line_number":446,"context_line":"                    ports \u003d (session.query(models_v2.Port)."},{"line_number":447,"context_line":"                             enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2B6O8%3D","line":444,"in_reply_to":"AAAAVn%2F%2Fbk8%3D","updated":"2014-03-11 14:57:44.000000000","message":"This should be processed before checking for ports to auto delete (446-457) as it will have no effect to do it after","commit_id":"38bae88a58e4d1b69190cc76036a70e755e1b514"}],"neutron/plugins/nec/nec_plugin.py":[{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"5dc887b287455f5db0ff2a018f1b84f8f0def5b8","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if not only_auto_del:"},{"line_number":372,"context_line":"            raise n_exc.NetworkInUse(net_id\u003did)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        self._process_l3_delete(context, id)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # Make sure auto-delete ports on OFC are deleted."},{"line_number":377,"context_line":"        _error_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2Bino%3D","line":374,"updated":"2014-03-26 02:57:49.000000000","message":"why not call this line before line 367 so floating ip port doesn\u0027t need to be checked anymore? Can you help clarify the reason to this change compared to previous patch?\n\nActually the check is similarly duplicated as pointed out in bug 1259144?","commit_id":"fa0f40daaa8b78b17c5323d693d78d3bcedc1f99"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"88795c21a237bc32452f6b2dac9503d471e485a9","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if not only_auto_del:"},{"line_number":372,"context_line":"            raise n_exc.NetworkInUse(net_id\u003did)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        self._process_l3_delete(context, id)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # Make sure auto-delete ports on OFC are deleted."},{"line_number":377,"context_line":"        _error_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BfxA%3D","line":374,"in_reply_to":"AAAAWH%2F%2BhDI%3D","updated":"2014-03-26 12:16:52.000000000","message":"First of all, Oleg, thanks for caring it!\n\nYes. The reason nec plugin places them before db transaction is to avoid long transaction during talking an external controller. \n\nHonestly I am not sure it is better to move them into the db transaction (as many plugins do). AFAIK, vmware plugin tries to migrate communications with backend controllers out of db transactions. On the other hand, BSN plugins did the same but move the logic inside db transaction. I think if neutron server split into several module (like nova, cinder) it becomes difficult to wrap them with db transaction.","commit_id":"fa0f40daaa8b78b17c5323d693d78d3bcedc1f99"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"94b4f4d74762dbd6b990dc267f18c833803dee2c","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if not only_auto_del:"},{"line_number":372,"context_line":"            raise n_exc.NetworkInUse(net_id\u003did)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        self._process_l3_delete(context, id)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # Make sure auto-delete ports on OFC are deleted."},{"line_number":377,"context_line":"        _error_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAWH%2F%2BhDI%3D","line":374,"in_reply_to":"AAAAWH%2F%2Bino%3D","updated":"2014-03-26 08:53:09.000000000","message":"Not calling before #367 because if network is in use then floating ips deletion will be unexpected side effect, so we need to ensure the network can be deleted first.\n\nNEC plugin does special handling for auto_delete ports before calling super.delete_network() so I think this is not a complete duplication. Also because of this special handling putting the whole body into a transaction (as in previous patch) breaks the logic near #380 where ports can be set to ERROR state - transaction rollback puts them back to ACTIVE state (you can see unit tests failures on the previous patch set).","commit_id":"fa0f40daaa8b78b17c5323d693d78d3bcedc1f99"}],"neutron/plugins/vmware/plugins/base.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7678f7e0fce14538c9ae86e4e92cb2f2dcded244","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"                context.session, self.cluster, id)"},{"line_number":1041,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1042,"context_line":"            self._process_l3_delete(context, id)"},{"line_number":1043,"context_line":"            super(NvpPluginV2, self).delete_network(context, id)"},{"line_number":1044,"context_line":""},{"line_number":1045,"context_line":"        # clean up network owned ports"},{"line_number":1046,"context_line":"        for port in router_iface_ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVn%2F%2F5%2BE%3D","line":1043,"updated":"2014-03-03 14:27:23.000000000","message":"The class is NsxPluginV2.","commit_id":"59138083a9232376206d24e449a7302c1ef80546"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"617f1b74e4a845074e664421fcc697b6e41dc7f4","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"                context.session, self.cluster, id)"},{"line_number":1041,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1042,"context_line":"            self._process_l3_delete(context, id)"},{"line_number":1043,"context_line":"            super(NvpPluginV2, self).delete_network(context, id)"},{"line_number":1044,"context_line":""},{"line_number":1045,"context_line":"        # clean up network owned ports"},{"line_number":1046,"context_line":"        for port in router_iface_ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVn%2F%2F5yE%3D","line":1043,"in_reply_to":"AAAAVn%2F%2F5%2BE%3D","updated":"2014-03-03 14:42:07.000000000","message":"good catch, thanks","commit_id":"59138083a9232376206d24e449a7302c1ef80546"}],"neutron/tests/unit/test_extension_ext_net.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bf3233d58b8676b79a94b64e227caf0462086b1c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                               \u0027get_service_plugins\u0027) as srv_plugins:"},{"line_number":165,"context_line":"            l3_mock \u003d mock.Mock()"},{"line_number":166,"context_line":"            srv_plugins.return_value \u003d {\u0027L3_ROUTER_NAT\u0027: l3_mock}"},{"line_number":167,"context_line":"            l3_mock.get_disassociated_floatingips.return_value \u003d ["},{"line_number":168,"context_line":"                {\u0027id\u0027: \u0027fip1\u0027}, {\u0027id\u0027: \u0027fip2\u0027}]"},{"line_number":169,"context_line":"            with self.network(do_delete\u003dFalse) as net:"},{"line_number":170,"context_line":"                req \u003d self.new_delete_request(\u0027networks\u0027, net[\u0027network\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2B3Sw%3D","line":167,"updated":"2014-03-22 14:34:57.000000000","message":"After grepping the code base, I cannot find get_disassociated_floatingips method. Could you check it?","commit_id":"483c3dd04e292a844b142668e6a36356861763a9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1375a6d423944908d65bc6fef3a9c48b47aae745","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                               \u0027get_service_plugins\u0027) as srv_plugins:"},{"line_number":165,"context_line":"            l3_mock \u003d mock.Mock()"},{"line_number":166,"context_line":"            srv_plugins.return_value \u003d {\u0027L3_ROUTER_NAT\u0027: l3_mock}"},{"line_number":167,"context_line":"            l3_mock.get_disassociated_floatingips.return_value \u003d ["},{"line_number":168,"context_line":"                {\u0027id\u0027: \u0027fip1\u0027}, {\u0027id\u0027: \u0027fip2\u0027}]"},{"line_number":169,"context_line":"            with self.network(do_delete\u003dFalse) as net:"},{"line_number":170,"context_line":"                req \u003d self.new_delete_request(\u0027networks\u0027, net[\u0027network\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAWH%2F%2Bzk4%3D","line":167,"in_reply_to":"AAAAWH%2F%2B3Sw%3D","updated":"2014-03-24 07:16:11.000000000","message":"this seems a missed cleanup. Thanks for pointing!","commit_id":"483c3dd04e292a844b142668e6a36356861763a9"}]}
