mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
WIP -- deprecating host node id
It represents which probe the _thing_ was seen from, but in many cases (container images, deployments, replicasets, services), it may have come from several probes. We have previously conflated it to determine which host a thing _lives on_, which it may not even have (deployments, replica sets, services), or it may have multiple (container images). The idea is to separate those two usages. We should convert HostNodeID to a set of HostNodeIDs, and use that to determine which probes have reported the thing. For determining which host a thing lives on we should use the Parents field which we already have, but might need extending to handle Endpoints/etc...
This commit is contained in:
@@ -112,8 +112,8 @@ func MapEndpoint2Pseudo(n report.Node, local report.Networks) report.Nodes {
|
||||
// It does not have enough info to do that, and the resulting graph
|
||||
// must be merged with a process graph to get that info.
|
||||
func MapEndpoint2Process(n report.Node, local report.Networks) report.Nodes {
|
||||
// Nodes without a hostid are treated as pseudo nodes
|
||||
if _, ok := n.Latest.Lookup(report.HostNodeID); !ok {
|
||||
// Nodes without a host are treated as pseudo nodes
|
||||
if _, ok := n.Parents.Lookup(report.Host); !ok {
|
||||
return MapEndpoint2Pseudo(n, local)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user