-
Notifications
You must be signed in to change notification settings - Fork 890
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: failed to sync work when binding's target clusters are empty #5818
base: master
Are you sure you want to change the base?
fix: failed to sync work when binding's target clusters are empty #5818
Conversation
a3c875a
to
44543b7
Compare
Hi @vie-serendipity thanks for your feedback. We can really decide whether to reconcile the ResourceBinding based on whether the scheduling has been completed (the ClusterResourceBinding has the same processing logic), which can save some unnecessary tuning. Therefore, I understand that this should be an optimization, not a bug fix. In addition, we can judge whether the scheduling is completed in this way: |
For now, I find the logic to reconcile depends on We can add |
You are right.
Does this mean the component crashed and restarted?
I think this operation has no negative impact, am I right?
According to the information you describe, I think so, we can save unnecessary reconcile. |
The scheduler failed to pull the image, so it doesn't do scheduling.
Yes, I think so. I will update code in my pr. |
Thanks for your quick response. Now, I want to make sure that if the image is correctly pulled, can you find the log you're referring to? |
Actually, I see this log in controller manager's log. Because my scheduler is not ready, I think this log is unexpected. And I can't find log because I am testing and the environment changes significantly. |
You can check whether the log exists after adjusting the environment. |
The controller manager pod restarts, so the log doesn't exist. |
Signed-off-by: vie-serendipity <2733147505@qq.com>
44543b7
to
9f6bf68
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5818 +/- ##
==========================================
+ Coverage 46.02% 46.16% +0.14%
==========================================
Files 660 663 +3
Lines 53987 54618 +631
==========================================
+ Hits 24848 25216 +368
- Misses 27521 27779 +258
- Partials 1618 1623 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
For now, when binding is not scheduled, which means clusters field is empty, work will still be synced. And this log will be printed.
Sync work of resourceBinding(%s/%s) successful
But actually no work is created. I think it's necessary to check whether clusters field of binding is empty. I'not sure this should be added to predicates of controller or just put it into syncbinding function, like my current pr code. I think the latter is better, in this way, users can see scheduling encounter some problems.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: