Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct determination of a host's container images #2680

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

rade
Copy link
Member

@rade rade commented Jul 5, 2017

The same container image may be in use on multiple hosts. The latest-map HostNodeID of a node in the ContainerImage 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 there
too. That's also what Map2Parent does in other topology renderers.

Fixes #2629.

The same container image may be in use on multiple hosts. The
latest-map HostNodeID of a node in the ContainerImage 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 there
too. That's also what Map2Parent does in other topology renderers.

Fixes #2629.
Copy link
Contributor

@ekimekim ekimekim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorely tempted to refactor this into Map2Parent, but the little inconsistences (handling of pseudo nodes, children propagation) add up...

@rade
Copy link
Member Author

rade commented Jul 5, 2017

I'm sorely tempted to refactor this into Map2Parent

Believe me, I tried.

@rade rade merged commit fd4f1f9 into master Jul 5, 2017
@dlespiau dlespiau deleted the 2629-host-image-list branch November 2, 2017 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

container image list in host details panel is incomplete
2 participants