Skip to content

Commit

Permalink
Filter out non-cl-worker pods (#3903)
Browse files Browse the repository at this point in the history
  • Loading branch information
teetone authored Dec 8, 2021
1 parent 39db846 commit 5320844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codalab/worker_manager/kubernetes_worker_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_worker_jobs(self) -> List[WorkerJob]:
'default', field_selector='status.phase==Running'
)
logger.debug(pods.items)
return [WorkerJob(True) for _ in pods.items]
return [WorkerJob(True) for pod in pods.items if 'cl-worker' in pod.metadata.name]
except (client.ApiException, MaxRetryError, NewConnectionError) as e:
logger.error(f'Exception when calling Kubernetes CoreV1Api->list_namespaced_pod: {e}')
return []
Expand Down

0 comments on commit 5320844

Please sign in to comment.