-
Notifications
You must be signed in to change notification settings - Fork 234
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
[YUNIKORN-2895] Don't add duplicated allocation to node when the allo… #976
Conversation
…cation already allocated before.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #976 +/- ##
==========================================
- Coverage 81.03% 80.99% -0.04%
==========================================
Files 97 97
Lines 12523 12529 +6
==========================================
Hits 10148 10148
- Misses 2104 2110 +6
Partials 271 271 ☔ View full report in Codecov by Sentry. |
Good catch! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break horribly. If allocateAsk() fails, there is nothing to unwind as the allocation result won't be returned and the final allocation will never happen. Your logic will remove something that was not added in the first place.
Thanks @craigcondit for review:
It seems both two cases call TryNodeAllocation, so i am confused. |
If you're sure this is correct, build a set of unit tests that prove it. Demonstrate that in the failure case without this patch that the system is left in an inconsistent state. Then show that it operates correctly with the patch. There's no tests in this PR at all. |
-1 on this approach. I think the issue is way more basic. I opened a discussion on the jira as I see multiple issues in the way now track allocations and asks. |
Thanks @wilfred-s @craigcondit , i will try do add unit test and check the comments, look into the root cause of those issues. |
The |
Closing this after determining that original issue is not a problem. |
…cation already allocated before.
When i try to revisit the new update allocation logic, the potential duplicated allocation to node will happen if the allocation already allocated. And we try to add the allocation to the node again and don't revert it.
Note:
We have unwind logic for another side call for placeholder allocate:
yunikorn-core/pkg/scheduler/objects/application.go
Line 1285 in fe067b7
What type of PR is it?
Todos
What is the Jira issue?
[YUNIKORN-2] Gang scheduling interface parameters
How should this be tested?
Screenshots (if appropriate)
Questions: