)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"6d08f4c1570c0e3fe14f213999438165d29c1729","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check ingress and egress IPBlock rules for NP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create 4 pods"},{"line_number":10,"context_line":"Check the connectivity works before applying NP rules"},{"line_number":11,"context_line":"Apply NP by allowing all and blocking pod1 ingress and pod2 egress"},{"line_number":12,"context_line":"Check that connectivity from pod1 to pod4 is blocked"},{"line_number":13,"context_line":"Check that connectivity from pod4 to pod2 is blocked"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1fa4df85_0dc29e34","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":53},"updated":"2020-02-25 10:31:05.000000000","message":"maybe change the connectivity to http connection","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"c177d09f5177d96610fdf9b5c53abec4365f6ad7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check ingress and egress IPBlock rules for NP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create 4 pods"},{"line_number":10,"context_line":"Check the connectivity works before applying NP rules"},{"line_number":11,"context_line":"Apply NP by allowing all and blocking pod1 ingress and pod2 egress"},{"line_number":12,"context_line":"Check that connectivity from pod1 to pod4 is blocked"},{"line_number":13,"context_line":"Check that connectivity from pod4 to pod2 is blocked"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1fa4df85_88b67cd9","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":53},"in_reply_to":"1fa4df85_0dc29e34","updated":"2020-02-25 11:02:57.000000000","message":"Done","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"6d08f4c1570c0e3fe14f213999438165d29c1729","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Create 4 pods"},{"line_number":10,"context_line":"Check the connectivity works before applying NP rules"},{"line_number":11,"context_line":"Apply NP by allowing all and blocking pod1 ingress and pod2 egress"},{"line_number":12,"context_line":"Check that connectivity from pod1 to pod4 is blocked"},{"line_number":13,"context_line":"Check that connectivity from pod4 to pod2 is blocked"},{"line_number":14,"context_line":"Check that connectivity from pod4 to pod3 is still working"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ida893c0ca6a340b342d903974ec64b8a8c98565b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1fa4df85_cde1e6d2","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":58},"updated":"2020-02-25 10:31:05.000000000","message":"same here","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"c177d09f5177d96610fdf9b5c53abec4365f6ad7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Create 4 pods"},{"line_number":10,"context_line":"Check the connectivity works before applying NP rules"},{"line_number":11,"context_line":"Apply NP by allowing all and blocking pod1 ingress and pod2 egress"},{"line_number":12,"context_line":"Check that connectivity from pod1 to pod4 is blocked"},{"line_number":13,"context_line":"Check that connectivity from pod4 to pod2 is blocked"},{"line_number":14,"context_line":"Check that connectivity from pod4 to pod3 is still working"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ida893c0ca6a340b342d903974ec64b8a8c98565b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1fa4df85_28cbc853","line":14,"range":{"start_line":12,"start_character":0,"end_line":14,"end_character":58},"in_reply_to":"1fa4df85_cde1e6d2","updated":"2020-02-25 11:02:57.000000000","message":"Done","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"}],"kuryr_tempest_plugin/tests/scenario/test_network_policy.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"bcffe1e59329a16c27de49834c7158c67ef85164","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name), \u00270\u0027)"},{"line_number":104,"context_line":"        # Create NP allowing all besides first pod on ingress"},{"line_number":105,"context_line":"        #  and second pod on egress"},{"line_number":106,"context_line":"        np \u003d self.create_network_policy("},{"line_number":107,"context_line":"            namespace\u003dnamespace_name, ingress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":108,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"},{"line_number":109,"context_line":"            egress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":110,"context_line":"            egress_ipblock_except\u003d[pod_ip_list[1]+\u0027/32\u0027])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":113,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_97c53240","line":110,"range":{"start_line":106,"start_character":0,"end_line":110,"end_character":57},"updated":"2019-11-07 22:18:20.000000000","message":"We should add a sleep after the NP creation, it can take a while for the rules to be created and enforced.","commit_id":"278647fe85335d15c52e85681629ae371b3bc944"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"d9c79c873c08849985b2fbe7c042d6d65862798c","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                time.sleep(1)"},{"line_number":125,"context_line":"                continue"},{"line_number":126,"context_line":"        # Check no connectivity to pods 1 and 2 after creating NP"},{"line_number":127,"context_line":"        for i in range(2):"},{"line_number":128,"context_line":"            self.assertNotEqual(self.exec_command_in_pod("},{"line_number":129,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name), \u00270\u0027)"},{"line_number":130,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":131,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":132,"context_line":"        self.assertEqual(self.exec_command_in_pod("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_002db78d","line":129,"range":{"start_line":127,"start_character":0,"end_line":129,"end_character":78},"updated":"2019-11-03 12:50:09.000000000","message":"Why there\u0027s no connectivity to Pod 1?\nFrom the policy is see that:\n1. The policy is enforced to all the pods under the namespace\n2. Ingress is blocked only from Pod 1\n3. Egress is blocked only to Pod 2\n\nSo, I believe that if we try to connect from Pod 4 to (egress) Pod 1 it should be allowed.\n\nIt might be good to also check the traffic from Pod 1 to any other pod, and see if it\u0027s blocked.","commit_id":"278647fe85335d15c52e85681629ae371b3bc944"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"67f6612133c1b54fbbc3c561a1812afa361b3001","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                time.sleep(1)"},{"line_number":125,"context_line":"                continue"},{"line_number":126,"context_line":"        # Check no connectivity to pods 1 and 2 after creating NP"},{"line_number":127,"context_line":"        for i in range(2):"},{"line_number":128,"context_line":"            self.assertNotEqual(self.exec_command_in_pod("},{"line_number":129,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name), \u00270\u0027)"},{"line_number":130,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":131,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":132,"context_line":"        self.assertEqual(self.exec_command_in_pod("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_f2885fc6","line":129,"range":{"start_line":127,"start_character":0,"end_line":129,"end_character":78},"in_reply_to":"3fa7e38b_002db78d","updated":"2019-11-05 08:03:36.000000000","message":"My understanding is that ping works on ICMP request and ICMP response, so in order to work it needs both, so if one of them is blocked ping will fail","commit_id":"278647fe85335d15c52e85681629ae371b3bc944"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"bcffe1e59329a16c27de49834c7158c67ef85164","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                time.sleep(1)"},{"line_number":125,"context_line":"                continue"},{"line_number":126,"context_line":"        # Check no connectivity to pods 1 and 2 after creating NP"},{"line_number":127,"context_line":"        for i in range(2):"},{"line_number":128,"context_line":"            self.assertNotEqual(self.exec_command_in_pod("},{"line_number":129,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name), \u00270\u0027)"},{"line_number":130,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":131,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":132,"context_line":"        self.assertEqual(self.exec_command_in_pod("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_b7ae2e7f","line":129,"range":{"start_line":127,"start_character":0,"end_line":129,"end_character":78},"in_reply_to":"3fa7e38b_f2885fc6","updated":"2019-11-07 22:18:20.000000000","message":"Ignore my last comment, please.","commit_id":"278647fe85335d15c52e85681629ae371b3bc944"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"fa10888c2940d533d92b085882b9605fa2bd0f20","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"},{"line_number":109,"context_line":"            egress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":110,"context_line":"            egress_ipblock_except\u003d[pod_ip_list[1]+\u0027/32\u0027])"},{"line_number":111,"context_line":"        time.sleep(120) # temporary fix to see if it helps to pass the test"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":114,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_24fa7cb9","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":75},"updated":"2019-11-20 15:08:15.000000000","message":"PEP8 fails here BTW, there should be 2 spaces before #.","commit_id":"05ec54044b5c666c34c64fff2fed4e3b739da153"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"5897128e40c8108f196a5b344d3d021862dcc062","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"},{"line_number":109,"context_line":"            egress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":110,"context_line":"            egress_ipblock_except\u003d[pod_ip_list[1]+\u0027/32\u0027])"},{"line_number":111,"context_line":"        time.sleep(120) # temporary fix to see if it helps to pass the test"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":114,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_047bc0be","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":75},"in_reply_to":"3fa7e38b_24fa7cb9","updated":"2019-11-20 15:39:40.000000000","message":"Done","commit_id":"05ec54044b5c666c34c64fff2fed4e3b739da153"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"2178b2a41ce22e379b717dc9e18220e000cf057b","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        for i in range(3):"},{"line_number":103,"context_line":"            self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":104,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name))"},{"line_number":105,"context_line":"        # Check onnectivity from pod1 to pod4 before creating NP"},{"line_number":106,"context_line":"        self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":107,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_f7c4b142","line":105,"range":{"start_line":105,"start_character":16,"end_line":105,"end_character":27},"updated":"2020-02-25 08:10:02.000000000","message":"connectivity","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"ff7d0a800add8cfdbad26fd6dad6ed5923ca95dc","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        for i in range(3):"},{"line_number":103,"context_line":"            self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":104,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name))"},{"line_number":105,"context_line":"        # Check onnectivity from pod1 to pod4 before creating NP"},{"line_number":106,"context_line":"        self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":107,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_f74ef1bf","line":105,"range":{"start_line":105,"start_character":16,"end_line":105,"end_character":27},"in_reply_to":"1fa4df85_f7c4b142","updated":"2020-02-25 08:31:22.000000000","message":"Done","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"2178b2a41ce22e379b717dc9e18220e000cf057b","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # Create NP allowing all besides first pod on ingress"},{"line_number":110,"context_line":"        # and second pod on egress"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        np \u003d self.create_network_policy("},{"line_number":113,"context_line":"            namespace\u003dnamespace_name, ingress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":114,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_17c2ad34","line":111,"updated":"2020-02-25 08:10:02.000000000","message":"remove space","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"ff7d0a800add8cfdbad26fd6dad6ed5923ca95dc","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # Create NP allowing all besides first pod on ingress"},{"line_number":110,"context_line":"        # and second pod on egress"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        np \u003d self.create_network_policy("},{"line_number":113,"context_line":"            namespace\u003dnamespace_name, ingress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":114,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_174cedc5","line":111,"in_reply_to":"1fa4df85_17c2ad34","updated":"2020-02-25 08:31:22.000000000","message":"Done","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"2178b2a41ce22e379b717dc9e18220e000cf057b","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"},{"line_number":115,"context_line":"            egress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":116,"context_line":"            egress_ipblock_except\u003d[pod_ip_list[1]+\u0027/32\u0027])"},{"line_number":117,"context_line":"        time.sleep(120)  # temporary fix to see if it helps to pass the test"},{"line_number":118,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":119,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"},{"line_number":120,"context_line":"                        namespace_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_57cd855b","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":76},"updated":"2020-02-25 08:10:02.000000000","message":"120 seems like too much! But I agree gates are slow. Perhaps worth to extract it to a constant (TIME_TO_APPLY_SGS or something like that)","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"ff7d0a800add8cfdbad26fd6dad6ed5923ca95dc","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            ingress_ipblock_except\u003d[pod_ip_list[0]+\u0027/32\u0027],"},{"line_number":115,"context_line":"            egress_ipblock_cidr\u003dallow_all_cidr,"},{"line_number":116,"context_line":"            egress_ipblock_except\u003d[pod_ip_list[1]+\u0027/32\u0027])"},{"line_number":117,"context_line":"        time.sleep(120)  # temporary fix to see if it helps to pass the test"},{"line_number":118,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":119,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"},{"line_number":120,"context_line":"                        namespace_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_37b1e990","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":76},"in_reply_to":"1fa4df85_57cd855b","updated":"2020-02-25 08:31:22.000000000","message":"Done","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"2178b2a41ce22e379b717dc9e18220e000cf057b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":122,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":123,"context_line":"        start \u003d time.time()"},{"line_number":124,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":125,"context_line":"            try:"},{"line_number":126,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":127,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"},{"line_number":128,"context_line":"                break"},{"line_number":129,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":130,"context_line":"                time.sleep(1)"},{"line_number":131,"context_line":"                continue"},{"line_number":132,"context_line":"        # Check no connectivity from pod1 to pod4 after creating NP"},{"line_number":133,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":134,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_f7d91122","line":131,"range":{"start_line":124,"start_character":0,"end_line":131,"end_character":24},"updated":"2020-02-25 08:10:02.000000000","message":"If you have this, why you need the sleep above? perhaps that one could be removed or at the very least reduced and moved it before this loop","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"112012972378828bede8261184549c74e255a32c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":122,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":123,"context_line":"        start \u003d time.time()"},{"line_number":124,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":125,"context_line":"            try:"},{"line_number":126,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":127,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"},{"line_number":128,"context_line":"                break"},{"line_number":129,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":130,"context_line":"                time.sleep(1)"},{"line_number":131,"context_line":"                continue"},{"line_number":132,"context_line":"        # Check no connectivity from pod1 to pod4 after creating NP"},{"line_number":133,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":134,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_2dff4302","line":131,"range":{"start_line":124,"start_character":0,"end_line":131,"end_character":24},"in_reply_to":"1fa4df85_f7d91122","updated":"2020-02-26 10:12:39.000000000","message":"+1. I believe that sleep can be removed, and we can rely only on the watching the crd.","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"36873d208f63bf721c3ae5ea6a45bbe967dc6c01","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":122,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":123,"context_line":"        start \u003d time.time()"},{"line_number":124,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":125,"context_line":"            try:"},{"line_number":126,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":127,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"},{"line_number":128,"context_line":"                break"},{"line_number":129,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":130,"context_line":"                time.sleep(1)"},{"line_number":131,"context_line":"                continue"},{"line_number":132,"context_line":"        # Check no connectivity from pod1 to pod4 after creating NP"},{"line_number":133,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":134,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_6d777b3c","line":131,"range":{"start_line":124,"start_character":0,"end_line":131,"end_character":24},"in_reply_to":"1fa4df85_f7d91122","updated":"2020-02-27 13:33:56.000000000","message":"I will try to remove the sleep.","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"2178b2a41ce22e379b717dc9e18220e000cf057b","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":137,"context_line":"            pod_name_list[3], cmd_list[1], namespace\u003dnamespace_name))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":140,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":141,"context_line":"        self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":142,"context_line":"            pod_name_list[3], cmd_list[2], namespace\u003dnamespace_name))"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":145,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_37f9e97f","line":142,"range":{"start_line":139,"start_character":0,"end_line":142,"end_character":69},"updated":"2020-02-25 08:10:02.000000000","message":"I would check pod4 to 1 (instead or in addition to this).\n\nIn addition, perhaps worth to add an extra case where the NP is deleted and connectivity is checked again for the blocked one, and double check it is not blocked anymore","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"112012972378828bede8261184549c74e255a32c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":137,"context_line":"            pod_name_list[3], cmd_list[1], namespace\u003dnamespace_name))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":140,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":141,"context_line":"        self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":142,"context_line":"            pod_name_list[3], cmd_list[2], namespace\u003dnamespace_name))"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":145,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_cd946f8e","line":142,"range":{"start_line":139,"start_character":0,"end_line":142,"end_character":69},"in_reply_to":"1fa4df85_37f9e97f","updated":"2020-02-26 10:12:39.000000000","message":"Both are create cases to also be handled.","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"8c1173783f1631ca7a8997da1ec13f92c05cb0bb","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":137,"context_line":"            pod_name_list[3], cmd_list[1], namespace\u003dnamespace_name))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        # Check there is still connectivity to pod 3"},{"line_number":140,"context_line":"        # as it\u0027s not blocked by IPblock rules"},{"line_number":141,"context_line":"        self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":142,"context_line":"            pod_name_list[3], cmd_list[2], namespace\u003dnamespace_name))"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":145,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fa4df85_8de3d733","line":142,"range":{"start_line":139,"start_character":0,"end_line":142,"end_character":69},"in_reply_to":"1fa4df85_cd946f8e","updated":"2020-02-26 10:13:23.000000000","message":"great*","commit_id":"3c1eb555117a19c7c7efc51747d3ab2c9367e2ce"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"6d08f4c1570c0e3fe14f213999438165d29c1729","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":131,"context_line":"                time.sleep(1)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":"        # Check no connectivity from pod1 to pod4 after creating NP"},{"line_number":134,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":135,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"},{"line_number":136,"context_line":"        # Check no connectivity from pod4 to pod2 after creating NP"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fa4df85_4dae562f","line":133,"range":{"start_line":133,"start_character":19,"end_line":133,"end_character":31},"updated":"2020-02-25 10:31:05.000000000","message":"http connection","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"c177d09f5177d96610fdf9b5c53abec4365f6ad7","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":131,"context_line":"                time.sleep(1)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":"        # Check no connectivity from pod1 to pod4 after creating NP"},{"line_number":134,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":135,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"},{"line_number":136,"context_line":"        # Check no connectivity from pod4 to pod2 after creating NP"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fa4df85_089b6c72","line":133,"range":{"start_line":133,"start_character":19,"end_line":133,"end_character":31},"in_reply_to":"1fa4df85_4dae562f","updated":"2020-02-25 11:02:57.000000000","message":"Done","commit_id":"5b18b867b63a6f42b2bc546d6a38dd2265c4b2ba"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"b262b3ed0691bca551793d968d854c9b4374353e","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":"        # Check that http connection from pod1 to pod4 is blocked"},{"line_number":134,"context_line":"        # after creating NP"},{"line_number":135,"context_line":"        self.assertNotIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":136,"context_line":"            pod_name_list[0], cmd_list[3], namespace\u003dnamespace_name))"},{"line_number":137,"context_line":"        # Check that http connection from pod4 to pod2 is blocked"},{"line_number":138,"context_line":"        # after creating NP"}],"source_content_type":"text/x-python","patch_set":12,"id":"1fa4df85_eee601e9","line":135,"range":{"start_line":135,"start_character":8,"end_line":135,"end_character":69},"updated":"2020-02-26 13:40:37.000000000","message":"instead of having the sleep before retrieving the CRD, could we try adding that here but with value 30? this way we give a chance for all the sg rules on the resources to get updated.","commit_id":"16c16907d8f40716705b949acd3f0705912019ad"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"0c5cb5b38d7f2cc51eaeacb4818ff4c304011686","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            pod_name_list[3], cmd_list[2], namespace\u003dnamespace_name))"},{"line_number":151,"context_line":"        # Delete network policy and check that there is still http connection"},{"line_number":152,"context_line":"        # between pods"},{"line_number":153,"context_line":"        self.delete_network_policy(np.metadata.name, namespace_name)"},{"line_number":154,"context_line":"        for i in range(3):"},{"line_number":155,"context_line":"            self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":156,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name))"}],"source_content_type":"text/x-python","patch_set":13,"id":"1fa4df85_9bd0e8f9","line":153,"range":{"start_line":153,"start_character":7,"end_line":153,"end_character":68},"updated":"2020-02-26 16:58:50.000000000","message":"here you will need to wait until the NP is deleted (similarly to the while block at lines 125-132","commit_id":"129746a24e4eafcc06cd8b9fcf9ab8dd43b97af1"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"36873d208f63bf721c3ae5ea6a45bbe967dc6c01","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            pod_name_list[3], cmd_list[2], namespace\u003dnamespace_name))"},{"line_number":151,"context_line":"        # Delete network policy and check that there is still http connection"},{"line_number":152,"context_line":"        # between pods"},{"line_number":153,"context_line":"        self.delete_network_policy(np.metadata.name, namespace_name)"},{"line_number":154,"context_line":"        for i in range(3):"},{"line_number":155,"context_line":"            self.assertIn(consts.POD_OUTPUT, self.exec_command_in_pod("},{"line_number":156,"context_line":"                pod_name_list[3], cmd_list[i], namespace\u003dnamespace_name))"}],"source_content_type":"text/x-python","patch_set":13,"id":"1fa4df85_5468f51f","line":153,"range":{"start_line":153,"start_character":7,"end_line":153,"end_character":68},"in_reply_to":"1fa4df85_9bd0e8f9","updated":"2020-02-27 13:33:56.000000000","message":"Done","commit_id":"129746a24e4eafcc06cd8b9fcf9ab8dd43b97af1"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"0ed5762b342f39540c5854a1e6ec0af0feabb973","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # between pods"},{"line_number":157,"context_line":"        np_exist \u003d True"},{"line_number":158,"context_line":"        self.delete_network_policy(np.metadata.name, namespace_name)"},{"line_number":159,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":160,"context_line":"            try:"},{"line_number":161,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":162,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1fa4df85_67e521a8","line":159,"range":{"start_line":159,"start_character":7,"end_line":159,"end_character":51},"updated":"2020-03-02 07:02:13.000000000","message":"you need to \"re-initialize\" start here","commit_id":"d5af22838da1b3f5fe65b2ef2d1821b93983c7f2"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3bc032f1813235ed24c3bc122488dba2753358f5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        self.delete_network_policy(np.metadata.name, namespace_name)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        start \u003d time.time()"},{"line_number":161,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":162,"context_line":"            try:"},{"line_number":163,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":164,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"},{"line_number":165,"context_line":"            except kubernetes.client.rest.ApiException as e:"},{"line_number":166,"context_line":"                if e.status \u003d\u003d 404:"},{"line_number":167,"context_line":"                    np_exist \u003d False"},{"line_number":168,"context_line":"                    break"},{"line_number":169,"context_line":"                else:"},{"line_number":170,"context_line":"                    continue"},{"line_number":171,"context_line":"        self.assertFalse(np_exist)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for i in range(3):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1fa4df85_eabb116f","line":170,"range":{"start_line":161,"start_character":0,"end_line":170,"end_character":28},"updated":"2020-03-02 13:01:41.000000000","message":"Let\u0027s make is sleep 1 second before each call, I think this is the main cause of this failing.","commit_id":"99fdd4d86127143ba2194d98a5ffa877af9e4892"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"73ef2da3be293ed4c820b5ecea7ff412557effd2","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        self.delete_network_policy(np.metadata.name, namespace_name)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        start \u003d time.time()"},{"line_number":161,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":162,"context_line":"            try:"},{"line_number":163,"context_line":"                self.get_kuryr_netpolicy_crds("},{"line_number":164,"context_line":"                    name\u003dkuryr_netpolicy_crd_name, namespace\u003dnamespace_name)"},{"line_number":165,"context_line":"            except kubernetes.client.rest.ApiException as e:"},{"line_number":166,"context_line":"                if e.status \u003d\u003d 404:"},{"line_number":167,"context_line":"                    np_exist \u003d False"},{"line_number":168,"context_line":"                    break"},{"line_number":169,"context_line":"                else:"},{"line_number":170,"context_line":"                    continue"},{"line_number":171,"context_line":"        self.assertFalse(np_exist)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for i in range(3):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1fa4df85_7c54bd53","line":170,"range":{"start_line":161,"start_character":0,"end_line":170,"end_character":28},"in_reply_to":"1fa4df85_eabb116f","updated":"2020-03-03 07:05:18.000000000","message":"Thanks Michal!","commit_id":"99fdd4d86127143ba2194d98a5ffa877af9e4892"}]}
