)]}'
{"kuryr_kubernetes/controller/drivers/lbaasv2.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"30d47fbaec33eafb8b30000fbe7617492ee9017b","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"},{"line_number":831,"context_line":"                return None"},{"line_number":832,"context_line":"            elif status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":833,"context_line":"                LOG.error(\"Octavia is misbehaving hence LB is stuck\""},{"line_number":834,"context_line":"                          \" in pending state\", loadbalancer[\u0027id\u0027])"},{"line_number":835,"context_line":"                self.release_loadbalancer(loadbalancer)"},{"line_number":836,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"4cfd3d8a_fa50eaf4","line":833,"updated":"2021-05-03 12:23:59.000000000","message":"The LOG message should be formatted to accommodate the loadbalancer ID.\n\nhttps://realpython.com/python-string-formatting/#1-old-style-string-formatting-operator","commit_id":"4d287e3e86a0053b27d71bb17fc2febd11d32352"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"92395b9e4a90cbe357a436174946d77983e2f6db","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"},{"line_number":831,"context_line":"                return None"},{"line_number":832,"context_line":"            elif status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":833,"context_line":"                LOG.error(\"Octavia is misbehaving hence LB is stuck\""},{"line_number":834,"context_line":"                          \" in pending state\", loadbalancer[\u0027id\u0027])"},{"line_number":835,"context_line":"                self.release_loadbalancer(loadbalancer)"},{"line_number":836,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"21a2abf2_377afa3d","line":833,"range":{"start_line":833,"start_character":20,"end_line":833,"end_character":25},"updated":"2021-05-04 07:09:29.000000000","message":"this should not be an error, finding the loadbalancer in PENDING_UPDATE is ok, as long as it is not stuck there forever","commit_id":"4d287e3e86a0053b27d71bb17fc2febd11d32352"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"10c31f0924c5df0b5f54c085ab0a3ac18f888685","unresolved":true,"context_lines":[{"line_number":830,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"},{"line_number":831,"context_line":"                return None"},{"line_number":832,"context_line":"            elif status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":833,"context_line":"                LOG.error(\"Octavia is misbehaving hence LB is stuck\""},{"line_number":834,"context_line":"                          \" in pending state\", loadbalancer[\u0027id\u0027])"},{"line_number":835,"context_line":"                self.release_loadbalancer(loadbalancer)"},{"line_number":836,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"8ef0d0e3_4d9cd91e","line":833,"range":{"start_line":833,"start_character":20,"end_line":833,"end_character":25},"in_reply_to":"21a2abf2_377afa3d","updated":"2021-05-05 07:20:24.000000000","message":"Perhaps a better idea would be to move the check of the status outside of the loop, so that if we still see pending update after our timeout we would place appropriate error message and raise exception. Or am I talking nonsense?","commit_id":"4d287e3e86a0053b27d71bb17fc2febd11d32352"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"30d47fbaec33eafb8b30000fbe7617492ee9017b","unresolved":true,"context_lines":[{"line_number":832,"context_line":"            elif status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":833,"context_line":"                LOG.error(\"Octavia is misbehaving hence LB is stuck\""},{"line_number":834,"context_line":"                          \" in pending state\", loadbalancer[\u0027id\u0027])"},{"line_number":835,"context_line":"                self.release_loadbalancer(loadbalancer)"},{"line_number":836,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"},{"line_number":837,"context_line":"                return None"},{"line_number":838,"context_line":"            else:"},{"line_number":839,"context_line":"                LOG.debug(\"Provisioning status %(status)s for %(lb)s, \""}],"source_content_type":"text/x-python","patch_set":5,"id":"cb76bf07_01e024f4","line":836,"range":{"start_line":835,"start_character":0,"end_line":836,"end_character":63},"updated":"2021-05-03 12:23:59.000000000","message":"No need to trigger these operations of removing the loadbalancer and the reference of it on the KuryrLoadBalancer CRD as once the Load Balancer is stuck at this point it\u0027s not possible to perform any operation on it.\n\nTHis is currently a bug on Octavia https://storyboard.openstack.org/#!/story/2008338","commit_id":"4d287e3e86a0053b27d71bb17fc2febd11d32352"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"2de77f42cbd8cca9b15b2e1fc7ef58f83363de20","unresolved":true,"context_lines":[{"line_number":829,"context_line":"                          \"loadbalancer %s\", loadbalancer[\u0027name\u0027])"},{"line_number":830,"context_line":"                utils.clean_lb_crd_status(loadbalancer[\u0027name\u0027])"},{"line_number":831,"context_line":"                return None"},{"line_number":832,"context_line":"            elif status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":833,"context_line":"                LOG.debug(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":834,"context_line":"                           \"is stuck %s\", loadbalancer[\u0027id\u0027])"},{"line_number":835,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":6,"id":"7718378c_ff77fc4f","line":832,"updated":"2021-05-06 10:03:59.000000000","message":"What Roman suggested makes complete sense. This check can be moved out of the loop and we can just return nothing when the condition is matched. Also, a warning might be a better fit for the LOG message instead of debug.","commit_id":"02e576ee1609e0b51dc85fcd6a811f6dfcf98e38"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5e4da33c06d00b7f08a2dd39d2fe9e3917b789cf","unresolved":true,"context_lines":[{"line_number":804,"context_line":"                               interval\u003d_LB_STS_POLL_FAST_INTERVAL):"},{"line_number":805,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"        if status \u003d\u003d \u0027PENDING UPDATE\u0027:"},{"line_number":808,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":809,"context_line":"                        \"is stuck %s\", loadbalancer[\u0027id\u0027])"},{"line_number":810,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":7,"id":"33e8d000_58ffdb20","line":807,"updated":"2021-05-07 09:35:23.000000000","message":"This check shouldn\u0027t be before the loop, it should be after. If we keep it here it would never check what we want which is the LB status is still pending_update after there is no provisioning time remaining (in other words stuck on pending_updtae)","commit_id":"30ab45916953f0f59c1f88b5ea9dacd2216ea6c6"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"231b787e0687b55351aa13fcf53315a5be9ddf4a","unresolved":true,"context_lines":[{"line_number":836,"context_line":"                           \u0027rem\u0027: remaining})"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck %s\", loadbalancer[\u0027id\u0027])"},{"line_number":841,"context_line":"            return None"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5215cdfd_e8e79efe","line":840,"range":{"start_line":839,"start_character":25,"end_line":840,"end_character":38},"updated":"2021-05-10 06:42:39.000000000","message":"perhaps worth to mention that it is \"stuck on PENDING_UPDATE for too long\". There is also the option for the loadbalancer to be stuck on PENDING_DELETE, this should be considered too","commit_id":"33b3e69ebfab6337bac0ea8574e4fc64ecd091dc"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"6c3f2fb940411e7619ad58d77ff6665fbe56cbf3","unresolved":true,"context_lines":[{"line_number":835,"context_line":"                          {\u0027status\u0027: status, \u0027lb\u0027: loadbalancer,"},{"line_number":836,"context_line":"                           \u0027rem\u0027: remaining})"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in PENDING_UPDATE or\""},{"line_number":841,"context_line":"                        \"PENDING_DELETE for too long %s\", loadbalancer[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"968d9f2f_203503fc","line":838,"range":{"start_line":838,"start_character":3,"end_line":838,"end_character":38},"updated":"2021-05-11 13:46:48.000000000","message":"missing the PENDING_DELETE status","commit_id":"64232a646162f8f27933fb96c294c4e1928a530e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"6c3f2fb940411e7619ad58d77ff6665fbe56cbf3","unresolved":true,"context_lines":[{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in PENDING_UPDATE or\""},{"line_number":841,"context_line":"                        \"PENDING_DELETE for too long %s\", loadbalancer[\u0027id\u0027])"},{"line_number":842,"context_line":"            return None"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"},{"line_number":845,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ab9d1ecd_354f0736","line":842,"range":{"start_line":842,"start_character":12,"end_line":842,"end_character":23},"updated":"2021-05-11 13:46:48.000000000","message":"is it \"None\" what we want to return in this situation? If that so I would add a note about it to explain why","commit_id":"64232a646162f8f27933fb96c294c4e1928a530e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"e536e906377b5abb95ab069c2fa87402ce96c4e6","unresolved":true,"context_lines":[{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027 or status \u003d\u003d \u0027PENDING_DELETE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in PENDING_UPDATE or\""},{"line_number":841,"context_line":"                        \"PENDING_DELETE for too long %s\", loadbalancer[\u0027id\u0027])"},{"line_number":842,"context_line":"            return None"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"}],"source_content_type":"text/x-python","patch_set":10,"id":"6f4f3a23_4cf26a7e","line":841,"range":{"start_line":840,"start_character":37,"end_line":841,"end_character":39},"updated":"2021-05-11 16:04:04.000000000","message":"sorry, one more nit, use the status var here to only print the real status the loadbalancer is stuck in","commit_id":"237b55d7289ff4b43072009b4fa9e2c175441a0a"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1f9d12ba2dd5e0fcc384a2331e43ae605c39e40f","unresolved":true,"context_lines":[{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027 or status \u003d\u003d \u0027PENDING_DELETE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in {0} for too\""},{"line_number":841,"context_line":"                        \"long {1}\".format(status,loadbalancer[\u0027id\u0027])"},{"line_number":842,"context_line":"            return None"},{"line_number":843,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"a96d6e2c_46389fff","line":840,"range":{"start_line":840,"start_character":38,"end_line":840,"end_character":39},"updated":"2021-05-12 14:30:17.000000000","message":"no need 0 here, just {}","commit_id":"1f0f0566ad1842d640cc44e11e55d1dfd1226f8d"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1f9d12ba2dd5e0fcc384a2331e43ae605c39e40f","unresolved":true,"context_lines":[{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027 or status \u003d\u003d \u0027PENDING_DELETE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in {0} for too\""},{"line_number":841,"context_line":"                        \"long {1}\".format(status,loadbalancer[\u0027id\u0027])"},{"line_number":842,"context_line":"            return None"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"}],"source_content_type":"text/x-python","patch_set":11,"id":"f9bee9c5_c0e0f805","line":841,"updated":"2021-05-12 14:30:17.000000000","message":"same here, no need 1, just {}, also, add a space between \"status,\" and \"loadbalancer[\u0027id\u0027])\"","commit_id":"1f0f0566ad1842d640cc44e11e55d1dfd1226f8d"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"f20829f28fe0ef7aff504402424640f4019ce0f3","unresolved":true,"context_lines":[{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027 or status \u003d\u003d \u0027PENDING_DELETE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer\""},{"line_number":840,"context_line":"                        \"is stuck in {} for too long {}\".format(status, loadbalancer[\u0027id\u0027])"},{"line_number":841,"context_line":"            return None"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"}],"source_content_type":"text/x-python","patch_set":12,"id":"905d2587_9ecaee65","line":840,"updated":"2021-05-12 17:27:14.000000000","message":"Seems the CI is not happy with the changes? I took a quick look at https://zuul.openstack.org/status#789052\n\nIt will complain that this line is too long and there are also some other issue that can be checked by just running \u0027tox -e pep8\u0027 or \u0027tox -e py36\u0027.","commit_id":"fdf27a665f19d0d59b012261204c38caef5d2e36"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"78e428a29a4b45835662e0b98bd3e7d40064414b","unresolved":true,"context_lines":[{"line_number":835,"context_line":"                          {\u0027status\u0027: status, \u0027lb\u0027: loadbalancer,"},{"line_number":836,"context_line":"                           \u0027rem\u0027: remaining})"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        if status \u003d\u003d \u0027PENDING_UPDATE\u0027 or status \u003d\u003d \u0027PENDING_DELETE\u0027:"},{"line_number":839,"context_line":"            LOG.warning(\"Octavia is misbehaving, hence loadbalancer \""},{"line_number":840,"context_line":"                        \"is stuck in {} for too long {}\""},{"line_number":841,"context_line":"                        .format(status, loadbalancer[\u0027id\u0027]))"},{"line_number":842,"context_line":"            return None"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"       raise k_exc.ResourceNotReady(loadbalancer)"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"    def _wait_for_deletion(self, loadbalancer, timeout,"},{"line_number":847,"context_line":"                           interval\u003d_LB_STS_POLL_FAST_INTERVAL):"}],"source_content_type":"text/x-python","patch_set":15,"id":"07217a54_b90108b1","line":844,"range":{"start_line":838,"start_character":0,"end_line":844,"end_character":49},"updated":"2021-05-17 15:03:15.000000000","message":"We still want to raise ResourceNotReady if this happens, as it will allow us to retry in other nested handler [1]. RetryHandler makes sure the event is retried blocking the handler execution so that events are processed in order. This is okay, we don\u0027t want to process next events before the Octavia finishes modifying LB for the current ones.\n\nThe problem is when this times out here [2]. The message is ambiguous - just ResourceNotReady: \u003clb-name\u003e. This isn\u0027t useful for the user.\n\nI think the best way to do it is to create a new subclass of ResourceNotReady exception class [3] - we can call it LoadBalancerNotReady. This exception should make sure to build the message differently - i.e. instead of just\n\n super(ResourceNotReady, self).__init__(\"Resource not ready: %r\" % msg)\n\nsomething like:\n\n super().__init__(\"Octavia is misbehaving, loadbalancer %s is stuck in %s state for %d seconds. Please contact your OpenStack administrator.\" % (lb_name, lb_state, seconds))\n\nDoes it make sense?\n\n[1] https://github.com/openstack/kuryr-kubernetes/blob/de6a06c6f7854ca9b0cd698f472964efdc8141b8/kuryr_kubernetes/handlers/retry.py#L58-L99\n[2] https://github.com/openstack/kuryr-kubernetes/blob/de6a06c6f7854ca9b0cd698f472964efdc8141b8/kuryr_kubernetes/handlers/retry.py#L90-L95\n[3] https://github.com/openstack/kuryr-kubernetes/blob/d0331abc38b4713b710014d633333dfc95aafc58/kuryr_kubernetes/exceptions.py#L27-L38","commit_id":"33d76bd0a00b9699c792d92263f29a3fedfe680c"}]}
