)]}'
{"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":"4a7ec28baa83f6566e31e8f389572cb50e787e94","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        if new_sgs:"},{"line_number":175,"context_line":"            sgs \u003d new_sgs"},{"line_number":176,"context_line":"        elif not (new_sgs or loadbalancer[\u0027security_groups\u0027]):"},{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_38feb705","line":179,"range":{"start_line":176,"start_character":0,"end_line":179,"end_character":36},"updated":"2020-10-09 17:32:40.000000000","message":"Which value did you get before for new_sgs? the deleted deny-all sg?","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"24abbec0998e1a0649449d1d8ce9a7cbb7290fde","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        if new_sgs:"},{"line_number":175,"context_line":"            sgs \u003d new_sgs"},{"line_number":176,"context_line":"        elif not (new_sgs or loadbalancer[\u0027security_groups\u0027]):"},{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_fb61c2a9","line":179,"range":{"start_line":176,"start_character":0,"end_line":179,"end_character":36},"in_reply_to":"9f560f44_38feb705","updated":"2020-10-12 12:04:19.000000000","message":"new_sgs before this change would get the one element list with SG which was removed. And since we don\u0027t have it on the config.CONF.neutron_defaults.pod_security_groups, add_default_rules is never set to True, so that we passing all_pod_rules empty list in line 218.\n\nThat results in lb with listener in offline state, blocking all the traffic.","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"4a7ec28baa83f6566e31e8f389572cb50e787e94","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_9bfc1d0d","line":180,"range":{"start_line":180,"start_character":12,"end_line":180,"end_character":20},"updated":"2020-10-09 17:32:40.000000000","message":"I guess this could be moved out of the condition.","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4db8b11e71767ee958f72312a5fac02466b03658","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f6b1bfe_a9ab251b","line":180,"range":{"start_line":180,"start_character":12,"end_line":180,"end_character":20},"in_reply_to":"7f6b1bfe_4dbf0ffb","updated":"2020-10-15 09:30:04.000000000","message":"Oh, ok :) I\u0027ll do that.","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"24abbec0998e1a0649449d1d8ce9a7cbb7290fde","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_db8cbe81","line":180,"range":{"start_line":180,"start_character":12,"end_line":180,"end_character":20},"in_reply_to":"9f560f44_9bfc1d0d","updated":"2020-10-12 12:04:19.000000000","message":"Actually, it has to be there in case, new_sgs is None and there is no SG on LB, it will blow up on line 185.","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"9e702e7df6da253b7a4eb6f60e951ceb8d719b82","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":178,"context_line":"            # has the SG removed, just add default ones."},{"line_number":179,"context_line":"            add_default_rules \u003d True"},{"line_number":180,"context_line":"            sgs \u003d []"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f6b1bfe_4dbf0ffb","line":180,"range":{"start_line":180,"start_character":12,"end_line":180,"end_character":20},"in_reply_to":"9f560f44_db8cbe81","updated":"2020-10-14 11:35:30.000000000","message":"I thought about moving it out to line 173 as the supposed default value for the sgs should be an empty list, it can make things more clear.\n\nBut no strong opinion.","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"432877272b30f5c6b34967cf89a38ff680d22682","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":173,"context_line":"        sgs \u003d []"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if new_sgs:"},{"line_number":176,"context_line":"            sgs \u003d new_sgs"},{"line_number":177,"context_line":"        elif not (new_sgs or loadbalancer[\u0027security_groups\u0027]):"},{"line_number":178,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":179,"context_line":"            # has the SG removed, just add default ones."},{"line_number":180,"context_line":"            add_default_rules \u003d True"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        # Check if Network Policy allows listener on the pods"},{"line_number":185,"context_line":"        for sg in sgs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f65232a_1a355df8","line":182,"range":{"start_line":175,"start_character":0,"end_line":182,"end_character":49},"updated":"2020-10-21 07:27:34.000000000","message":"perhaps it can be made simple by doing:\nif new_sgs:\n   sgs \u003d new_sgs\nelse:\n   sgs \u003d loadbalancer[\u0027security_groups\u0027]\n\nif not sgs:\n  # NOTE(gryf): ....\n  add_default_rules \u003d True","commit_id":"351276fcd0d85991c5740def0305c90bd5147c89"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"aa7c71e03b504abdfc9fc6e79999300a22d76f13","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":173,"context_line":"        sgs \u003d []"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if new_sgs:"},{"line_number":176,"context_line":"            sgs \u003d new_sgs"},{"line_number":177,"context_line":"        elif not (new_sgs or loadbalancer[\u0027security_groups\u0027]):"},{"line_number":178,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":179,"context_line":"            # has the SG removed, just add default ones."},{"line_number":180,"context_line":"            add_default_rules \u003d True"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        # Check if Network Policy allows listener on the pods"},{"line_number":185,"context_line":"        for sg in sgs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f65232a_f4d67f4f","line":182,"range":{"start_line":175,"start_character":0,"end_line":182,"end_character":49},"in_reply_to":"3f65232a_1a355df8","updated":"2020-10-25 18:16:05.000000000","message":"or even:\n\n  if new_sgs:\n      sgs \u003d new_sgs\n  elif loadbalancer[\u0027security_groups\u0027]:\n      sgs \u003d loadbalancer[\u0027security_groups\u0027]\n  else:\n      # TODO…\n      add_default_rules \u003d True\n\nso it would be clear, that in case of no new_sgs nor loadbalancer[\u0027security_groups\u0027] we should restore default rules.","commit_id":"351276fcd0d85991c5740def0305c90bd5147c89"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"f407817415de84b9370ab36b6b3e0a64cdf3a445","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        os_net \u003d clients.get_network_client()"},{"line_number":173,"context_line":"        sgs \u003d []"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if new_sgs:"},{"line_number":176,"context_line":"            sgs \u003d new_sgs"},{"line_number":177,"context_line":"        elif not (new_sgs or loadbalancer[\u0027security_groups\u0027]):"},{"line_number":178,"context_line":"            # NOTE(gryf): in case there is no new SG rules and loadbalancer"},{"line_number":179,"context_line":"            # has the SG removed, just add default ones."},{"line_number":180,"context_line":"            add_default_rules \u003d True"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            sgs \u003d loadbalancer[\u0027security_groups\u0027]"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        # Check if Network Policy allows listener on the pods"},{"line_number":185,"context_line":"        for sg in sgs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f65232a_aa74a236","line":182,"range":{"start_line":175,"start_character":0,"end_line":182,"end_character":49},"in_reply_to":"3f65232a_f4d67f4f","updated":"2020-10-26 07:51:26.000000000","message":"yep","commit_id":"351276fcd0d85991c5740def0305c90bd5147c89"}],"kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"4a7ec28baa83f6566e31e8f389572cb50e787e94","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"                    # Remove our crd_sg out of service groups since we don\u0027t"},{"line_number":315,"context_line":"                    # have it anymore"},{"line_number":316,"context_line":"                    try:"},{"line_number":317,"context_line":"                        del sgs[sgs.index(crd_sg)]"},{"line_number":318,"context_line":"                    except (TypeError, ValueError):"},{"line_number":319,"context_line":"                        pass"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"                    try:"},{"line_number":322,"context_line":"                        self._drv_lbaas.update_lbaas_sg(svc, sgs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_1b100d4f","line":319,"range":{"start_line":316,"start_character":0,"end_line":319,"end_character":28},"updated":"2020-10-09 17:32:40.000000000","message":"Perhaps something in the lines of the following might be better:\n\nif crd_sg in sgs:\n    sgs.remove(crd_sg)","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"24abbec0998e1a0649449d1d8ce9a7cbb7290fde","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"                    # Remove our crd_sg out of service groups since we don\u0027t"},{"line_number":315,"context_line":"                    # have it anymore"},{"line_number":316,"context_line":"                    try:"},{"line_number":317,"context_line":"                        del sgs[sgs.index(crd_sg)]"},{"line_number":318,"context_line":"                    except (TypeError, ValueError):"},{"line_number":319,"context_line":"                        pass"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"                    try:"},{"line_number":322,"context_line":"                        self._drv_lbaas.update_lbaas_sg(svc, sgs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_bbbf4ac8","line":319,"range":{"start_line":316,"start_character":0,"end_line":319,"end_character":28},"in_reply_to":"9f560f44_1b100d4f","updated":"2020-10-12 12:04:19.000000000","message":"Ack. I overdid it ;)","commit_id":"5eebe9e96b10b043f2e9037ee9a9fc689881ed3f"}]}
