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

fix cloneSet controller block caused by scale expectation leakage #1829

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

zmberg
Copy link
Member

@zmberg zmberg commented Nov 19, 2024

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

#1765

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 7.69231% with 24 lines in your changes missing coverage. Please review.

Project coverage is 50.07%. Comparing base (0d0031a) to head (9af3264).
Report is 120 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/cloneset/cloneset_controller.go 7.69% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1829      +/-   ##
==========================================
+ Coverage   47.91%   50.07%   +2.16%     
==========================================
  Files         162      192      +30     
  Lines       23491    24666    +1175     
==========================================
+ Hits        11256    12352    +1096     
- Misses      11014    11044      +30     
- Partials     1221     1270      +49     
Flag Coverage Δ
unittests 50.07% <7.69%> (+2.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@zmberg zmberg force-pushed the fix-cloneset-block branch 2 times, most recently from 4f32307 to bec8746 Compare November 19, 2024 07:19
klog.InfoS("Expectation unsatisfied overtime", "cloneSet", request, "scaleDirtyPods", scaleDirtyPods, "overTime", unsatisfiedDuration)
// In some extreme scenarios, if the Pod is created and then quickly deleted, there may be event loss.
// Therefore, a touting mechanism is needed to ensure that clonesets can continue to work.
klog.InfoS("Expectation unsatisfied overtime, and delete ScaleExpectation", "cloneSet", request, "scaleDirtyPods", scaleDirtyPods, "overTime", unsatisfiedDuration)
Copy link
Member

Choose a reason for hiding this comment

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

move the log into l265

// Therefore, a touting mechanism is needed to ensure that clonesets can continue to work.
klog.InfoS("Expectation unsatisfied overtime, and delete ScaleExpectation", "cloneSet", request, "scaleDirtyPods", scaleDirtyPods, "overTime", unsatisfiedDuration)
CloneSetScaleExpectationLeakageMetrics.WithLabelValues(request.Namespace, request.Name).Add(1)
// todo, currently there is no way to differentiate between the two resources pod/pvc, so the pvc needs to be separated by an expectation
Copy link
Member

Choose a reason for hiding this comment

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

//TODO: check the existence of resource in apiserver using client-go directly

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
@furykerry
Copy link
Member

/lgtm

Copy link
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@furykerry furykerry merged commit 26a07e2 into openkruise:master Nov 19, 2024
42 of 44 checks passed
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