From c368be587dfd46770cde87a3630521d69bce88cd Mon Sep 17 00:00:00 2001 From: Kate Goldenring Date: Tue, 12 Jan 2021 14:12:52 -0800 Subject: [PATCH 1/2] loop query containerd several times instead of sleeping --- .github/workflows/run-test-cases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-test-cases.yml b/.github/workflows/run-test-cases.yml index 23492c7ff..0178ab695 100644 --- a/.github/workflows/run-test-cases.yml +++ b/.github/workflows/run-test-cases.yml @@ -233,8 +233,8 @@ jobs: - if: (startsWith(github.event_name, 'pull_request')) && (startsWith(matrix.kube-runtime, 'MicroK8s')) name: Import local agent and controller to MicroK8s run: | - sleep 15 # 60, 30, 15, and 5 all work in simple tests ... no sleep fails for 1.19.3 sudo microk8s.status --wait-ready + until sudo microk8s ctr images ls; do sleep 5s; echo "Try again"; done sudo microk8s ctr images ls sudo microk8s ctr --debug --timeout 10s images import agent.tar sudo microk8s ctr --debug --timeout 10s images import controller.tar From 69a6fbccd31c9708472eda41fbc73613fb5791ab Mon Sep 17 00:00:00 2001 From: Kate Goldenring Date: Tue, 12 Jan 2021 16:27:43 -0800 Subject: [PATCH 2/2] shorten agent log query --- test/run-end-to-end.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run-end-to-end.py b/test/run-end-to-end.py index e3d6f9dc3..726c76103 100644 --- a/test/run-end-to-end.py +++ b/test/run-end-to-end.py @@ -114,7 +114,7 @@ def do_test(): print("Failed to get logs from {} pod with result {} on attempt {} of 3".format(shared_test_code.agent_pod_name, log_result, x)) if x == 2: return False - grep_result = subprocess.run('grep "get_node_slots - crictl called successfully" {} | wc -l | grep -v 0'.format(temporary_agent_log_path), shell=True) + grep_result = subprocess.run(['grep', "get_node_slots - crictl called successfully", temporary_agent_log_path]) if grep_result.returncode != 0: print("Akri failed to successfully connect to crictl via the CRI socket with return value of {}", grep_result) # Log information to understand why error occurred