)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f87146e6e9b7ecef678587f1786f48fb3c6e747f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2df67305_c7926855","updated":"2022-03-24 15:41:33.000000000","message":"Nice work! Some remarks inline, main being about on_finalize() impact.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9c210e74_a087a5c4","updated":"2022-03-25 15:13:00.000000000","message":"Great work! The two main points is avoiding the Neutron call and upgrades.","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5aae35c9213aaab485fdf1ec6259fbcaa432f0e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5cef5759_a0cc64b0","updated":"2022-04-05 14:25:03.000000000","message":"This is good from my perspective, besides the Maysa\u0027s comment on naming.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"1b3c36b689cd3126a4594530496803a94b23b4b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"f620d768_bc9b1c4c","updated":"2022-03-31 09:26:26.000000000","message":"To raise discussion","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"29b23d3aad348acce599a4501479a01583718a11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"96e9a1f6_c052b824","updated":"2022-03-30 08:29:41.000000000","message":"recheck","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"b1d006d8aa3ac62915f255deeb2ce4b62add09f5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"dc34f471_a8b00b00","in_reply_to":"0f074161_dac1934c","updated":"2022-03-31 15:53:11.000000000","message":"How would we clean up the resources during cluster destroy if we don\u0027t have the tags? If they\u0027re a requirement.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5aae35c9213aaab485fdf1ec6259fbcaa432f0e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8bf9dbf4_4255178d","in_reply_to":"70a0ba15_48958f2c","updated":"2022-04-05 14:25:03.000000000","message":"Honestly in the long run I think we only need to tag networks. Then everything else should be discoverable based on that. And in the installer we have troubles anyway if we\u0027re looking only by tags.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"e72f8d57590606d10466143ca838d2e68a5275e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"70a0ba15_48958f2c","in_reply_to":"dc34f471_a8b00b00","updated":"2022-04-01 06:59:08.000000000","message":"We could do that by looking for specific string on the description, or using a port naming convention? Querying for port is kind of cheap, we are doing it anyway using tags as a filter, while tags are on the separate table so the complexity is bigger and the query a little bit more expensive.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"fc0e18a88517f15eb25d2b6aa057ef166cceec13","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"0f074161_dac1934c","in_reply_to":"f620d768_bc9b1c4c","updated":"2022-03-31 14:17:53.000000000","message":"Well, that\u0027s another option. Also, I was thinking about skipping tagging resources, since it would be easier on neutron. Although that could be necessary to change on installer side.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"8c79dafcf9fd87743d1c4166eb5cb8704391f8a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"36b1ee1d_a85f46c6","updated":"2022-04-06 16:06:02.000000000","message":"recheck","commit_id":"1e0cf1b22c58ba1ec0463d61a73975291691d732"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6b927e2656aedf745e8664b9f29cbbee596a2640","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"66aadd08_00b61a67","updated":"2022-04-07 08:39:47.000000000","message":"recheck","commit_id":"1e0cf1b22c58ba1ec0463d61a73975291691d732"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c4076f8e984ac0527c29c20516a7ecadfb72a573","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"16f15a11_e46bac52","updated":"2022-04-08 11:52:27.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"3077d638a8a4370b997f258dd51604eba4bb1a0d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3ca24811_6cf491a3","updated":"2022-04-19 15:51:26.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c83f25339e960859b7f7aa59509af8581d0975b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"7e59cda2_d4759178","updated":"2022-04-19 04:39:18.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"4506565c96201312443f8076cf8542dac625245d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"877d0d9f_084fb80f","updated":"2022-04-14 16:15:48.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4bd521b3255434967f8792f7bf39c6eb311ea9cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"933e42af_05435f5f","updated":"2022-04-19 11:02:34.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7fd39148008a9aec5114b3a50e7aa3b9783670e1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"9a0967be_c05f0929","updated":"2022-04-15 04:58:08.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"098889b16d60881f5c0c302604a40272b29a2691","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"afc2303b_580d8352","updated":"2022-04-18 17:49:36.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"95f2b8be856250d37b6f2eebccd368a9bb7e3698","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"cad1a2b1_313f5adc","updated":"2022-04-14 12:25:06.000000000","message":"recheck","commit_id":"7ef2d5415071c1380315ebeb4f811f68fe41f1f3"}],"kuryr_kubernetes/controller/drivers/namespace_subnet.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f87146e6e9b7ecef678587f1786f48fb3c6e747f","unresolved":true,"context_lines":[{"line_number":117,"context_line":"            LOG.exception(\"Error deleting network %s.\", net_id)"},{"line_number":118,"context_line":"            raise"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c307bfb2_72c82f64","line":120,"range":{"start_line":120,"start_character":50,"end_line":120,"end_character":56},"updated":"2022-03-24 15:41:33.000000000","message":"Maybe we should just pass a namespace here instead of name and uid separately?","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"ccbc88cde6f1a9ed304af40c1ccf6f2648246c15","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            LOG.exception(\"Error deleting network %s.\", net_id)"},{"line_number":118,"context_line":"            raise"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ad5615b6_8fef87be","line":120,"range":{"start_line":120,"start_character":50,"end_line":120,"end_character":56},"in_reply_to":"c307bfb2_72c82f64","updated":"2022-03-25 11:20:38.000000000","message":"Ack","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f87146e6e9b7ecef678587f1786f48fb3c6e747f","unresolved":true,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"54cfedb4_677e01c3","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":74},"updated":"2022-03-24 15:41:33.000000000","message":"I wonder if we should take a chance to just drop ns/ prefix and -net suffix. As we have uuid, the name should be pretty unique even if there are some resources on that tenant created outside of Kuryr.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":true,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"e71656e9_2d4ae263","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":74},"in_reply_to":"54cfedb4_677e01c3","updated":"2022-03-25 15:13:00.000000000","message":"+1. I also think we should try to do that. The name will be a bit more clean.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"cf00bb51_b8944824","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":74},"in_reply_to":"b2a1f191_9e4ba8ec","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c996b59de20f215ffe4060fb1ef50379cd39a397","unresolved":true,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def create_network(self, ns_name, project_id, ns_uid):"},{"line_number":121,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":122,"context_line":"        net_name \u003d c_utils.get_resource_name(ns_name, ns_uid, \u0027ns\u0027, \u0027net\u0027)"},{"line_number":123,"context_line":"        networks \u003d os_net.networks(name\u003dnet_name)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"b2a1f191_9e4ba8ec","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":74},"in_reply_to":"e71656e9_2d4ae263","updated":"2022-03-28 09:36:45.000000000","message":"Ok.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"e478805e9adc7012e217cf862e10ec7168940dd2","unresolved":true,"context_lines":[{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net])"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Network does not exist. Creating.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"289e186d_acf46ac1","line":131,"range":{"start_line":131,"start_character":12,"end_line":131,"end_character":56},"updated":"2022-03-24 14:24:11.000000000","message":"Perhaps we should raise an exception from this function in case of error, so that we eventually got neutron to tag the object (probably).","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f87146e6e9b7ecef678587f1786f48fb3c6e747f","unresolved":true,"context_lines":[{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net])"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Network does not exist. Creating.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4d641a1a_a0ca6e95","line":131,"range":{"start_line":131,"start_character":12,"end_line":131,"end_character":56},"in_reply_to":"289e186d_acf46ac1","updated":"2022-03-24 15:41:33.000000000","message":"Yeaaah. So this is really bigger story. Cutting it short - ResourceNotReady might be the rescue here.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net])"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Network does not exist. Creating.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"41c00a63_533d31be","line":131,"range":{"start_line":131,"start_character":12,"end_line":131,"end_character":56},"in_reply_to":"4d641a1a_a0ca6e95","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":true,"context_lines":[{"line_number":126,"context_line":"            # NOTE(ltomasbo): only one network must exists"},{"line_number":127,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net], exceptions\u003dTrue)"},{"line_number":132,"context_line":"            return neutron_net.id"}],"source_content_type":"text/x-python","patch_set":3,"id":"813e3d31_e5e7c176","line":129,"range":{"start_line":129,"start_character":42,"end_line":129,"end_character":47},"updated":"2022-03-25 15:13:00.000000000","message":"failed","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            # NOTE(ltomasbo): only one network must exists"},{"line_number":127,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net], exceptions\u003dTrue)"},{"line_number":132,"context_line":"            return neutron_net.id"}],"source_content_type":"text/x-python","patch_set":3,"id":"ddc6ec86_4821164b","line":129,"range":{"start_line":129,"start_character":42,"end_line":129,"end_character":47},"in_reply_to":"813e3d31_e5e7c176","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":true,"context_lines":[{"line_number":127,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net], exceptions\u003dTrue)"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"d8f1ab10_f1ac0d2c","line":130,"range":{"start_line":130,"start_character":14,"end_line":130,"end_character":76},"updated":"2022-03-25 15:13:00.000000000","message":"we can check here if the Network has any tags defined and avoid performing one unnecessary call to Neutron API.","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net], exceptions\u003dTrue)"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfaa2da9_a18ea1f5","line":130,"range":{"start_line":130,"start_character":14,"end_line":130,"end_character":76},"in_reply_to":"3ee8c971_ef0b3b91","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c996b59de20f215ffe4060fb1ef50379cd39a397","unresolved":true,"context_lines":[{"line_number":127,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":128,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":129,"context_line":"            # for some reason tagging has faild. Let\u0027s tag it, even if it\u0027s"},{"line_number":130,"context_line":"            # already tagged, since we are in this particular place in code."},{"line_number":131,"context_line":"            c_utils.tag_neutron_resources([neutron_net], exceptions\u003dTrue)"},{"line_number":132,"context_line":"            return neutron_net.id"},{"line_number":133,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ee8c971_ef0b3b91","line":130,"range":{"start_line":130,"start_character":14,"end_line":130,"end_character":76},"in_reply_to":"d8f1ab10_f1ac0d2c","updated":"2022-03-28 09:36:45.000000000","message":"Oh, right.","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":true,"context_lines":[{"line_number":158,"context_line":"            # NOTE(ltomasbo): only one subnet must exists"},{"line_number":159,"context_line":"            subnet \u003d next(subnets)"},{"line_number":160,"context_line":"            # NOTE(gryf): same situation as in networks."},{"line_number":161,"context_line":"            c_utils.tag_neutron_resources([subnet], exceptions\u003dTrue)"},{"line_number":162,"context_line":"            return subnet.id, subnet.cidr"},{"line_number":163,"context_line":"        except StopIteration:"},{"line_number":164,"context_line":"            LOG.debug(\u0027Subnet does not exist. Creating.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3eb8bbc2_3a794e7e","line":161,"updated":"2022-03-25 15:13:00.000000000","message":"ditto","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            # NOTE(ltomasbo): only one subnet must exists"},{"line_number":159,"context_line":"            subnet \u003d next(subnets)"},{"line_number":160,"context_line":"            # NOTE(gryf): same situation as in networks."},{"line_number":161,"context_line":"            c_utils.tag_neutron_resources([subnet], exceptions\u003dTrue)"},{"line_number":162,"context_line":"            return subnet.id, subnet.cidr"},{"line_number":163,"context_line":"        except StopIteration:"},{"line_number":164,"context_line":"            LOG.debug(\u0027Subnet does not exist. Creating.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ed2520a_6f0eea9b","line":161,"in_reply_to":"3eb8bbc2_3a794e7e","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"fde117d0fceec19699ccd710a76a3a0e07bf64bd","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":158,"context_line":"        ns_name \u003d ns[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":159,"context_line":"        ns_uid \u003d ns[\u0027metadata\u0027][\u0027uid\u0027]"},{"line_number":160,"context_line":"        subnet_name \u003d c_utils.get_resource_name(ns_name, ns_uid)"},{"line_number":161,"context_line":"        subnets \u003d os_net.subnets(network_id\u003dnet_id)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f2b16a7_6a4ca6c6","line":160,"updated":"2022-03-31 09:25:47.000000000","message":"instead of adding the uid to the name of the resource, what do you think about adding it to the description? I think it\u0027s also possible to query by description and would be cleaner, I guess.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"fc0e18a88517f15eb25d2b6aa057ef166cceec13","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":158,"context_line":"        ns_name \u003d ns[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":159,"context_line":"        ns_uid \u003d ns[\u0027metadata\u0027][\u0027uid\u0027]"},{"line_number":160,"context_line":"        subnet_name \u003d c_utils.get_resource_name(ns_name, ns_uid)"},{"line_number":161,"context_line":"        subnets \u003d os_net.subnets(network_id\u003dnet_id)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"f3d388d5_7cc5bc3f","line":160,"in_reply_to":"3f2b16a7_6a4ca6c6","updated":"2022-03-31 14:17:53.000000000","message":"Ack","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"8dc30134f7733c3a89f56e136a4e82906a09b690","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":158,"context_line":"        ns_name \u003d ns[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":159,"context_line":"        ns_uid \u003d ns[\u0027metadata\u0027][\u0027uid\u0027]"},{"line_number":160,"context_line":"        subnet_name \u003d c_utils.get_resource_name(ns_name, ns_uid)"},{"line_number":161,"context_line":"        subnets \u003d os_net.subnets(network_id\u003dnet_id)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"e38380a4_68f91c0f","line":160,"in_reply_to":"f3d388d5_7cc5bc3f","updated":"2022-03-31 15:59:14.000000000","message":"Might be good to have @dulek\u0027s input here as well.","commit_id":"c98196bf7fc2195b1dbc83124229931eead351f3"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"07a137313ce18fc64feede16a555e4af5f8be7ec","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        try:"},{"line_number":134,"context_line":"            # NOTE(ltomasbo): only one network must exists"},{"line_number":135,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":136,"context_line":"            if neutron_net.description !\u003d ns_uid:"},{"line_number":137,"context_line":"                # this condition would be unnecessary when guard for old names"},{"line_number":138,"context_line":"                # would be eventually removed."},{"line_number":139,"context_line":"                raise ValueError"},{"line_number":140,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":141,"context_line":"            # for some reason tagging has failed."},{"line_number":142,"context_line":"            if TAGS and not set(TAGS).issubset(set(neutron_net.tags)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"291d840a_fb2aece0","line":139,"range":{"start_line":136,"start_character":0,"end_line":139,"end_character":32},"updated":"2022-04-06 09:30:28.000000000","message":"I guess this should only run when checking for the new name, right?\nOtherwise we might see Network with old name without description set and Kuryr creating another one.","commit_id":"d43b646a389a6e3e8766611cdf8ee306c5255745"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4ecbe66e0016d09b2d38a671c4006dd6fca16ce2","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        try:"},{"line_number":134,"context_line":"            # NOTE(ltomasbo): only one network must exists"},{"line_number":135,"context_line":"            neutron_net \u003d next(networks)"},{"line_number":136,"context_line":"            if neutron_net.description !\u003d ns_uid:"},{"line_number":137,"context_line":"                # this condition would be unnecessary when guard for old names"},{"line_number":138,"context_line":"                # would be eventually removed."},{"line_number":139,"context_line":"                raise ValueError"},{"line_number":140,"context_line":"            # NOTE(gryf): It might happen, that network has been created, but"},{"line_number":141,"context_line":"            # for some reason tagging has failed."},{"line_number":142,"context_line":"            if TAGS and not set(TAGS).issubset(set(neutron_net.tags)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"20737185_1282dd39","line":139,"range":{"start_line":136,"start_character":0,"end_line":139,"end_character":32},"in_reply_to":"291d840a_fb2aece0","updated":"2022-04-06 10:31:16.000000000","message":"ah. right.","commit_id":"d43b646a389a6e3e8766611cdf8ee306c5255745"}],"kuryr_kubernetes/controller/handlers/kuryrnetwork.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f87146e6e9b7ecef678587f1786f48fb3c6e747f","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    def on_finalize(self, kuryrnet_crd, *args, **kwargs):"},{"line_number":129,"context_line":"        LOG.debug(\"Deleting kuryrnetwork CRD resources: %s\", kuryrnet_crd)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        net_id \u003d kuryrnet_crd.get(\u0027status\u0027, {}).get(\u0027netId\u0027)"},{"line_number":132,"context_line":"        if net_id:"},{"line_number":133,"context_line":"            self._drv_vif_pool.delete_network_pools(net_id)"},{"line_number":134,"context_line":"            try:"},{"line_number":135,"context_line":"                self._drv_subnets.delete_namespace_subnet(kuryrnet_crd)"},{"line_number":136,"context_line":"            except k_exc.ResourceNotReady:"},{"line_number":137,"context_line":"                LOG.debug(\"Subnet is not ready to be removed.\")"},{"line_number":138,"context_line":"                # TODO(ltomasbo): Once KuryrPort CRDs is supported, we should"},{"line_number":139,"context_line":"                # execute a delete network ports method here to remove the"},{"line_number":140,"context_line":"                # ports associated to the namespace/subnet, ensuring next"},{"line_number":141,"context_line":"                # retry will be successful"},{"line_number":142,"context_line":"                raise"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        namespace \u003d {"},{"line_number":145,"context_line":"            \u0027metadata\u0027: {\u0027name\u0027: kuryrnet_crd[\u0027spec\u0027][\u0027nsName\u0027]}}"}],"source_content_type":"text/x-python","patch_set":1,"id":"f46464ed_bb4790e8","line":142,"range":{"start_line":131,"start_character":0,"end_line":142,"end_character":21},"updated":"2022-03-24 15:41:33.000000000","message":"This is an interesting case. I think even if there\u0027s no net_id we should run delete_namespace_subnet and try to find it by name. The ports should be handled by the fact pods are being deleted. I\u0027m not sure about pooled ones though…","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0008ebf4acdd88e4539fb973ab717859585165be","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    def on_finalize(self, kuryrnet_crd, *args, **kwargs):"},{"line_number":129,"context_line":"        LOG.debug(\"Deleting kuryrnetwork CRD resources: %s\", kuryrnet_crd)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        net_id \u003d kuryrnet_crd.get(\u0027status\u0027, {}).get(\u0027netId\u0027)"},{"line_number":132,"context_line":"        if net_id:"},{"line_number":133,"context_line":"            self._drv_vif_pool.delete_network_pools(net_id)"},{"line_number":134,"context_line":"            try:"},{"line_number":135,"context_line":"                self._drv_subnets.delete_namespace_subnet(kuryrnet_crd)"},{"line_number":136,"context_line":"            except k_exc.ResourceNotReady:"},{"line_number":137,"context_line":"                LOG.debug(\"Subnet is not ready to be removed.\")"},{"line_number":138,"context_line":"                # TODO(ltomasbo): Once KuryrPort CRDs is supported, we should"},{"line_number":139,"context_line":"                # execute a delete network ports method here to remove the"},{"line_number":140,"context_line":"                # ports associated to the namespace/subnet, ensuring next"},{"line_number":141,"context_line":"                # retry will be successful"},{"line_number":142,"context_line":"                raise"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        namespace \u003d {"},{"line_number":145,"context_line":"            \u0027metadata\u0027: {\u0027name\u0027: kuryrnet_crd[\u0027spec\u0027][\u0027nsName\u0027]}}"}],"source_content_type":"text/x-python","patch_set":1,"id":"e407ea7f_06fb671c","line":142,"range":{"start_line":131,"start_character":0,"end_line":142,"end_character":21},"in_reply_to":"f46464ed_bb4790e8","updated":"2022-03-30 08:30:30.000000000","message":"This is addressed in subsequent patch.","commit_id":"9d926d2c0fb3ff27679c42acd3c505fd8960b4be"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f8d92c2882384966a1aaca2bd5df2907826926ed","unresolved":true,"context_lines":[{"line_number":63,"context_line":"        net_id \u003d kns_status.get(\u0027netId\u0027)"},{"line_number":64,"context_line":"        if not net_id:"},{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                net_id \u003d self._drv_subnets.create_network(ns_name, project_id,"},{"line_number":67,"context_line":"                                                          ns_uid)"},{"line_number":68,"context_line":"            except os_exc.SDKException as ex:"},{"line_number":69,"context_line":"                self.k8s.add_event(kuryrnet_crd, \u0027CreateNetworkFailed\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"de828a6e_022ebffb","line":66,"updated":"2022-03-25 15:13:00.000000000","message":"I think we need to have a mechanism for upgrades in place. If someone upgrades to from a version that had a different name, it looks like the Network might not be found and it will try creating another one.\n\nThe only operation that I think could cause an event on the KNP when it\u0027s already wired is the namemspace labeling.","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"368fb7fa55b11e197079ee487cc721ef56b69870","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        net_id \u003d kns_status.get(\u0027netId\u0027)"},{"line_number":64,"context_line":"        if not net_id:"},{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                net_id \u003d self._drv_subnets.create_network(ns_name, project_id,"},{"line_number":67,"context_line":"                                                          ns_uid)"},{"line_number":68,"context_line":"            except os_exc.SDKException as ex:"},{"line_number":69,"context_line":"                self.k8s.add_event(kuryrnet_crd, \u0027CreateNetworkFailed\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"b00a6ce4_da201309","line":66,"in_reply_to":"6663d40b_f5d6fabb","updated":"2022-03-28 11:30:27.000000000","message":"Done","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c996b59de20f215ffe4060fb1ef50379cd39a397","unresolved":true,"context_lines":[{"line_number":63,"context_line":"        net_id \u003d kns_status.get(\u0027netId\u0027)"},{"line_number":64,"context_line":"        if not net_id:"},{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                net_id \u003d self._drv_subnets.create_network(ns_name, project_id,"},{"line_number":67,"context_line":"                                                          ns_uid)"},{"line_number":68,"context_line":"            except os_exc.SDKException as ex:"},{"line_number":69,"context_line":"                self.k8s.add_event(kuryrnet_crd, \u0027CreateNetworkFailed\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"6663d40b_f5d6fabb","line":66,"in_reply_to":"de828a6e_022ebffb","updated":"2022-03-28 09:36:45.000000000","message":"I guess, that could only happen when KNP have no net_id/subnet_id, so in situation when network/subnet creation was interrupted.","commit_id":"2bf1e4ee1119cc5b6d4545502830016fbd65c7cb"}]}
