resmgr: name to container ID mapping fixes - #727
Open
klihub wants to merge 4 commits into
Open
Conversation
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
klihub
marked this pull request as draft
July 29, 2026 18:59
askervin
reviewed
Jul 30, 2026
askervin
left a comment
Collaborator
There was a problem hiding this comment.
Very nice... just one question and one nit.
klihub
force-pushed
the
fixes/duplicate-name-mapping
branch
from
July 30, 2026 10:14
e71f377 to
46f06f1
Compare
Mark containers as exited during initial state synchronization with the runtime. This should prevent subsequent configuration updates from trying to allocate resources for both the old and the new instance, in case the old has not been removed yet. When trying to detect transient stale duplicate containers for overlapping container create/crash/stop then re-create events, try to be smarter about which instance is the stale one. For a CreateContainer event always choose the old one. Otherwise for an initial sync, use the CreatedAt timestamps if available. If not, then assume that a container in running state is stale if the other one is in created state. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
klihub
force-pushed
the
fixes/duplicate-name-mapping
branch
from
July 30, 2026 10:18
46f06f1 to
420f454
Compare
Collaborator
Author
|
@askervin Addressed review comments. Also the actual fix was missing to prevent re-allocation of resource for old instances of transient duplicates. Added it an updated the test case to verify that the internal post-allocated duplicate detection runs clean, never detecting any duplicate resource allocations. |
klihub
marked this pull request as ready for review
July 30, 2026 10:20
- If DEBUG_LOGGERS is not specified, configure the same debug loggers as earlier, with one exception. - Drop "nri-resource-policy" logger as there is no such a thing. Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
klihub
force-pushed
the
fixes/duplicate-name-mapping
branch
from
July 31, 2026 09:49
420f454 to
90ccaf8
Compare
Add an test case to trigger and test the handling of transient duplicate container disambiguation. Co-authored-by: Antti Kervinen <antti.kervinen@intel.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com> fixup: e2e: topology-aware test31 remaps on first try on fast servers improves reproducibility on first ry, fixes retrys
klihub
force-pushed
the
fixes/duplicate-name-mapping
branch
from
July 31, 2026 10:33
90ccaf8 to
02898ed
Compare
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.
This patch series improves container name to ID mapping, used for transient duplicate detection.
In particular, we now mark containers as exited during initial state synchronization with the runtime. This should prevent subsequent configuration updates from trying to allocate resources for both the old and the new instance, in case the old has not been removed yet. Also during initial sync, remove unmapped (disambiguated older duplicate) instances from the list of containers to be (re)allocated. This should prevent double accounting of resources for transient duplicates.
Additionally, when trying to detect transient stale duplicate containers for overlapping container create/crash/stop then re-create events, try to be smarter about which instance is the stale one. For a CreateContainer event always choose the old one. Otherwise for an initial sync, use the CreatedAt timestamps if available. If not, then assume that a container in running state is stale if the other one is in created state.
Finally, add a new e2e test case to trigger and test the handling of transient dupicates.