Skip to content

Commit

Permalink
Merge pull request #48 from hightall/issue47
Browse files Browse the repository at this point in the history
[Fix #47] Fix node status check crash for k8s agent
  • Loading branch information
jiahaoc1993 authored Oct 24, 2019
2 parents 3961a1f + 008c890 commit aa3bfdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agent/kubernetes-agent/src/operations/create_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _create_fabric_node():
node_status = NodeStatus.Error.value
for i in range(1, MAX_QUERY_RETRY):
pod = k8s_client.get_pod(AGENT_ID, deploy_name)
if pod.status.phase == "Running":
if pod and pod.status.phase == "Running":
node_status = NodeStatus.Running.value
break
sleep(5)
Expand Down

0 comments on commit aa3bfdb

Please sign in to comment.