Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Agent logs before testing their contents [SAME VERSION] #197

Merged
merged 4 commits into from
Jan 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions test/run-end-to-end.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ def do_test():
#
# Check that slot reconciliation is working on agent
#
temporary_agent_log_path = "/tmp/agent_log.txt"
print("Check logs for Agent slot-reconciliation for pod {}".format(shared_test_code.agent_pod_name))
result = os.system('sudo {} logs {} | grep "get_node_slots - crictl called successfully" | wc -l | grep -v 0'.format(kubectl_cmd, shared_test_code.agent_pod_name))
if result != 0:
print("Akri failed to successfully connect to crictl via the CRI socket")
for x in range(3):
log_result = os.system('sudo {} logs {} >> {}'.format(kubectl_cmd, shared_test_code.agent_pod_name, temporary_agent_log_path))
kate-goldenring marked this conversation as resolved.
Show resolved Hide resolved
if log_result == 0:
break
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 == 3:
return False
grep_result = os.system('grep "get_node_slots - crictl called successfully" {} | wc -l | grep -v 0'.format(temporary_agent_log_path))
if grep_result != 0:
print("Akri failed to successfully connect to crictl via the CRI socket with stdout result of {}", grep_result)
kate-goldenring marked this conversation as resolved.
Show resolved Hide resolved
return False

#
Expand Down