This repository was archived by the owner on Dec 9, 2025. It is now read-only.
feat: Improve device allocation reliability in high churn scenarios#253
Merged
gauravkghildiyal merged 2 commits intogoogle:mainfrom Oct 13, 2025
Merged
Conversation
77ca76d to
c8edd5e
Compare
This commit introduces configurable rate limiting for the inventory discovery process. Previously, a fixed 5-second rate limit with a burst of 1 could delay processing of netlink updates, leading to failures during high pod churn scenarios. Command-line flags have been added to control the inventory discovery rate limit and burst size. The default values have been adjusted to be more responsive to rapid pod lifecycle events, ensuring that device state is updated promptly.
Previously, if a device was released by a pod and immediately claimed by another, the inventory might not have had a chance to update. Now, if a device is not found in the local store, a new scan is triggered to ensure that newly available devices are discovered before failing. This improves the reliability of device allocation during high pod churn.
c8edd5e to
c1adaaf
Compare
michaelasp
reviewed
Oct 13, 2025
michaelasp
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rate limiter for publishing inventory state to the Kubernetes API server is now configurable. The default minimum interval between ResourceSlice updates has been reduced from 5 seconds to 2 seconds, with a burst of 5. This ensures that (only) when inventory changes, i.e.
dranet/pkg/inventory/db.go
Line 116 in 51b8a6c
An on-demand scan is now triggered if a requested device is not found in the local cache. This resolves allocation failures caused by race conditions where a device is released and immediately re-claimed (by a different pod). The scan instantly updates the driver's local state, ensuring newly freed devices are immediately available for allocation, independent of the rate-limited ResourceSlice update.