)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"b81cf334b915212410a266e1f807b0ece45d2276","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Phil Day \u003cphilip.day@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-07-17 09:59:57 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refresh network cache when reassigning a floating IP in quantum"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When Nova associates or disassociates a floating IP address"},{"line_number":10,"context_line":"the network info cache is always refreshed due to the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAP3%2F%2FgBQ%3D","line":7,"updated":"2013-07-17 10:27:43.000000000","message":"\"quantum\" has been renamed to \"neutron\", and keep consistence with the commit file name.","commit_id":"dc43c8fb1ba967ed15a7f8263d81174a4d5beba3"},{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"b81cf334b915212410a266e1f807b0ece45d2276","unresolved":false,"context_lines":[{"line_number":11,"context_line":"@refresh_cache decorator"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However if you (re)associate a floating IP which is already"},{"line_number":14,"context_line":"associated with another instance on a Quantum based system then"},{"line_number":15,"context_line":"the address is correcly disassociated first, but the cache refresh"},{"line_number":16,"context_line":"is not trigged for the original  instance. As a result Nova will"},{"line_number":17,"context_line":"show the same address for two instances until the periodic"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAP3%2F%2FgBE%3D","line":14,"updated":"2013-07-17 10:27:43.000000000","message":"same as above.","commit_id":"dc43c8fb1ba967ed15a7f8263d81174a4d5beba3"}],"nova/network/quantumv2/api.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"9ba3c4864174eb16079e9ab124fc874accba338d","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        fip \u003d self._get_floating_ip_by_address(client, floating_address)"},{"line_number":536,"context_line":"        param \u003d {\u0027port_id\u0027: port_id,"},{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fz3A%3D","line":538,"updated":"2013-06-20 17:18:18.000000000","message":"Does this call block until the database is actually accurate on the Quantum side? If not, there will be race conditions that will affect what data is loaded into the cache on line 552 below.","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"559bb364a6060916db67acd8634854656b598311","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        fip \u003d self._get_floating_ip_by_address(client, floating_address)"},{"line_number":536,"context_line":"        param \u003d {\u0027port_id\u0027: port_id,"},{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FxJU%3D","line":538,"in_reply_to":"AAAAPn%2F%2Fz3A%3D","updated":"2013-06-22 06:50:42.000000000","message":"I believe that the update to the Quantum DB does occur in the context of the API call (although the network change may be some time later) - so I don\u0027t believe there is a race here","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"05b5b6e8a65833a33bdd506b6a6d10a73c30bdf7","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2B24%3D","line":540,"updated":"2013-06-15 18:49:14.000000000","message":"The method _get_port_id_by_fixed_address returns the port id. Would it not be better to leverage this call and also access the port details? It would save a call to the quantum service.","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"243fff681b34aee74b8944462a8b3c3f79ee96e7","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2Byw%3D","line":540,"in_reply_to":"AAAAPn%2F%2F%2B24%3D","updated":"2013-06-15 21:18:33.000000000","message":"I don\u0027t understand - I wonder if you\u0027re misunderstanding the logic.   There are two ports involved here, Port1 is the port we want to assign to and Port2 is the port the floating IP is currently assigned to (may be null).\n\nWe have details of Port1 from _get_port_id_by_fixed_address, and the floating IP.  This call to show_port is getting the details of Port2. I don\u0027t see how replacing that call to _show_port() with another call to _get_port_id_by_fixed_address() would help - as that in turn will get a list of all ports via the client.  Surely this (where I already know the ID of Port2 but need the device_id) is more efficient ?","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4d715959bf4161bc50596ffbf36d0fb8b26846de","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F9p0%3D","line":540,"in_reply_to":"AAAAPn%2F%2F%2Bcg%3D","updated":"2013-06-17 10:19:13.000000000","message":"Hi,\nSorry for being cryptic.\nPlease look at http://docs.openstack.org/trunk/openstack-network/admin/content/app_demo_single_router.html for an example of a quantum configuration. Here the l3 agent (which owns the port for the floating ip) is on a different host to the hypervisor.\nWhen a floating ip port is created the device_id for the port is the floating ip id (https://github.com/openstack/quantum/blob/master/quantum/db/l3_db.py#L646)\nSo the line orig_instance_uuid \u003d port[\u0027device_id\u0027] will not provide the correct instance_uuid.\nHope that this is clear.\nThanks\nGary","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4a6669151005c6a3176094e00c5366f774f492c6","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2Bcg%3D","line":540,"in_reply_to":"AAAAPn%2F%2F%2Bm8%3D","updated":"2013-06-16 14:30:27.000000000","message":"Hi Gary,\n\nI don\u0027t understand your comment about the ports not being on the same host - I don\u0027t see why that matters here.   \n\nOn the other point if you look at the code for  associate_floating_ip then its the port_id associated with the fixed ip the address is being associated with that get saved in the port_id of the floating ip object, and that does have the device ID we want:\n\n   def associate_floating_ip():\n        \"\"\"Associate a floating ip with a fixed ip.\"\"\"\n  ...\n        port_id \u003d self._get_port_id_by_fixed_address(client, instance,\n                                                     fixed_address)\n       fip \u003d self._get_floating_ip_by_address(client, floating_address)\n   param \u003d {\u0027port_id\u0027: port_id,\n                 \u0027fixed_ip_address\u0027: fixed_address}\n   client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})\n \nThe code here works fine in devstack and on our test system.   Is there some other configuration you can test it in where it doesn\u0027t work ?","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b23f33a05fbee665c225f449fba3ddc26e16899e","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2Bm8%3D","line":540,"in_reply_to":"AAAAPn%2F%2F%2Byw%3D","updated":"2013-06-16 07:25:21.000000000","message":"Yes, you are correct I did not understand. I did not pay attention that you were updating the instance id of the second port. If you were using the first port then the information should have been taken from the _get_port_id_by_fixed_address.\n\nI do think that there may be a problem here. The ports may not necessarily be on the same host and the quantum floating ip port may not have a device_id configured. The device_id is used only for the fixed_ips and not the floating ip ports.\n\nI have been over the code and the device_id is only used on the fixed_ip","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"536d96122699245218b5ebe9a7a8c236b806daf8","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fr5U%3D","line":540,"in_reply_to":"AAAAPn%2F%2F9do%3D","updated":"2013-06-25 09:35:12.000000000","message":"Hi,\nSorry to have taken a long time to get back to the review. When a floating IP is created a Quantum port is created. The port has a reference to the floating IP - this is via the device_id of the port. In actual fact the device_id od the port is the floating_ip UUID.\nI am not sure how this can be the instance ID.\nI am going to try and reproduce this in devstack.\nThanks\nGary","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"1c33d4c351f3fe6ab03392f5b79baa78f4d65370","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F9do%3D","line":540,"in_reply_to":"AAAAPn%2F%2F9p0%3D","updated":"2013-06-17 11:42:33.000000000","message":"Hi Gary,\n\nThat\u0027s the configuration that I\u0027m testing (outside of devstack on or our multi-node integration system.  The L3 agents are on a dedicated pool of hosts, separate from the compute hosts) - and it works as expected.  The device_id returned by the code in this patch is the uuid of the instance that previously had the floating ip associated to it.\n\nMaybe its not a question of how port_id set at creation time of the floating IP, but the way it gets subsequently updated in the associated_floating_ip() call (as per the code fragment in my previous post) ?\n\nCan you reproduce the problem you believe exists on a running system?  (Because I can\u0027t  :-)","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"20d206735a4a643dc98e83cb004082c6eea4750d","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                 \u0027fixed_ip_address\u0027: fixed_address}"},{"line_number":538,"context_line":"        client.update_floatingip(fip[\u0027id\u0027], {\u0027floatingip\u0027: param})"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if fip[\u0027port_id\u0027]:"},{"line_number":541,"context_line":"            port \u003d client.show_port(fip[\u0027port_id\u0027])[\u0027port\u0027]"},{"line_number":542,"context_line":"            orig_instance_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FrmM%3D","line":540,"in_reply_to":"AAAAPn%2F%2Fr5U%3D","updated":"2013-06-25 12:40:00.000000000","message":"Thanks Gary  -if you can provide details of a DevStack reproducer I\u0027ll look into it.    As I said I\u0027ve tested the change as it stands in both DevStack and our multi-node system with a separate server for the L3 agent and it seems to work fine for me.","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"05b5b6e8a65833a33bdd506b6a6d10a73c30bdf7","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                            instance_id\u003dorig_instance_uuid)"},{"line_number":546,"context_line":"            LOG.info(_(\u0027re-assign floating IP %(address)s from \u0027"},{"line_number":547,"context_line":"                       \u0027instance %(instance_id)s\u0027) % msg_dict)"},{"line_number":548,"context_line":"            orig_instance \u003d self.db.instance_get_by_uuid(context,"},{"line_number":549,"context_line":"                                                         orig_instance_uuid)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"            # purge cached nw info for the original instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2B3Q%3D","line":548,"updated":"2013-06-15 18:49:14.000000000","message":"is it worthwhile to use the conductor api here?","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"243fff681b34aee74b8944462a8b3c3f79ee96e7","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                            instance_id\u003dorig_instance_uuid)"},{"line_number":546,"context_line":"            LOG.info(_(\u0027re-assign floating IP %(address)s from \u0027"},{"line_number":547,"context_line":"                       \u0027instance %(instance_id)s\u0027) % msg_dict)"},{"line_number":548,"context_line":"            orig_instance \u003d self.db.instance_get_by_uuid(context,"},{"line_number":549,"context_line":"                                                         orig_instance_uuid)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"            # purge cached nw info for the original instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F%2Bys%3D","line":548,"in_reply_to":"AAAAPn%2F%2F%2B3Q%3D","updated":"2013-06-15 21:18:33.000000000","message":"Fair point ;-)","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"20d206735a4a643dc98e83cb004082c6eea4750d","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                            instance_id\u003dorig_instance_uuid)"},{"line_number":546,"context_line":"            LOG.info(_(\u0027re-assign floating IP %(address)s from \u0027"},{"line_number":547,"context_line":"                       \u0027instance %(instance_id)s\u0027) % msg_dict)"},{"line_number":548,"context_line":"            orig_instance \u003d self.db.instance_get_by_uuid(context,"},{"line_number":549,"context_line":"                                                         orig_instance_uuid)"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"            # purge cached nw info for the original instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Frl4%3D","line":548,"in_reply_to":"AAAAPn%2F%2F%2Bys%3D","updated":"2013-06-25 12:40:00.000000000","message":"Having looked at it more I\u0027m not sure it does make sense to use conductor here - this call only happens in the context of the API server, which is still allowed to make direct db calls.","commit_id":"6606ba79aee3d51fe95857089050c781356d08e1"}]}
