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

【WIP】add pod diagnosis feature #1219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xiaochaoren
Copy link

What changes were proposed in this pull request?

  1. monitor pod periodically
  2. diagnose long pending pods based on the monitoring data

Why are the changes needed?

automatically recover the job from the long pending problem

Does this PR introduce any user-facing change?

No.

How was this patch tested?

1. monitor pod periodically
2. diagnosis long pending pods based on the monitoring data

Signed-off-by: xiluo <[email protected]>
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 62.83186% with 42 lines in your changes missing coverage. Please review.

Project coverage is 80.31%. Comparing base (adc8bba) to head (4b58a10).
Report is 3 commits behind head on master.

Files Patch % Lines
...r/diagnosis/operator/check_pod_pending_operator.py 37.14% 22 Missing ⚠️
dlrover/python/master/diagnosis/diagnosis.py 16.66% 10 Missing ⚠️
dlrover/python/master/monitor/pod_monitor.py 80.00% 6 Missing ⚠️
dlrover/python/common/diagnosis.py 85.71% 2 Missing ⚠️
dlrover/python/master/watcher/k8s_watcher.py 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1219      +/-   ##
==========================================
- Coverage   80.41%   80.31%   -0.11%     
==========================================
  Files         217      219       +2     
  Lines       19463    19567     +104     
==========================================
+ Hits        15652    15715      +63     
- Misses       3811     3852      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -78,6 +82,22 @@ def get_timestamp(self) -> int:
def get_type(self) -> str:
return DiagnosisDataType.CHIPMETRICES

class K8sPodData(DiagnosisData):
def __init__(self, timestamp: int, pods: List[V1Pod]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better not involve 'V1Pod' in common package(or user should add 'kubernetes' deps in their env).

from dlrover.python.scheduler.job import JobArgs


class PodMonitor(object):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This impl is duplicated with _monitor_nodes in dist_job_manager.py.

@BalaBalaYi BalaBalaYi changed the title add pod diagnosis feature 【WIP】add pod diagnosis feature Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants