)]}'
{"neutron/db/external_net_db.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"97eda8a8781135a5635950e44bf9312751c197f3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 \u0027target_tenant\u0027: \u0027*\u0027}"},{"line_number":128,"context_line":"                net_obj.NetworkRBAC(context, **net_rbac_args).create()"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            # must make sure we do not have any external gateway ports"},{"line_number":131,"context_line":"            # (and thus, possible floating IPs) on this network before"},{"line_number":132,"context_line":"            # allow it to be update to external\u003dFalse"},{"line_number":133,"context_line":"            if context.session.query(models_v2.Port.id).filter_by("},{"line_number":134,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_ROUTER_GW,"},{"line_number":135,"context_line":"                network_id\u003dnet_data[\u0027id\u0027]).first():"},{"line_number":136,"context_line":"                raise extnet_exc.ExternalNetworkInUse(net_id\u003dnet_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            net_obj.ExternalNetwork.delete_objects("},{"line_number":139,"context_line":"                context, network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_dab648d6","line":136,"range":{"start_line":130,"start_character":12,"end_line":136,"end_character":68},"updated":"2018-12-17 08:09:06.000000000","message":"As I see this should raise exception in case of the network is possibly has floating IPs, isn\u0027t it enough to call this _process_l3_update in case of NETWORK update? Now this method is called in case of rbac operations:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/external_net_db.py#L154\nhttps://github.com/openstack/neutron/blob/master/neutron/db/external_net_db.py#L171\n\nand in case of network update:\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L955\n\nSo perhaps this method should be fixed, or changed to delete floating IPs instead of raising exception.\n\nSo the main note: for me it seems that with this patch the API behavior changes, and perhaps thats good, but it must be consistent (for RBAC operations for example) and it should be documented somewhere (I tried to find some documentation, but even can\u0027t find the doc for the patch which implemented the feature for deleting FIPs for deleted network: https://review.openstack.org/53364 )","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"e41ae7592457364e63d3a449bf19564bdec105d1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 \u0027target_tenant\u0027: \u0027*\u0027}"},{"line_number":128,"context_line":"                net_obj.NetworkRBAC(context, **net_rbac_args).create()"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            # must make sure we do not have any external gateway ports"},{"line_number":131,"context_line":"            # (and thus, possible floating IPs) on this network before"},{"line_number":132,"context_line":"            # allow it to be update to external\u003dFalse"},{"line_number":133,"context_line":"            if context.session.query(models_v2.Port.id).filter_by("},{"line_number":134,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_ROUTER_GW,"},{"line_number":135,"context_line":"                network_id\u003dnet_data[\u0027id\u0027]).first():"},{"line_number":136,"context_line":"                raise extnet_exc.ExternalNetworkInUse(net_id\u003dnet_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            net_obj.ExternalNetwork.delete_objects("},{"line_number":139,"context_line":"                context, network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfdaf3ff_833fd0b2","line":136,"range":{"start_line":130,"start_character":12,"end_line":136,"end_character":68},"in_reply_to":"3f79a3b5_260966da","updated":"2019-01-17 14:12:06.000000000","message":"Ok, I understand.\nPlease upload the api-ref change to make this visible for the end-user","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"189732cc0b5b67b0a1cb7e10791076d8ecd1f2e7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 \u0027target_tenant\u0027: \u0027*\u0027}"},{"line_number":128,"context_line":"                net_obj.NetworkRBAC(context, **net_rbac_args).create()"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            # must make sure we do not have any external gateway ports"},{"line_number":131,"context_line":"            # (and thus, possible floating IPs) on this network before"},{"line_number":132,"context_line":"            # allow it to be update to external\u003dFalse"},{"line_number":133,"context_line":"            if context.session.query(models_v2.Port.id).filter_by("},{"line_number":134,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_ROUTER_GW,"},{"line_number":135,"context_line":"                network_id\u003dnet_data[\u0027id\u0027]).first():"},{"line_number":136,"context_line":"                raise extnet_exc.ExternalNetworkInUse(net_id\u003dnet_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            net_obj.ExternalNetwork.delete_objects("},{"line_number":139,"context_line":"                context, network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_260966da","line":136,"range":{"start_line":130,"start_character":12,"end_line":136,"end_character":68},"in_reply_to":"3f79a3b5_dab648d6","updated":"2018-12-17 10:43:58.000000000","message":"I was considering deleting the floatingips in the network update transaction (by receiving the \u0027precommit_update\u0027 event), but that\u0027s not possible. Deletion of floating IPs involves deleting the relevant ports, see here:\n\nhttps://github.com/openstack/neutron/blob/17c6cf7abee08d4037c60cbbd171f925fdf4aa99/neutron/db/l3_db.py#L1510\n\nThat\u0027s the whole delete_port() including pre- and postcommit. And of course transaction guards don\u0027t allow me to call the (ports\u0027) postcommit in a transaction. _process_l3_update() is also called in transaction, so that lead to this:\n\nERROR PUT failed.: RuntimeError: Method \u003cfunction delete_port at 0x7f165761aaa0\u003e cannot be called within a transaction.\n\nFor your second (documentation) comment: Yes, this should be documented. Both the implicit \"cascade\" in network delete and in network update to internal. I think the proper place for this is the api-ref. So I\u0027ll push a neutron-lib change for that soon.","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"35ef7559f34e73833e9ade499fa7bd1a7583015c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                 \u0027target_tenant\u0027: \u0027*\u0027}"},{"line_number":128,"context_line":"                net_obj.NetworkRBAC(context, **net_rbac_args).create()"},{"line_number":129,"context_line":"        else:"},{"line_number":130,"context_line":"            # must make sure we do not have any external gateway ports"},{"line_number":131,"context_line":"            # (and thus, possible floating IPs) on this network before"},{"line_number":132,"context_line":"            # allow it to be update to external\u003dFalse"},{"line_number":133,"context_line":"            if context.session.query(models_v2.Port.id).filter_by("},{"line_number":134,"context_line":"                device_owner\u003dconstants.DEVICE_OWNER_ROUTER_GW,"},{"line_number":135,"context_line":"                network_id\u003dnet_data[\u0027id\u0027]).first():"},{"line_number":136,"context_line":"                raise extnet_exc.ExternalNetworkInUse(net_id\u003dnet_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"            net_obj.ExternalNetwork.delete_objects("},{"line_number":139,"context_line":"                context, network_id\u003dnet_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfdaf3ff_c302b86f","line":136,"range":{"start_line":130,"start_character":12,"end_line":136,"end_character":68},"in_reply_to":"bfdaf3ff_833fd0b2","updated":"2019-01-17 14:33:46.000000000","message":"Please see here: https://review.openstack.org/631515","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"b2cc5a5a5316a97bcd7f3ecb84aef4ac8dde3c0e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                       payload\u003dNone):"},{"line_number":246,"context_line":"        self._process_l3_delete(payload.context, payload.resource_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @registry.receives(resources.NETWORK, [events.AFTER_UPDATE])"},{"line_number":249,"context_line":"    def _after_network_update_handler("},{"line_number":250,"context_line":"            self, resource, event, trigger,"},{"line_number":251,"context_line":"            context, network, original_network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffd0ebdf_29541aca","line":248,"range":{"start_line":248,"start_character":50,"end_line":248,"end_character":63},"updated":"2019-01-04 22:22:42.000000000","message":"Is this supposed to be AFTER_UPDATE? I wonder if at the time this is invoked have we committed the change, so does this actually block the change? This callback handler also seems redundant, doesn\u0027t the check at https://github.com/openstack/neutron/blob/ff887f998174f145935a5a60c8d351b3a8450fbb/neutron/plugins/ml2/plugin.py#L967 handle this?","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2dda50b476646f0848691bf97ace6e0fc06d322e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                       payload\u003dNone):"},{"line_number":246,"context_line":"        self._process_l3_delete(payload.context, payload.resource_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @registry.receives(resources.NETWORK, [events.AFTER_UPDATE])"},{"line_number":249,"context_line":"    def _after_network_update_handler("},{"line_number":250,"context_line":"            self, resource, event, trigger,"},{"line_number":251,"context_line":"            context, network, original_network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_6a3a2de8","line":248,"range":{"start_line":248,"start_character":50,"end_line":248,"end_character":63},"in_reply_to":"bfdaf3ff_806b461c","updated":"2019-01-21 09:03:39.000000000","message":"For me it make sense :)","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"472d18c14a1addd4d1d399ced2beb6c274fb86c1","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                       payload\u003dNone):"},{"line_number":246,"context_line":"        self._process_l3_delete(payload.context, payload.resource_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @registry.receives(resources.NETWORK, [events.AFTER_UPDATE])"},{"line_number":249,"context_line":"    def _after_network_update_handler("},{"line_number":250,"context_line":"            self, resource, event, trigger,"},{"line_number":251,"context_line":"            context, network, original_network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_9dc71465","line":248,"range":{"start_line":248,"start_character":50,"end_line":248,"end_character":63},"in_reply_to":"bfdaf3ff_806b461c","updated":"2019-01-28 20:41:12.000000000","message":"Makes sense, thanks for the detailed explanation.","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"83f204186232873e91d6206a14470aa6e05299b5","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                       payload\u003dNone):"},{"line_number":246,"context_line":"        self._process_l3_delete(payload.context, payload.resource_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @registry.receives(resources.NETWORK, [events.AFTER_UPDATE])"},{"line_number":249,"context_line":"    def _after_network_update_handler("},{"line_number":250,"context_line":"            self, resource, event, trigger,"},{"line_number":251,"context_line":"            context, network, original_network):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfdaf3ff_806b461c","line":248,"range":{"start_line":248,"start_character":50,"end_line":248,"end_character":63},"in_reply_to":"ffd0ebdf_29541aca","updated":"2019-01-17 14:01:06.000000000","message":"I did play around with the options and this is what I found:\n\nFrom the perspective of an end user the ideal approach would be to atomically delete the floating ips in the same api transaction that updates the network. In ml2 terms in the precommit phase of the network update.\n\nBut I don\u0027t think ml2 allows us to do this. Deleting floating ips involves deleting ports, for that we\u0027ll have to call into ml2\u0027s delete_port(). That of course does both the precommit and postcommit parts of deleting a port. And ml2 has (totally reasonably I think) a decorator to prevent the call of a postcommit method while in transaction (ie. in the precommit phase of the network update).\n\nTherefore I came to the conclusion of deleting the floating ips in the postcommit phase of the network update. That\u0027s why I chose event.AFTER_UPDATE. I also cannot call this directly from _process_l3_update for the same reason.\n\nDoes that make sense?","commit_id":"400daf9a384b9121045d53ff21724d27cf4816a9"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3e96f08d9d791e3fe124ec9ab933af71863afa65","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron_lib.api.definitions import external_net"},{"line_number":28,"context_line":"from neutron_lib.api.definitions import extra_dhcp_opt as edo_ext"},{"line_number":29,"context_line":"from neutron_lib.api.definitions import filter_validation as filter_apidef"},{"line_number":30,"context_line":"from neutron_lib.api.definitions import floatingip_autodelete_internal"},{"line_number":31,"context_line":"from neutron_lib.api.definitions import ip_substring_port_filtering"},{"line_number":32,"context_line":"from neutron_lib.api.definitions import multiprovidernet"},{"line_number":33,"context_line":"from neutron_lib.api.definitions import network as net_def"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_1a2626bc","line":30,"updated":"2019-02-20 21:35:02.000000000","message":"I think you\u0027re getting failures in check jobs because this hasn\u0027t been added here https://github.com/openstack/neutron-lib/blob/987fc92fef8b88bf026590fb51e699f5d53b3536/neutron_lib/api/definitions/__init__.py#L106 in neutron-lib.","commit_id":"5f7fee569d4a43b9f0e8f143e97e3783478d355c"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"e06b81490d451781a10f008ba5dd54609b9585b5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron_lib.api.definitions import external_net"},{"line_number":28,"context_line":"from neutron_lib.api.definitions import extra_dhcp_opt as edo_ext"},{"line_number":29,"context_line":"from neutron_lib.api.definitions import filter_validation as filter_apidef"},{"line_number":30,"context_line":"from neutron_lib.api.definitions import floatingip_autodelete_internal"},{"line_number":31,"context_line":"from neutron_lib.api.definitions import ip_substring_port_filtering"},{"line_number":32,"context_line":"from neutron_lib.api.definitions import multiprovidernet"},{"line_number":33,"context_line":"from neutron_lib.api.definitions import network as net_def"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_e9d8341f","line":30,"in_reply_to":"9fdfeff1_1a2626bc","updated":"2019-02-21 14:19:11.000000000","message":"I think that\u0027s there now:\n\nhttps://review.openstack.org/#/c/631515/4/neutron_lib/api/definitions/__init__.py\n\nIf I run unit tests locally with the (2nd) neutron-lib dependency installed it\u0027s all green. Therefore I think this change will green up after:\n\n* the dependency gets merged in neutron-lib\n* neutron requirements get bumped\n* this patch gets rebased","commit_id":"5f7fee569d4a43b9f0e8f143e97e3783478d355c"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3076445c74c718153ca9170149fd3df19e76516d","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                                    pbe_ext.ALIAS,"},{"line_number":198,"context_line":"                                    agent_resources_synced.ALIAS,"},{"line_number":199,"context_line":"                                    subnet_onboard_def.ALIAS,"},{"line_number":200,"context_line":"                                    floatingip_autodelete_internal.ALIAS]"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    # List of agent types for which all binding_failed ports should try to be"},{"line_number":203,"context_line":"    # rebound when agent revive"}],"source_content_type":"text/x-python","patch_set":7,"id":"5fc1f717_93175752","line":200,"updated":"2019-03-08 16:51:24.000000000","message":"Should ML2 provide the implementation, or should this be implemented by the L3 plugin? I\u0027m thinking the L3 plugin should provide the implementation.","commit_id":"f4986c4ee4fbb006dc6587c30c24837772200d4e"}]}
