Repository navigation
Conversation
bart0sh
added this pull request to stack #807
October 18, 2026 14:55
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
2 times, most recently
from
October 18, 2026 15:44
3cec18b to
4f183af
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Restored claims can overlap reserved workloads when a claimed isolated CPU becomes reserved.
1 open issue
What changed in this PR
Restores topology-aware DRA claims from cache before running containers are reallocated after a plugin restart.
Changes:
- Preserves cached claims and reports restoration failures.
- Warns when containers reference unknown claims.
- Adds restart tests and updates recovery documentation.
| File | Description |
|---|---|
| test/e2e/policies.test-suite/topology-aware/n4c16/test42-dra-devices/code.var.sh | Tests claim persistence and failed-start recovery. |
| test/e2e/policies.test-suite/template/n4c16/test01-dra/code.var.sh | Tests restart with fewer allowed CPUs. |
| docs/resource-policy/policy/topology-aware.md | Documents restart behavior and recovery. |
| cmd/plugins/topology-aware/policy/topology-aware-policy.go | Preserves cache and restores claims during setup. |
| cmd/plugins/topology-aware/policy/dra.go | Warns about unknown container claims. |
| cmd/plugins/topology-aware/policy/dra_test.go | Adds restoration and failure-recovery unit tests. |
| cmd/plugins/topology-aware/policy/cache.go | Restores claim grants and tracks unresolved pools. |
Review effort: Balanced
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 18, 2026 16:07
4f183af to
2dbe255
Compare
bart0sh
marked this pull request as ready for review
October 18, 2026 18:27
bart0sh
marked this pull request as draft
October 18, 2026 18:35
bart0sh
marked this pull request as ready for review
October 19, 2026 06:49
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 11:33
fe333f4 to
6a2e470
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 12:15
6a2e470 to
17a1fd0
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 12:38
17a1fd0 to
3be5773
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
2 times, most recently
from
October 19, 2026 12:59
a72a7b2 to
fef55fd
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 13:06
fef55fd to
8d506eb
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
2 times, most recently
from
October 19, 2026 13:11
24d8ca2 to
8aaeec0
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 13:30
8aaeec0 to
ea848ca
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
2 times, most recently
from
October 19, 2026 14:29
a0e4bef to
578db14
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 14:45
578db14 to
9eb1683
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 14:50
9eb1683 to
3b29f8f
Compare
klihub
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 19, 2026 15:04
3b29f8f to
3129c87
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 20, 2026 06:22
3129c87 to
983142e
Compare
askervin
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 20, 2026 10:16
983142e to
3987fe9
Compare
Base automatically changed from
stacked/bart0sh/DRA/013-prepare-for-release
to
main
October 20, 2026 11:18
askervin
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 20, 2026 11:18
3987fe9 to
40c78a9
Compare
Setup() no longer clears our cache entries. It restores the saved claim grants, and fails on a claim whose pool is gone or whose CPUs we cannot grant any more. Container grants are not restored, since Sync() allocates every running container again. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
A reserved CPU can also be isolated, and Reserve() then takes it for the isolated part of a claim, so reserved workloads could run on the claim's CPUs after a restart or a reconfiguration. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
When a restart with a new configuration cannot give a claim its old CPUs, give it other CPUs of the same NUMA nodes, and Sync() moves its containers to them. The start fails only when a node has too few CPUs for the claim. Before, such a claim failed the start, and the node ran without the plugin until the configuration was reverted. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
bart0sh
force-pushed
the
stacked/bart0sh/DRA/014-restore-claims
branch
from
October 23, 2026 12:37
40c78a9 to
2f744b7
Compare
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

topology-aware forgets its DRA claims when the plugin restarted.
Setup()clears the policy's cache entries, andSync()places every running container again, so containers holding a claim lost its CPUs, and new claims can get them. The kubelet does not prepare a claim again after our restart, so nothing rebuilt a claim once it was gone.Now
Setup()keeps the cache entries and restores the saved claim grants. Container grants are not restored:Sync()allocates every running container again, and finds the claims by then. A container which holds a claim the policy does not know gets a warning in the log.If the new configuration cannot give a claim its CPUs, because they are reserved or no longer available or the pool is gone, the claim gets other CPUs of the same NUMA nodes, and
Sync()moves its containers to them. A claim result is only a number of CPUs of a node, so the kubelet and the scheduler see no change. The claims which keep their CPUs are restored first, so a moved claim cannot take the CPUs of another claim. The start fails only when a node has too few CPUs for a claim. The error names the claim, and the agent writes it into the status of the config CR. Reverting the config lets the plugin start again with the claim restored. A runtime reconfiguration which cannot hold a claim is still refused.Two fixes on the side:
Reserve()took a reserved CPU which is also isolated for the isolated part of a claim, which also affected runtime reconfiguration onmain. And the topology-aware policy tests unpacked the sysfs tarball once per test, about 20s each with-race, which made the package hit the 10mgo testtimeout. With one shared copy the package runs in 42s with-race.Testing:
go test -race -count=1 ./...passes with the default 10m timeout.DRAConsumableCapacity, with images built from this branch: test42 (topology-aware, also withDRANodeAllocatableResources) and test01-dra (template) pass. test42 restarts the plugin and checks that running containers keep their claimed CPUs and a new claim gets only free CPUs, that a config which reserves a CPU of a claim moves the claim and its containers to the free CPU of the same node, and that a config which leaves too few CPUs fails the start with the claim named in the config status. test01-dra restarts template with fewer allowed CPUs: the claim keeps its CPUs with a warning, and a new claim does not get them.