Skip to content

Commit 6dc66d4

Browse files
Yicheng-Lu-llllyicheng
andauthored
[Core] Fix psutil internal API usage in dashboard disk usage reporting (#59659)
Signed-off-by: yicheng <yicheng@anyscale.com> Co-authored-by: yicheng <yicheng@anyscale.com>
1 parent 10869d5 commit 6dc66d4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

python/ray/dashboard/modules/reporter/reporter_agent.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -876,9 +876,8 @@ def _get_mem_usage():
876876
def _get_disk_usage():
877877
if IN_KUBERNETES_POD and not ENABLE_K8S_DISK_USAGE:
878878
# If in a K8s pod, disable disk display by passing in dummy values.
879-
return {
880-
"/": psutil._common.sdiskusage(total=1, used=0, free=1, percent=0.0)
881-
}
879+
sdiskusage = type(psutil.disk_usage("/"))
880+
return {"/": sdiskusage(total=1, used=0, free=1, percent=0.0)}
882881
if sys.platform == "win32":
883882
root = psutil.disk_partitions()[0].mountpoint
884883
else:

0 commit comments

Comments
 (0)