)]}'
{"kuryr_kubernetes/controller/drivers/vif_pool.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"cde70ebb2793c9a97aa47048fcc4f9e5e1a02c94","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    def _cleanup_removed_nodes(self):"},{"line_number":460,"context_line":"        \"\"\"Remove ports associated to removed nodes.\"\"\""},{"line_number":461,"context_line":"        previous_ports_to_remove \u003d []"},{"line_number":462,"context_line":"        while True:"},{"line_number":463,"context_line":"            # NOTE(ltomasbo): Nodes are not expected to be removed"},{"line_number":464,"context_line":"            # frequently, so there is no need to execute this frequently"},{"line_number":465,"context_line":"            # either"},{"line_number":466,"context_line":"            eventlet.sleep(NODE_PORTS_CLEAN_FREQUENCY)"},{"line_number":467,"context_line":"            self._trigger_removed_nodes_ports_cleanup(previous_ports_to_remove)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _trigger_removed_nodes_ports_cleanup(self, previous_ports_to_remove):"},{"line_number":470,"context_line":"        \"\"\"Remove ports associated to removed nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_a5263b15","line":467,"range":{"start_line":462,"start_character":0,"end_line":467,"end_character":79},"updated":"2020-09-22 15:28:23.000000000","message":"If we want that to be forever we need to catch any exceptions here. An alternative would be to use ThreadGroup and timers, but it might not be that easy to do from a Driver (we\u0027re getting ThreadGroup object on Service level).","commit_id":"73fd34bf012adabe5fb6dae1773d18dd11e1e105"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"5caffe4fbb5c085a0b29da4ab33a9d0830d62faf","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    def _cleanup_removed_nodes(self):"},{"line_number":460,"context_line":"        \"\"\"Remove ports associated to removed nodes.\"\"\""},{"line_number":461,"context_line":"        previous_ports_to_remove \u003d []"},{"line_number":462,"context_line":"        while True:"},{"line_number":463,"context_line":"            # NOTE(ltomasbo): Nodes are not expected to be removed"},{"line_number":464,"context_line":"            # frequently, so there is no need to execute this frequently"},{"line_number":465,"context_line":"            # either"},{"line_number":466,"context_line":"            eventlet.sleep(NODE_PORTS_CLEAN_FREQUENCY)"},{"line_number":467,"context_line":"            self._trigger_removed_nodes_ports_cleanup(previous_ports_to_remove)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _trigger_removed_nodes_ports_cleanup(self, previous_ports_to_remove):"},{"line_number":470,"context_line":"        \"\"\"Remove ports associated to removed nodes."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_e2d633f2","line":467,"range":{"start_line":462,"start_character":0,"end_line":467,"end_character":79},"in_reply_to":"9f560f44_a5263b15","updated":"2020-09-24 15:57:36.000000000","message":"ohh, that is the same we have already for return_ports_to_pool. But yeah, worth to add it","commit_id":"73fd34bf012adabe5fb6dae1773d18dd11e1e105"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5a64f494f186ee23bce71020a6ac1d1a7275b394","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":489,"context_line":"        if tags:"},{"line_number":490,"context_line":"            # NOTE(ltomasbo): Detached subports gets their device_owner unset"},{"line_number":491,"context_line":"            detached_subports \u003d existing_ports \u003d os_net.ports("},{"line_number":492,"context_line":"                device_owner\u003d\u0027\u0027, status\u003d\u0027DOWN\u0027, tags\u003dtags)"},{"line_number":493,"context_line":"            for subport in detached_subports:"},{"line_number":494,"context_line":"                try:"},{"line_number":495,"context_line":"                    del self._existing_vifs[subport.id]"},{"line_number":496,"context_line":"                except KeyError:"},{"line_number":497,"context_line":"                    LOG.debug(\u0027Port %s is not in the ports list.\u0027, subport.id)"},{"line_number":498,"context_line":"                try:"},{"line_number":499,"context_line":"                    os_net.delete_port(subport.id)"},{"line_number":500,"context_line":"                except os_exc.SDKException:"},{"line_number":501,"context_line":"                    LOG.debug(\"Problem deleting leftover port %s. \""},{"line_number":502,"context_line":"                              \"Skipping.\", subport.id)"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"            # normal ports, or subports not yet attached"},{"line_number":505,"context_line":"            existing_ports \u003d os_net.ports("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_cd871b61","line":502,"range":{"start_line":491,"start_character":0,"end_line":502,"end_character":54},"updated":"2020-09-22 11:23:21.000000000","message":"Could it be that the port was just created but not attached yet?","commit_id":"73fd34bf012adabe5fb6dae1773d18dd11e1e105"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"177b4662deab0e7568294f9694a08720861249c2","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":489,"context_line":"        if tags:"},{"line_number":490,"context_line":"            # NOTE(ltomasbo): Detached subports gets their device_owner unset"},{"line_number":491,"context_line":"            detached_subports \u003d existing_ports \u003d os_net.ports("},{"line_number":492,"context_line":"                device_owner\u003d\u0027\u0027, status\u003d\u0027DOWN\u0027, tags\u003dtags)"},{"line_number":493,"context_line":"            for subport in detached_subports:"},{"line_number":494,"context_line":"                try:"},{"line_number":495,"context_line":"                    del self._existing_vifs[subport.id]"},{"line_number":496,"context_line":"                except KeyError:"},{"line_number":497,"context_line":"                    LOG.debug(\u0027Port %s is not in the ports list.\u0027, subport.id)"},{"line_number":498,"context_line":"                try:"},{"line_number":499,"context_line":"                    os_net.delete_port(subport.id)"},{"line_number":500,"context_line":"                except os_exc.SDKException:"},{"line_number":501,"context_line":"                    LOG.debug(\"Problem deleting leftover port %s. \""},{"line_number":502,"context_line":"                              \"Skipping.\", subport.id)"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"            # normal ports, or subports not yet attached"},{"line_number":505,"context_line":"            existing_ports \u003d os_net.ports("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_6dd9aff2","line":502,"range":{"start_line":491,"start_character":0,"end_line":502,"end_character":54},"in_reply_to":"9f560f44_cd871b61","updated":"2020-09-22 11:49:56.000000000","message":"Not here, as we create the ports with device_owner, and if device_owner is not set, it means the port has been attached and detached from a trunk","commit_id":"73fd34bf012adabe5fb6dae1773d18dd11e1e105"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"855eb5d1bd34ef4d02fdd0108cce98408c489539","unresolved":false,"context_lines":[{"line_number":494,"context_line":"        tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":495,"context_line":"        if tags:"},{"line_number":496,"context_line":"            # NOTE(ltomasbo): Detached subports gets their device_owner unset"},{"line_number":497,"context_line":"            detached_subports \u003d existing_ports \u003d os_net.ports("},{"line_number":498,"context_line":"                device_owner\u003d\u0027\u0027, status\u003d\u0027DOWN\u0027, tags\u003dtags)"},{"line_number":499,"context_line":"            for subport in detached_subports:"},{"line_number":500,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6bbaedbf","line":497,"range":{"start_line":497,"start_character":32,"end_line":497,"end_character":49},"updated":"2020-09-25 10:49:09.000000000","message":"This could be removed, in favor of line 511 :)","commit_id":"8d6d105397e8fa4d4e4e58673d80b4a2b69243ba"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"62ed6438896de2f80694eb3d6186190ea1bf7bc9","unresolved":false,"context_lines":[{"line_number":494,"context_line":"        tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":495,"context_line":"        if tags:"},{"line_number":496,"context_line":"            # NOTE(ltomasbo): Detached subports gets their device_owner unset"},{"line_number":497,"context_line":"            detached_subports \u003d existing_ports \u003d os_net.ports("},{"line_number":498,"context_line":"                device_owner\u003d\u0027\u0027, status\u003d\u0027DOWN\u0027, tags\u003dtags)"},{"line_number":499,"context_line":"            for subport in detached_subports:"},{"line_number":500,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_ab336560","line":497,"range":{"start_line":497,"start_character":32,"end_line":497,"end_character":49},"in_reply_to":"9f560f44_6bbaedbf","updated":"2020-09-25 11:03:36.000000000","message":"ups... this is copy paste error!","commit_id":"8d6d105397e8fa4d4e4e58673d80b4a2b69243ba"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"a1c69c8c9223bbb5fd413eb48d972ccb160d8a0d","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            try:"},{"line_number":468,"context_line":"                self._trigger_removed_nodes_ports_cleanup("},{"line_number":469,"context_line":"                    previous_ports_to_remove)"},{"line_number":470,"context_line":"            except Exception:"},{"line_number":471,"context_line":"                LOG.exception(\u0027Error while removing the ports associated to \u0027"},{"line_number":472,"context_line":"                              \u0027deleted nodes. It will be retried in %s \u0027"},{"line_number":473,"context_line":"                              \u0027seconds\u0027, NODE_PORTS_CLEAN_FREQUENCY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_1ff8c7c1","line":470,"range":{"start_line":470,"start_character":0,"end_line":470,"end_character":29},"updated":"2020-09-25 13:57:03.000000000","message":"Did you see some specific exception being raised or this is just a general protection for the thread to keep running?","commit_id":"51029cbe5eac2d27421231ede208e212da09cc72"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"d3e8df51149415dab9a17d401163277102f845ad","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            try:"},{"line_number":468,"context_line":"                self._trigger_removed_nodes_ports_cleanup("},{"line_number":469,"context_line":"                    previous_ports_to_remove)"},{"line_number":470,"context_line":"            except Exception:"},{"line_number":471,"context_line":"                LOG.exception(\u0027Error while removing the ports associated to \u0027"},{"line_number":472,"context_line":"                              \u0027deleted nodes. It will be retried in %s \u0027"},{"line_number":473,"context_line":"                              \u0027seconds\u0027, NODE_PORTS_CLEAN_FREQUENCY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_5aec0df3","line":470,"range":{"start_line":470,"start_character":0,"end_line":470,"end_character":29},"in_reply_to":"9f560f44_1a3bb5d0","updated":"2020-09-25 14:37:15.000000000","message":"ah yes, disregard previous comment.","commit_id":"51029cbe5eac2d27421231ede208e212da09cc72"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"909c50af03023a343da441cac353b7a3a0b7cce7","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            try:"},{"line_number":468,"context_line":"                self._trigger_removed_nodes_ports_cleanup("},{"line_number":469,"context_line":"                    previous_ports_to_remove)"},{"line_number":470,"context_line":"            except Exception:"},{"line_number":471,"context_line":"                LOG.exception(\u0027Error while removing the ports associated to \u0027"},{"line_number":472,"context_line":"                              \u0027deleted nodes. It will be retried in %s \u0027"},{"line_number":473,"context_line":"                              \u0027seconds\u0027, NODE_PORTS_CLEAN_FREQUENCY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_1a3bb5d0","line":470,"range":{"start_line":470,"start_character":0,"end_line":470,"end_character":29},"in_reply_to":"9f560f44_1fda87e7","updated":"2020-09-25 14:21:42.000000000","message":"Isn\u0027t that handle by LOG.exception already?","commit_id":"51029cbe5eac2d27421231ede208e212da09cc72"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"63fc1123c749048f2b3f80cea7824dc66a7aa252","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            try:"},{"line_number":468,"context_line":"                self._trigger_removed_nodes_ports_cleanup("},{"line_number":469,"context_line":"                    previous_ports_to_remove)"},{"line_number":470,"context_line":"            except Exception:"},{"line_number":471,"context_line":"                LOG.exception(\u0027Error while removing the ports associated to \u0027"},{"line_number":472,"context_line":"                              \u0027deleted nodes. It will be retried in %s \u0027"},{"line_number":473,"context_line":"                              \u0027seconds\u0027, NODE_PORTS_CLEAN_FREQUENCY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_fff3539d","line":470,"range":{"start_line":470,"start_character":0,"end_line":470,"end_character":29},"in_reply_to":"9f560f44_1ff8c7c1","updated":"2020-09-25 14:03:47.000000000","message":"I did not see any, this was suggested by dulek. And I guess we may get some unexpected OSP exceptions at some point. As this is going to retry later on, and it is just to cleanup stuff, I decided to just log the exception and continue. But, if you think it is better to differentiate them, or raise some specific one, I can do that","commit_id":"51029cbe5eac2d27421231ede208e212da09cc72"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"17e9018c72008e525a67ab3b196fbf8bb1a7d172","unresolved":false,"context_lines":[{"line_number":467,"context_line":"            try:"},{"line_number":468,"context_line":"                self._trigger_removed_nodes_ports_cleanup("},{"line_number":469,"context_line":"                    previous_ports_to_remove)"},{"line_number":470,"context_line":"            except Exception:"},{"line_number":471,"context_line":"                LOG.exception(\u0027Error while removing the ports associated to \u0027"},{"line_number":472,"context_line":"                              \u0027deleted nodes. It will be retried in %s \u0027"},{"line_number":473,"context_line":"                              \u0027seconds\u0027, NODE_PORTS_CLEAN_FREQUENCY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_1fda87e7","line":470,"range":{"start_line":470,"start_character":0,"end_line":470,"end_character":29},"in_reply_to":"9f560f44_fff3539d","updated":"2020-09-25 14:09:49.000000000","message":"It\u0027s fine. But, it might be handy to log the exception message, just in case it keeps failing on something specific.","commit_id":"51029cbe5eac2d27421231ede208e212da09cc72"}]}
