correct determination of a host's container images #2680
Merged
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 same container image may be in use on multiple hosts. The latest-map
HostNodeID
of a node in theContainerImage
topology is therefore meaningless - it gets set to whatever host reported that image last in the time window covered by the report. Hence using it as a basis for mapping to hosts, as we did, a) fails to associate images with all the right hosts (hence they are missing from the host details panel), and b) causes that association to change semi-randomly (hence the list in the details panel is unstable).By contrast, the host topology parents of container image nodes is the complete set of all hosts the image is used on. So making that the basis for mapping fixes the problem.
The same technique - mapping based on host parents rather than latest-map
HostNodeID
- also works for the other nodes we are mapping: processes, containers and pods. So we might as well use it theretoo. That's also what
Map2Parent
does in other topology renderers.Fixes #2629.