fix: creating multiple pods at the same time will be assigned to the same NPU.#53
fix: creating multiple pods at the same time will be assigned to the same NPU.#53lomtom wants to merge 1 commit intoProject-HAMi:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lomtom The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @lomtom! It looks like this is your first PR to Project-HAMi/ascend-device-plugin 🎉 |
DSFans2014
left a comment
There was a problem hiding this comment.
please sign-off your commit
…same NPU. Signed-off-by: lomtom <lomtom@qq.com>
it's done |
|
Is this issue consistently reproducible? Can this fix be verified to resolve that problem? @lomtom |
Yes,This is almost 100% reproducible, and after I fixed it, the verification issue was resolved |
hi lomtom,please explain why set |
|
hi, @DSFans2014 This method will filter the pending pod, but after the Pod is processed, his DeviceBindPhase annotation will not change, which will cause the processed Pod to be still selected when assigning to the second Pod (at this time, the first Pod is still in the Pending state for a short time) if phase, ok := p.Annotations[DeviceBindPhase]; !ok {
continue
} else {
if strings.Compare(phase, DeviceBindAllocating) != 0 {
continue
}
}Therefore, if a Pod changes the DeviceBindPhase annotation to util.DeviceBindSuccess after executing Allocate, it will be filtered out next time. (Although he is still in the pending state for a short time) |
got it, thank you. but now there are still potential concurrency issues due to the nodelock problem in Volcano. we will fix it later. |
fix: #52