mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[autoscaler][Kubernetes] Fix non_terminated_nodes consistency (#14976)
* Verify pod termination * deletion-timestamp * get rid of extra constant
This commit is contained in:
parent
cdbaf930ab
commit
dcf41d868c
1 changed files with 6 additions and 1 deletions
|
@ -51,7 +51,12 @@ class KubernetesNodeProvider(NodeProvider):
|
|||
field_selector=field_selector,
|
||||
label_selector=label_selector)
|
||||
|
||||
return [pod.metadata.name for pod in pod_list.items]
|
||||
# Don't return pods marked for deletion,
|
||||
# i.e. pods with non-null metadata.DeletionTimestamp.
|
||||
return [
|
||||
pod.metadata.name for pod in pod_list.items
|
||||
if pod.metadata.deletion_timestamp is None
|
||||
]
|
||||
|
||||
def is_running(self, node_id):
|
||||
pod = core_api().read_namespaced_pod(node_id, self.namespace)
|
||||
|
|
Loading…
Add table
Reference in a new issue