)]}'
{"kuryr_kubernetes/controller/handlers/lbaas.py":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cbc03cc716f322263bdfed56197eac247b60cf0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return service[\u0027spec\u0027].get(\u0027clusterIP\u0027)"},{"line_number":88,"context_line":"        return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _should_ignore(self, service):"},{"line_number":91,"context_line":"        if not self._has_clusterip(service):"},{"line_number":92,"context_line":"            return \u0027Skipping headless Service %s.\u0027"},{"line_number":93,"context_line":"        elif not self._is_supported_type(service):"},{"line_number":94,"context_line":"            return \u0027Skipping service %s of unsupported type.\u0027"},{"line_number":95,"context_line":"        elif self._has_spec_annotation(service):"},{"line_number":96,"context_line":"            return (\u0027Skipping annotated service %s, waiting for it to be \u0027"},{"line_number":97,"context_line":"                    \u0027converted to KuryrLoadBalancer object and annotation \u0027"},{"line_number":98,"context_line":"                    \u0027removed.\u0027)"},{"line_number":99,"context_line":"        elif utils.is_kubernetes_default_resource(service):"},{"line_number":100,"context_line":"            # Avoid to handle default Kubernetes service as requires https."},{"line_number":101,"context_line":"            return \u0027Skipping default service %s.\u0027"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _patch_service_finalizer(self, service):"},{"line_number":106,"context_line":"        k8s \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_cadb77ea","line":103,"range":{"start_line":90,"start_character":0,"end_line":103,"end_character":23},"updated":"2020-11-10 10:23:46.000000000","message":"Just a nit: you don\u0027t need to use elif, since after condition is true, return statement will kick in.","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"dd12d34d23bf8f1578a68dc48dcd3536f8546cd9","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return service[\u0027spec\u0027].get(\u0027clusterIP\u0027)"},{"line_number":88,"context_line":"        return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _should_ignore(self, service):"},{"line_number":91,"context_line":"        if not self._has_clusterip(service):"},{"line_number":92,"context_line":"            return \u0027Skipping headless Service %s.\u0027"},{"line_number":93,"context_line":"        elif not self._is_supported_type(service):"},{"line_number":94,"context_line":"            return \u0027Skipping service %s of unsupported type.\u0027"},{"line_number":95,"context_line":"        elif self._has_spec_annotation(service):"},{"line_number":96,"context_line":"            return (\u0027Skipping annotated service %s, waiting for it to be \u0027"},{"line_number":97,"context_line":"                    \u0027converted to KuryrLoadBalancer object and annotation \u0027"},{"line_number":98,"context_line":"                    \u0027removed.\u0027)"},{"line_number":99,"context_line":"        elif utils.is_kubernetes_default_resource(service):"},{"line_number":100,"context_line":"            # Avoid to handle default Kubernetes service as requires https."},{"line_number":101,"context_line":"            return \u0027Skipping default service %s.\u0027"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _patch_service_finalizer(self, service):"},{"line_number":106,"context_line":"        k8s \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_800132b2","line":103,"range":{"start_line":90,"start_character":0,"end_line":103,"end_character":23},"in_reply_to":"1f621f24_3f71790d","updated":"2020-11-13 08:52:36.000000000","message":"I don\u0027t have strong preferences, although it might be cleaner to have it as if \u003ccond\u003e: return msg","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return service[\u0027spec\u0027].get(\u0027clusterIP\u0027)"},{"line_number":88,"context_line":"        return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _should_ignore(self, service):"},{"line_number":91,"context_line":"        if not self._has_clusterip(service):"},{"line_number":92,"context_line":"            return \u0027Skipping headless Service %s.\u0027"},{"line_number":93,"context_line":"        elif not self._is_supported_type(service):"},{"line_number":94,"context_line":"            return \u0027Skipping service %s of unsupported type.\u0027"},{"line_number":95,"context_line":"        elif self._has_spec_annotation(service):"},{"line_number":96,"context_line":"            return (\u0027Skipping annotated service %s, waiting for it to be \u0027"},{"line_number":97,"context_line":"                    \u0027converted to KuryrLoadBalancer object and annotation \u0027"},{"line_number":98,"context_line":"                    \u0027removed.\u0027)"},{"line_number":99,"context_line":"        elif utils.is_kubernetes_default_resource(service):"},{"line_number":100,"context_line":"            # Avoid to handle default Kubernetes service as requires https."},{"line_number":101,"context_line":"            return \u0027Skipping default service %s.\u0027"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _patch_service_finalizer(self, service):"},{"line_number":106,"context_line":"        k8s \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_3f71790d","line":103,"range":{"start_line":90,"start_character":0,"end_line":103,"end_character":23},"in_reply_to":"1f621f24_5b329711","updated":"2020-11-11 12:10:35.000000000","message":"I tend to agree with Roman, perhaps we can leave all as \"ifs XX\" and then have a \"return None\" at the end","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5356f59f748343a85b2469a9ce1e7a7da687fe49","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return service[\u0027spec\u0027].get(\u0027clusterIP\u0027)"},{"line_number":88,"context_line":"        return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _should_ignore(self, service):"},{"line_number":91,"context_line":"        if not self._has_clusterip(service):"},{"line_number":92,"context_line":"            return \u0027Skipping headless Service %s.\u0027"},{"line_number":93,"context_line":"        elif not self._is_supported_type(service):"},{"line_number":94,"context_line":"            return \u0027Skipping service %s of unsupported type.\u0027"},{"line_number":95,"context_line":"        elif self._has_spec_annotation(service):"},{"line_number":96,"context_line":"            return (\u0027Skipping annotated service %s, waiting for it to be \u0027"},{"line_number":97,"context_line":"                    \u0027converted to KuryrLoadBalancer object and annotation \u0027"},{"line_number":98,"context_line":"                    \u0027removed.\u0027)"},{"line_number":99,"context_line":"        elif utils.is_kubernetes_default_resource(service):"},{"line_number":100,"context_line":"            # Avoid to handle default Kubernetes service as requires https."},{"line_number":101,"context_line":"            return \u0027Skipping default service %s.\u0027"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _patch_service_finalizer(self, service):"},{"line_number":106,"context_line":"        k8s \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_5b329711","line":103,"range":{"start_line":90,"start_character":0,"end_line":103,"end_character":23},"in_reply_to":"1f621f24_cadb77ea","updated":"2020-11-10 13:07:46.000000000","message":"The idea was that all the elif conditions are checked and if false return line 103, which is the same of moving all conditions to if and remove the else clause. Do you have any preferences?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3b3ade49181adca35d5766cfd219daec9a5f27bf","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    config.CONF.kubernetes.endpoints_driver_octavia_provider)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def on_present(self, endpoints):"},{"line_number":262,"context_line":"        ep_name \u003d endpoints[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":263,"context_line":"        ep_namespace \u003d endpoints[\u0027metadata\u0027][\u0027namespace\u0027]"},{"line_number":264,"context_line":"        if self._move_annotations_to_crd(endpoints):"},{"line_number":265,"context_line":"            return"},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1f621f24_77be56ff","line":263,"range":{"start_line":262,"start_character":0,"end_line":263,"end_character":57},"updated":"2020-11-13 16:02:28.000000000","message":"This seems irrelevant now, but no issue with that.","commit_id":"d11e3a05fc56711d8c99ed503a354cff56692fb6"}],"kuryr_kubernetes/controller/handlers/loadbalancer.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ff85cc9f77c696ea33af56c7bd67e21d0896eeb","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                    target_ref \u003d endpoint.get(\u0027targetRef\u0027)"},{"line_number":258,"context_line":"                    if not target_ref:"},{"line_number":259,"context_line":"                        target_ref \u003d utils.get_pod_by_ip(target_ip)"},{"line_number":260,"context_line":"                    if (ipaddress.ip_address(target_ip)"},{"line_number":261,"context_line":"                            in ipaddress.ip_network(self._svc_subnet)):"},{"line_number":262,"context_line":"                        LOG.debug(\"Skipping member creation for Endpoints \""},{"line_number":263,"context_line":"                                  \"as Services.\")"},{"line_number":264,"context_line":"                        continue"},{"line_number":265,"context_line":"                except KeyError:"},{"line_number":266,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_05e122d1","line":263,"range":{"start_line":260,"start_character":0,"end_line":263,"end_character":49},"updated":"2020-11-04 12:11:20.000000000","message":"Wait, what happens if the IP is not a pod? I think one of the use cases was to use Services to direct traffic to addresses outside of the cluster? IMO it should be supported, what are the issues with that?","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7691b48d44c6d60c51b7ac325e3355e306f20648","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                    target_ref \u003d endpoint.get(\u0027targetRef\u0027)"},{"line_number":258,"context_line":"                    if not target_ref:"},{"line_number":259,"context_line":"                        target_ref \u003d utils.get_pod_by_ip(target_ip)"},{"line_number":260,"context_line":"                    if (ipaddress.ip_address(target_ip)"},{"line_number":261,"context_line":"                            in ipaddress.ip_network(self._svc_subnet)):"},{"line_number":262,"context_line":"                        LOG.debug(\"Skipping member creation for Endpoints \""},{"line_number":263,"context_line":"                                  \"as Services.\")"},{"line_number":264,"context_line":"                        continue"},{"line_number":265,"context_line":"                except KeyError:"},{"line_number":266,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_25637e44","line":263,"range":{"start_line":260,"start_character":0,"end_line":263,"end_character":49},"in_reply_to":"1f621f24_05e122d1","updated":"2020-11-04 12:25:16.000000000","message":"I tried it out using Endpoints pointing to Services with OpenshiftSDN and connectivity didn\u0027t work. According to some Kubernetes issues, this seems to not be supported:\n\nhttps://github.com/kubernetes/kubernetes/issues/40870\nhttps://github.com/kubernetes/kubernetes/issues/64668","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"607ee58c03949169b0835287fcd3f98ffa851b17","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":352,"context_line":"                    target_pod, target_ip)"},{"line_number":353,"context_line":"            elif self._nodes_subnet and (ipaddress.ip_address(target_ip)"},{"line_number":354,"context_line":"                    in ipaddress.ip_network(self._nodes_subnet)):"},{"line_number":355,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":356,"context_line":"        else:"},{"line_number":357,"context_line":"            # We use the service subnet id so that the connectivity"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f621f24_9269d2fa","line":354,"updated":"2020-11-06 18:45:49.000000000","message":"pep8: E128 continuation line under-indented for visual indent","commit_id":"e3bb16b9d52cc5d0509df6d48dd33ae7b78a54c2"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        ep_slices \u003d loadbalancer_crd[\u0027spec\u0027].get(\u0027endpointSlices\u0027, [])"},{"line_number":118,"context_line":"        if not ep_slices:"},{"line_number":119,"context_line":"            return False"},{"line_number":120,"context_line":"        return True"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def on_finalize(self, loadbalancer_crd):"},{"line_number":123,"context_line":"        LOG.debug(\"Deleting the loadbalancer CRD\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_7ff65165","line":120,"range":{"start_line":120,"start_character":0,"end_line":120,"end_character":19},"updated":"2020-11-11 12:10:35.000000000","message":"why this simplification? is because ep_slices should already be poputated (if there are endpoints)?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5cad6190d96f91d30ae14cb267437ae76e547564","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        ep_slices \u003d loadbalancer_crd[\u0027spec\u0027].get(\u0027endpointSlices\u0027, [])"},{"line_number":118,"context_line":"        if not ep_slices:"},{"line_number":119,"context_line":"            return False"},{"line_number":120,"context_line":"        return True"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def on_finalize(self, loadbalancer_crd):"},{"line_number":123,"context_line":"        LOG.debug(\"Deleting the loadbalancer CRD\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_6e8a216a","line":120,"range":{"start_line":120,"start_character":0,"end_line":120,"end_character":19},"in_reply_to":"1f621f24_7ff65165","updated":"2020-11-11 16:53:06.000000000","message":"Yes. It should only handle the Load Balancer in case any Endpoints is present, which is the same as it was before, but without using the targetRef.\n\nHowever, now I wonder... if all the Endpoints are removed the k8s Endpoints object is not actually removed and the loadbalancer member is not cleaned up, it will only be if any new endpoint is created. It seems we have a bug...","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    target_namespace \u003d None"},{"line_number":260,"context_line":"                    if target_ref:"},{"line_number":261,"context_line":"                        target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":262,"context_line":"                    # Avoid to point to a Pod on hostNetwork"},{"line_number":263,"context_line":"                    # that isn\u0027t the one to be enforced."},{"line_number":264,"context_line":"                    if not target_ref and utils.is_ip_on_subnet("},{"line_number":265,"context_line":"                            self._nodes_subnet, target_ip):"},{"line_number":266,"context_line":"                        target_pod \u003d {}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_1f8abdbd","line":263,"range":{"start_line":262,"start_character":0,"end_line":263,"end_character":56},"updated":"2020-11-11 12:10:35.000000000","message":"I don\u0027t understand this comment","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5cad6190d96f91d30ae14cb267437ae76e547564","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    target_namespace \u003d None"},{"line_number":260,"context_line":"                    if target_ref:"},{"line_number":261,"context_line":"                        target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":262,"context_line":"                    # Avoid to point to a Pod on hostNetwork"},{"line_number":263,"context_line":"                    # that isn\u0027t the one to be enforced."},{"line_number":264,"context_line":"                    if not target_ref and utils.is_ip_on_subnet("},{"line_number":265,"context_line":"                            self._nodes_subnet, target_ip):"},{"line_number":266,"context_line":"                        target_pod \u003d {}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_ae5c39ed","line":263,"range":{"start_line":262,"start_character":0,"end_line":263,"end_character":56},"in_reply_to":"1f621f24_1f8abdbd","updated":"2020-11-11 16:53:06.000000000","message":"Problem is that without this check we could end up retrieving any Pod that has the IP on HostNetwork and use its name for the member. However, this could turn out to be wrong.\nSo, we avoid to retrieve the pod when the IP is on services subnet and no targetRef is specified as multiple pods could be matched.\n\nNote that for services without selectors we are defining the member names as lb_crd_namespace+lb_crd_name.","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"0e382cac2efe9231726da8f0ae84fa48b2c1dea4","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    target_namespace \u003d None"},{"line_number":260,"context_line":"                    if target_ref:"},{"line_number":261,"context_line":"                        target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":262,"context_line":"                    # Avoid to point to a Pod on hostNetwork"},{"line_number":263,"context_line":"                    # that isn\u0027t the one to be enforced."},{"line_number":264,"context_line":"                    if not target_ref and utils.is_ip_on_subnet("},{"line_number":265,"context_line":"                            self._nodes_subnet, target_ip):"},{"line_number":266,"context_line":"                        target_pod \u003d {}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_6ed33705","line":263,"range":{"start_line":262,"start_character":0,"end_line":263,"end_character":56},"in_reply_to":"1f621f24_abb7013a","updated":"2020-11-12 21:59:05.000000000","message":"Yes. Thanks for the hint.","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"37b5e4d08309829f4b8284e4f30b0e9cc608e6bf","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    target_namespace \u003d None"},{"line_number":260,"context_line":"                    if target_ref:"},{"line_number":261,"context_line":"                        target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":262,"context_line":"                    # Avoid to point to a Pod on hostNetwork"},{"line_number":263,"context_line":"                    # that isn\u0027t the one to be enforced."},{"line_number":264,"context_line":"                    if not target_ref and utils.is_ip_on_subnet("},{"line_number":265,"context_line":"                            self._nodes_subnet, target_ip):"},{"line_number":266,"context_line":"                        target_pod \u003d {}"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_abb7013a","line":263,"range":{"start_line":262,"start_character":0,"end_line":263,"end_character":56},"in_reply_to":"1f621f24_ae5c39ed","updated":"2020-11-12 08:41:19.000000000","message":"right, so it is about adding it as member rather than enforcing (which I associate to NPs). So sentence is something like: \"Avoid to point to a Pod on hostNetwork that isn\u0027t the one to be *added as member*\"","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":346,"context_line":"            target_name \u003d target_ref[\u0027name\u0027]"},{"line_number":347,"context_line":"        else:"},{"line_number":348,"context_line":"            target_namespace \u003d loadbalancer_crd[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":349,"context_line":"            target_name \u003d loadbalancer_crd[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":350,"context_line":"        return target_name, target_namespace"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_3f54d920","line":348,"range":{"start_line":348,"start_character":60,"end_line":348,"end_character":66},"updated":"2020-11-11 12:10:35.000000000","message":"namespace?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cbc03cc716f322263bdfed56197eac247b60cf0","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        # L3 mode once old neutron-lbaasv2 is not supported, as"},{"line_number":355,"context_line":"        # octavia does not require it"},{"line_number":356,"context_line":"        subnet_id \u003d None"},{"line_number":357,"context_line":"        if (config.CONF.octavia_defaults.member_mode \u003d\u003d"},{"line_number":358,"context_line":"                k_const.OCTAVIA_L2_MEMBER_MODE):"},{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_6aba236e","line":357,"range":{"start_line":357,"start_character":12,"end_line":357,"end_character":23},"updated":"2020-11-10 10:23:46.000000000","message":"Just CONF.","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if (config.CONF.octavia_defaults.member_mode \u003d\u003d"},{"line_number":358,"context_line":"                k_const.OCTAVIA_L2_MEMBER_MODE):"},{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":361,"context_line":"                    target_pod, target_ip)"},{"line_number":362,"context_line":"            elif utils.is_ip_on_subnet(self._nodes_subnet, target_ip):"},{"line_number":363,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":364,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_1f611d06","line":361,"range":{"start_line":360,"start_character":0,"end_line":361,"end_character":42},"updated":"2020-11-11 12:10:35.000000000","message":"is the try/except not needed anymore?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5cad6190d96f91d30ae14cb267437ae76e547564","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if (config.CONF.octavia_defaults.member_mode \u003d\u003d"},{"line_number":358,"context_line":"                k_const.OCTAVIA_L2_MEMBER_MODE):"},{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":361,"context_line":"                    target_pod, target_ip)"},{"line_number":362,"context_line":"            elif utils.is_ip_on_subnet(self._nodes_subnet, target_ip):"},{"line_number":363,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":364,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_2e994978","line":361,"range":{"start_line":360,"start_character":0,"end_line":361,"end_character":42},"in_reply_to":"1f621f24_1f611d06","updated":"2020-11-11 16:53:06.000000000","message":"As we\u0027re retrieving The Pod before creating the Member, I believe there is no need for handling that exception anymore.\nAlso, when ResourceNotFound is raised it\u0027s being retried here https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/drivers/namespace_subnet.py#L61-L63 .","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"0e382cac2efe9231726da8f0ae84fa48b2c1dea4","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if (config.CONF.octavia_defaults.member_mode \u003d\u003d"},{"line_number":358,"context_line":"                k_const.OCTAVIA_L2_MEMBER_MODE):"},{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":361,"context_line":"                    target_pod, target_ip)"},{"line_number":362,"context_line":"            elif utils.is_ip_on_subnet(self._nodes_subnet, target_ip):"},{"line_number":363,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":364,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_ad49ccb7","line":361,"range":{"start_line":360,"start_character":0,"end_line":361,"end_character":42},"in_reply_to":"1f621f24_2b7db16d","updated":"2020-11-12 21:59:05.000000000","message":"I believe before we were still retrying, as the ResourceNotFound exception is handled on the driver level it wouldn\u0027t be hit on the handler.\n\nI noticed that handling on the driver[1] was added after the handling on the Handler[2] side, so it should be safe.\n\n[1] https://github.com/openshift/kuryr-kubernetes/commit/780c4dfa0934751afb2ea5770f10aacb2b6ee687#diff-9a22c98318c068fc31f55c8f20e5b4396d46438476062e567bf2086f9bb1eb94R60\n[2]https://github.com/openstack/kuryr-kubernetes/commit/36c98a9377553f97be8b4a407e2dd4c48aad175f","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"37b5e4d08309829f4b8284e4f30b0e9cc608e6bf","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if (config.CONF.octavia_defaults.member_mode \u003d\u003d"},{"line_number":358,"context_line":"                k_const.OCTAVIA_L2_MEMBER_MODE):"},{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":361,"context_line":"                    target_pod, target_ip)"},{"line_number":362,"context_line":"            elif utils.is_ip_on_subnet(self._nodes_subnet, target_ip):"},{"line_number":363,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":364,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_2b7db16d","line":361,"range":{"start_line":360,"start_character":0,"end_line":361,"end_character":42},"in_reply_to":"1f621f24_2e994978","updated":"2020-11-12 08:41:19.000000000","message":"but before we where ignoring that and continue doing the work, and now we will stop the processing, right?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3b3ade49181adca35d5766cfd219daec9a5f27bf","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    target_namespace \u003d None"},{"line_number":260,"context_line":"                    if target_ref:"},{"line_number":261,"context_line":"                        target_namespace \u003d target_ref[\u0027namespace\u0027]"},{"line_number":262,"context_line":"                    # Avoid to point to a Pod on hostNetwork"},{"line_number":263,"context_line":"                    # that isn\u0027t the one to be added as Member."},{"line_number":264,"context_line":"                    if not target_ref and utils.is_ip_on_subnet("},{"line_number":265,"context_line":"                            self._nodes_subnet, target_ip):"},{"line_number":266,"context_line":"                        target_pod \u003d {}"},{"line_number":267,"context_line":"                    else:"},{"line_number":268,"context_line":"                        target_pod \u003d utils.get_pod_by_ip("},{"line_number":269,"context_line":"                            target_ip, target_namespace)"},{"line_number":270,"context_line":"                except KeyError:"},{"line_number":271,"context_line":"                    continue"},{"line_number":272,"context_line":"                if not pool_by_tgt_name:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f621f24_3724de5d","line":269,"range":{"start_line":262,"start_character":0,"end_line":269,"end_character":56},"updated":"2020-11-13 16:02:28.000000000","message":"Hm, this will work for nested, but not for non-nested… Can we just fetch a pod and not put it in target_pod if it\u0027s hostNetworking?","commit_id":"d11e3a05fc56711d8c99ed503a354cff56692fb6"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3b3ade49181adca35d5766cfd219daec9a5f27bf","unresolved":false,"context_lines":[{"line_number":359,"context_line":"            if target_pod:"},{"line_number":360,"context_line":"                subnet_id \u003d self._get_pod_subnet("},{"line_number":361,"context_line":"                    target_pod, target_ip)"},{"line_number":362,"context_line":"            elif utils.is_ip_on_subnet(self._nodes_subnet, target_ip):"},{"line_number":363,"context_line":"                subnet_id \u003d CONF.pod_vif_nested.worker_nodes_subnet"},{"line_number":364,"context_line":"        else:"},{"line_number":365,"context_line":"            # We use the service subnet id so that the connectivity"},{"line_number":366,"context_line":"            # from VIP to pods happens in layer 3 mode, i.e.,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f621f24_17e4420c","line":363,"range":{"start_line":362,"start_character":0,"end_line":363,"end_character":67},"updated":"2020-11-13 16:02:28.000000000","message":"Hm, again I wonder how that works with non-nested case here.","commit_id":"d11e3a05fc56711d8c99ed503a354cff56692fb6"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"e3aeeb0491866f6cb5a58360fe9954f34de94bea","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self._drv_service_pub_ip \u003d drv_base.ServicePubIpDriver.get_instance()"},{"line_number":51,"context_line":"        self._drv_svc_project \u003d drv_base.ServiceProjectDriver.get_instance()"},{"line_number":52,"context_line":"        self._drv_sg \u003d drv_base.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":53,"context_line":"        self._nodes_subnet \u003d utils.get_subnet_cidr("},{"line_number":54,"context_line":"            CONF.pod_vif_nested.worker_nodes_subnet)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def on_present(self, loadbalancer_crd):"},{"line_number":57,"context_line":"        if self._should_ignore(loadbalancer_crd):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fffc6b78_672690ba","line":54,"range":{"start_line":53,"start_character":0,"end_line":54,"end_character":52},"updated":"2020-11-19 07:56:55.000000000","message":"to try to adapt for different node subnets, should this already rely on a list of subnets instead? (or leave a not to not forget about it)","commit_id":"7bc6d081ccd135ea55f91917722917927a88d40f"}],"kuryr_kubernetes/utils.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ff85cc9f77c696ea33af56c7bd67e21d0896eeb","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        raise"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"def is_kubernetes_default_resource(name, namespace):"},{"line_number":447,"context_line":"    return name \u003d\u003d \u0027kubernetes\u0027 and namespace \u003d\u003d \u0027default\u0027"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"def get_pod_by_ip(pod_ip):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_452cba46","line":447,"range":{"start_line":446,"start_character":0,"end_line":447,"end_character":58},"updated":"2020-11-04 12:11:20.000000000","message":"You could just make this accept the object itself, it\u0027d be easier to add more here in the future if needed.","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7cd9e5f0b43e9af2271779c96a03eaeba88a54b3","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        raise"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"def is_kubernetes_default_resource(name, namespace):"},{"line_number":447,"context_line":"    return name \u003d\u003d \u0027kubernetes\u0027 and namespace \u003d\u003d \u0027default\u0027"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"def get_pod_by_ip(pod_ip):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_f9fe4b35","line":447,"range":{"start_line":446,"start_character":0,"end_line":447,"end_character":58},"in_reply_to":"1f621f24_452cba46","updated":"2020-11-04 16:36:57.000000000","message":"Done","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ff85cc9f77c696ea33af56c7bd67e21d0896eeb","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        LOG.exception(\u0027Error retrieving Pod with IP %s\u0027, pod_ip)"},{"line_number":458,"context_line":"        raise"},{"line_number":459,"context_line":"    if pods.get(\u0027items\u0027):"},{"line_number":460,"context_line":"        # Only one Pod should have the IP"},{"line_number":461,"context_line":"        return pods[\u0027items\u0027][0]"},{"line_number":462,"context_line":"    return pod"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_0593e250","line":460,"range":{"start_line":460,"start_character":0,"end_line":460,"end_character":41},"updated":"2020-11-04 12:11:20.000000000","message":"That is a wrong assumption, several pods can have the same IP set, given that all of them but one have already finished.","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7cd9e5f0b43e9af2271779c96a03eaeba88a54b3","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        LOG.exception(\u0027Error retrieving Pod with IP %s\u0027, pod_ip)"},{"line_number":458,"context_line":"        raise"},{"line_number":459,"context_line":"    if pods.get(\u0027items\u0027):"},{"line_number":460,"context_line":"        # Only one Pod should have the IP"},{"line_number":461,"context_line":"        return pods[\u0027items\u0027][0]"},{"line_number":462,"context_line":"    return pod"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_399603f2","line":460,"range":{"start_line":460,"start_character":0,"end_line":460,"end_character":41},"in_reply_to":"1f621f24_0593e250","updated":"2020-11-04 16:36:57.000000000","message":"Done","commit_id":"88e389781448582d98cd70ddf40aece760afe9c8"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"97febab69abfed3927e9cbc0bc0ffce9d0085422","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        raise"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"def is_kubernetes_default_resource(obj):"},{"line_number":448,"context_line":"    return (obj[\u0027metadata\u0027][\u0027name\u0027] \u003d\u003d \u0027kubernetes\u0027 and"},{"line_number":449,"context_line":"            obj[\u0027metadata\u0027][\u0027namespace\u0027] \u003d\u003d \u0027default\u0027)"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"def get_pod_by_ip(pod_ip, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_bf5e2973","line":449,"range":{"start_line":447,"start_character":0,"end_line":449,"end_character":54},"updated":"2020-11-11 12:10:35.000000000","message":"perhaps worth to add a note/docstring about this","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cbc03cc716f322263bdfed56197eac247b60cf0","unresolved":false,"context_lines":[{"line_number":485,"context_line":"def is_ip_on_subnet(nodes_subnet, target_ip):"},{"line_number":486,"context_line":"    return (nodes_subnet and"},{"line_number":487,"context_line":"            (ipaddress.ip_address(target_ip) in"},{"line_number":488,"context_line":"                ipaddress.ip_network(nodes_subnet)))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f621f24_4a4da798","line":488,"updated":"2020-11-10 10:23:46.000000000","message":"Do we need unit tests for those new functions?","commit_id":"c45fabbb2b2adaa8e4807f02f994cbf7c543e816"}]}
