)]}'
{"nova/api/openstack/compute/floating_ips.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8e7e44a39f3ad72b45ceb6eafe539c7e29d0391d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.network_api.get_instance_id_by_floating_address("},{"line_number":88,"context_line":"                context, address)"},{"line_number":89,"context_line":"    except (exception.FloatingIpNotFoundForAddress,"},{"line_number":90,"context_line":"            exception.PortNotFound) as ex:"},{"line_number":91,"context_line":"        raise webob.exc.HTTPNotFound(explanation\u003dex.format_message())"},{"line_number":92,"context_line":"    except exception.FloatingIpMultipleFoundForAddress as ex:"},{"line_number":93,"context_line":"        raise webob.exc.HTTPConflict(explanation\u003dex.format_message())"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_9a0e228a","line":90,"updated":"2016-08-11 16:21:10.000000000","message":"Hmm, but if we catch this exception here and return 404 to the user, disassociate_and_release_floating_ip() *will not* be called, but the user will think the floating IP was properly deleted. Am I missing something here?","commit_id":"0c82962512d95d068d5fe089bf632c9b9e4e53d3"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"db3c4d5e029bea813c5dff2646d4f93e5095c663","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.network_api.get_instance_id_by_floating_address("},{"line_number":88,"context_line":"                context, address)"},{"line_number":89,"context_line":"    except (exception.FloatingIpNotFoundForAddress,"},{"line_number":90,"context_line":"            exception.PortNotFound) as ex:"},{"line_number":91,"context_line":"        raise webob.exc.HTTPNotFound(explanation\u003dex.format_message())"},{"line_number":92,"context_line":"    except exception.FloatingIpMultipleFoundForAddress as ex:"},{"line_number":93,"context_line":"        raise webob.exc.HTTPConflict(explanation\u003dex.format_message())"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_edb833ca","line":90,"in_reply_to":"9ad45d7e_5e401507","updated":"2016-08-12 00:22:28.000000000","message":"Michael,\n\nYeah, I also am thinking this is due to the race condition.\nAs you said, the instance is deleted and the disassociation has been completed just before this problem happens.\n\nHowever, the deletion of fip is not completed. In addition, the instance id is not used at all in neutron case.\nSo the instance id None is reasonable for this situation, I think.","commit_id":"0c82962512d95d068d5fe089bf632c9b9e4e53d3"},{"author":{"_account_id":20038,"name":"Michael Gugino","email":"michael.gugino@walmart.com","username":"michaelgugino"},"change_message_id":"9915361581105ee717e2b4efb16666ec324f0279","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.network_api.get_instance_id_by_floating_address("},{"line_number":88,"context_line":"                context, address)"},{"line_number":89,"context_line":"    except (exception.FloatingIpNotFoundForAddress,"},{"line_number":90,"context_line":"            exception.PortNotFound) as ex:"},{"line_number":91,"context_line":"        raise webob.exc.HTTPNotFound(explanation\u003dex.format_message())"},{"line_number":92,"context_line":"    except exception.FloatingIpMultipleFoundForAddress as ex:"},{"line_number":93,"context_line":"        raise webob.exc.HTTPConflict(explanation\u003dex.format_message())"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_5e401507","line":90,"in_reply_to":"9ad45d7e_9a0e228a","updated":"2016-08-11 18:47:25.000000000","message":"@Roman:  IMO, this is a race condition caused by deleting an instance with associated floating_ip, and before the floating_ip is fully disassociated from the deleting instance, the floating_ip is then deleted via the api.\n\nCurrently, without catching the exception, nova generates a 500 error.\n\nReturning none may be appropriate, I\u0027m unsure.","commit_id":"0c82962512d95d068d5fe089bf632c9b9e4e53d3"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"72dd9d2668ba95a60fd44b3d53db9a76e557fd81","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.network_api.get_instance_id_by_floating_address("},{"line_number":88,"context_line":"                context, address)"},{"line_number":89,"context_line":"    except (exception.FloatingIpNotFoundForAddress,"},{"line_number":90,"context_line":"            exception.PortNotFound) as ex:"},{"line_number":91,"context_line":"        raise webob.exc.HTTPNotFound(explanation\u003dex.format_message())"},{"line_number":92,"context_line":"    except exception.FloatingIpMultipleFoundForAddress as ex:"},{"line_number":93,"context_line":"        raise webob.exc.HTTPConflict(explanation\u003dex.format_message())"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_1fc4dc3d","line":90,"in_reply_to":"9ad45d7e_9a0e228a","updated":"2016-08-11 18:12:28.000000000","message":"ah, nice catch.\nyeah, in Neutron, instance_id is not used at all for disassociate_and_release_floating_ip().\nSo here should return None instead.","commit_id":"0c82962512d95d068d5fe089bf632c9b9e4e53d3"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c386cbfeebbbed5068dfa70b3a979f62b6ec9d29","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"            return None"},{"line_number":1788,"context_line":""},{"line_number":1789,"context_line":"        try:"},{"line_number":1790,"context_line":"            port \u003d self._show_port(context, fip[\u0027port_id\u0027],"},{"line_number":1791,"context_line":"                                   neutron_client\u003dclient)"},{"line_number":1792,"context_line":"        except exception.PortNotFound:"},{"line_number":1793,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_4d0a1f27","line":1790,"updated":"2016-08-12 00:34:42.000000000","message":"Why would the floating IP have a port_id but the port doesn\u0027t exist?","commit_id":"660ef610d37d4bafc8a7043d2e7ea5f8417a251b"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"cb5696f59a3290898219ebf11cca3100f96aa319","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"            return None"},{"line_number":1788,"context_line":""},{"line_number":1789,"context_line":"        try:"},{"line_number":1790,"context_line":"            port \u003d self._show_port(context, fip[\u0027port_id\u0027],"},{"line_number":1791,"context_line":"                                   neutron_client\u003dclient)"},{"line_number":1792,"context_line":"        except exception.PortNotFound:"},{"line_number":1793,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_50c8f454","line":1790,"in_reply_to":"9ad45d7e_4d0a1f27","updated":"2016-08-12 00:52:41.000000000","message":"because of the race between _get_floating_ip_by_address() and _show_port().\n\n\nfip[\u0027port_id\u0027] shows a port which is the server instance\u0027s.\nAt _get_floating_ip_by_address(), Neutron returns the list which includes a server instance. Just after that, the deletion of the server instance happens and Neutron returns 404 on _show_port().\n\nI think that is a scenario.","commit_id":"660ef610d37d4bafc8a7043d2e7ea5f8417a251b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25af1af5b7e2279a7b69932e058a0e9027f612d0","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"            return None"},{"line_number":1788,"context_line":""},{"line_number":1789,"context_line":"        try:"},{"line_number":1790,"context_line":"            port \u003d self._show_port(context, fip[\u0027port_id\u0027],"},{"line_number":1791,"context_line":"                                   neutron_client\u003dclient)"},{"line_number":1792,"context_line":"        except exception.PortNotFound:"},{"line_number":1793,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_901a6cc4","line":1790,"in_reply_to":"9ad45d7e_50c8f454","updated":"2016-08-12 00:55:56.000000000","message":"Huh, OK, well, we should probably have a comment in here explaining why we\u0027re handling the 404 in that case (because of a potential race on server delete). And we should probably log (at least at debug level) the PortNotFound error message.","commit_id":"660ef610d37d4bafc8a7043d2e7ea5f8417a251b"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0d67980dfb4b2f336a533b3399c74d17b9e86763","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"            return None"},{"line_number":1788,"context_line":""},{"line_number":1789,"context_line":"        try:"},{"line_number":1790,"context_line":"            port \u003d self._show_port(context, fip[\u0027port_id\u0027],"},{"line_number":1791,"context_line":"                                   neutron_client\u003dclient)"},{"line_number":1792,"context_line":"        except exception.PortNotFound:"},{"line_number":1793,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_10eafc73","line":1790,"in_reply_to":"9ad45d7e_901a6cc4","updated":"2016-08-12 00:58:07.000000000","message":"Good point, yeah will do that soon.","commit_id":"660ef610d37d4bafc8a7043d2e7ea5f8417a251b"},{"author":{"_account_id":21264,"name":"Hasan","email":"htuncer@us.ibm.com","username":"htuncer"},"change_message_id":"9e13e572e0b9bfeacb84db7712df33c0a67aa51c","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            # Neutron returns the list which includes the instance. Just after"},{"line_number":1797,"context_line":"            # that, the deletion of the instance happens and Neutron returns"},{"line_number":1798,"context_line":"            # 404 on _show_port()."},{"line_number":1799,"context_line":"            LOG.debug(\u0027The port is not found: %s\u0027, fip[\u0027port_id\u0027])"},{"line_number":1800,"context_line":"            return None"},{"line_number":1801,"context_line":""},{"line_number":1802,"context_line":"        return port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ac969e8_d5b4c6d2","line":1799,"range":{"start_line":1799,"start_character":11,"end_line":1799,"end_character":66},"updated":"2016-08-12 23:42:26.000000000","message":"I would add the actual exception message to the log.","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59bde2527baa462c6b317d96dcf6b1857f495554","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            # Neutron returns the list which includes the instance. Just after"},{"line_number":1797,"context_line":"            # that, the deletion of the instance happens and Neutron returns"},{"line_number":1798,"context_line":"            # 404 on _show_port()."},{"line_number":1799,"context_line":"            LOG.debug(\u0027The port is not found: %s\u0027, fip[\u0027port_id\u0027])"},{"line_number":1800,"context_line":"            return None"},{"line_number":1801,"context_line":""},{"line_number":1802,"context_line":"        return port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_0e55814f","line":1799,"range":{"start_line":1799,"start_character":11,"end_line":1799,"end_character":66},"in_reply_to":"7ac969e8_d5b4c6d2","updated":"2016-08-15 17:22:26.000000000","message":"OK, I will add that.","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"19cdc4fc92332fac8660be7de9d5f6a2dfd665fc","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            # Neutron returns the list which includes the instance. Just after"},{"line_number":1797,"context_line":"            # that, the deletion of the instance happens and Neutron returns"},{"line_number":1798,"context_line":"            # 404 on _show_port()."},{"line_number":1799,"context_line":"            LOG.debug(\u0027The port(%(port_id)s) is not found: %(reason)s\u0027,"},{"line_number":1800,"context_line":"                      {\u0027port_id\u0027: fip[\u0027port_id\u0027], \u0027reason\u0027: exc})"},{"line_number":1801,"context_line":"            return None"},{"line_number":1802,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_d24dbc9a","line":1799,"range":{"start_line":1799,"start_character":59,"end_line":1799,"end_character":69},"updated":"2016-08-16 00:04:42.000000000","message":"This is a bit redundant, it\u0027s just going to say that the port wasn\u0027t found, which is what this message already says.","commit_id":"b227539bbc5d8c72968021b1508b6ac5cf579ac9"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8c44eb96090d9681cb2a71f3f4160ac367b0426","unresolved":false,"context_lines":[{"line_number":2303,"context_line":"                                                                mock_show):"},{"line_number":2304,"context_line":"        api \u003d neutronapi.API()"},{"line_number":2305,"context_line":"        address \u003d self.fip_associated[\u0027floating_ip_address\u0027]"},{"line_number":2306,"context_line":"        self.moxed_client.list_floatingips(floating_ip_address\u003daddress).\\"},{"line_number":2307,"context_line":"                AndReturn({\u0027floatingips\u0027: [self.fip_associated]})"},{"line_number":2308,"context_line":"        self.mox.ReplayAll()"},{"line_number":2309,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_96e1c42c","line":2306,"updated":"2016-08-12 01:39:07.000000000","message":"Please don\u0027t add more tests to the TestNeutronv2 class that uses the giant moxed_client and all of that big setup, add it to the TestNeutronv2WithMock so that we can\u0027t get away from the terrible mox stuff used in this class.","commit_id":"082b2a7b832a5bfef378289cef4fc3e010b7808b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"ea046089a14a9c08cf2a582f758a74b9fbde6d3c","unresolved":false,"context_lines":[{"line_number":4258,"context_line":"                return_value\u003d{\"port_id\": \"1\"})"},{"line_number":4259,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._show_port\u0027,"},{"line_number":4260,"context_line":"                side_effect\u003dexception.PortNotFound(port_id\u003d\u00271\u0027))"},{"line_number":4261,"context_line":"    def test_get_instance_id_by_floating_address_port_not_found(self, mock_get,"},{"line_number":4262,"context_line":"                                                                mock_show):"},{"line_number":4263,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4264,"context_line":"        fip \u003d api.get_instance_id_by_floating_address(self.context,"},{"line_number":4265,"context_line":"                                                      \u002710.10.10.10\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_905531c8","line":4262,"range":{"start_line":4261,"start_character":69,"end_line":4262,"end_character":73},"updated":"2016-08-15 03:05:09.000000000","message":"The order is backwards. They should be \u0027mock_show, mock_get)\u0027.","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59bde2527baa462c6b317d96dcf6b1857f495554","unresolved":false,"context_lines":[{"line_number":4258,"context_line":"                return_value\u003d{\"port_id\": \"1\"})"},{"line_number":4259,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._show_port\u0027,"},{"line_number":4260,"context_line":"                side_effect\u003dexception.PortNotFound(port_id\u003d\u00271\u0027))"},{"line_number":4261,"context_line":"    def test_get_instance_id_by_floating_address_port_not_found(self, mock_get,"},{"line_number":4262,"context_line":"                                                                mock_show):"},{"line_number":4263,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4264,"context_line":"        fip \u003d api.get_instance_id_by_floating_address(self.context,"},{"line_number":4265,"context_line":"                                                      \u002710.10.10.10\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_eed8e5f1","line":4262,"range":{"start_line":4261,"start_character":69,"end_line":4262,"end_character":73},"in_reply_to":"3ac371cc_905531c8","updated":"2016-08-15 17:22:26.000000000","message":"ah, nice catch.","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":21264,"name":"Hasan","email":"htuncer@us.ibm.com","username":"htuncer"},"change_message_id":"9e13e572e0b9bfeacb84db7712df33c0a67aa51c","unresolved":false,"context_lines":[{"line_number":4262,"context_line":"                                                                mock_show):"},{"line_number":4263,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4264,"context_line":"        fip \u003d api.get_instance_id_by_floating_address(self.context,"},{"line_number":4265,"context_line":"                                                      \u002710.10.10.10\u0027)"},{"line_number":4266,"context_line":"        self.assertIsNone(fip)"},{"line_number":4267,"context_line":""},{"line_number":4268,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7ac969e8_759352fb","line":4265,"range":{"start_line":4265,"start_character":53,"end_line":4265,"end_character":67},"updated":"2016-08-12 23:42:26.000000000","message":"why do you use  \u002710.10.10.10\u0027?","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59bde2527baa462c6b317d96dcf6b1857f495554","unresolved":false,"context_lines":[{"line_number":4262,"context_line":"                                                                mock_show):"},{"line_number":4263,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4264,"context_line":"        fip \u003d api.get_instance_id_by_floating_address(self.context,"},{"line_number":4265,"context_line":"                                                      \u002710.10.10.10\u0027)"},{"line_number":4266,"context_line":"        self.assertIsNone(fip)"},{"line_number":4267,"context_line":""},{"line_number":4268,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_aed6edc2","line":4265,"range":{"start_line":4265,"start_character":53,"end_line":4265,"end_character":67},"in_reply_to":"7ac969e8_759352fb","updated":"2016-08-15 17:22:26.000000000","message":"What do you recommend?","commit_id":"a8aa3c907035e7b6d51ec65a3ab148863350bf56"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62aab412e2f52415d11a7420feed1a1595045897","unresolved":false,"context_lines":[{"line_number":4255,"context_line":"            ntrn, instance, [uuids.created_port_id])"},{"line_number":4256,"context_line":""},{"line_number":4257,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._get_floating_ip_by_address\u0027,"},{"line_number":4258,"context_line":"                return_value\u003d{\"port_id\": \"1\"})"},{"line_number":4259,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._show_port\u0027,"},{"line_number":4260,"context_line":"                side_effect\u003dexception.PortNotFound(port_id\u003d\u00271\u0027))"},{"line_number":4261,"context_line":"    def test_get_instance_id_by_floating_address_port_not_found(self,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_d51be67e","line":4258,"range":{"start_line":4258,"start_character":41,"end_line":4258,"end_character":44},"updated":"2016-08-16 00:36:06.000000000","message":"If you have to respin, let\u0027s make this a uuid since that\u0027s what it would really be.","commit_id":"e72826123bfd7c1d962b615da3f028b315ba3943"}]}
