From bbd6c5fe471fbd3d58202c9b93eeb9593ef0888b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 28 Dec 2017 01:15:39 +0000 Subject: [PATCH] don't propagate HostNodeID in endpoints2Hosts The HostNodeID is already the id of host nodes (as the name suggests), and that's what summarisation renders. Nothing looks at the HostNodeID metadata of host nodes. --- render/host.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/render/host.go b/render/host.go index 1e1e0b0a9e..10b8dc80d2 100644 --- a/render/host.go +++ b/render/host.go @@ -67,18 +67,12 @@ func (e endpoints2Hosts) Render(rpt report.Report) Nodes { for _, n := range endpoints.Nodes { // Nodes without a hostid are treated as pseudo nodes - if hostNodeID, timestamp, ok := n.Latest.LookupEntry(report.HostNodeID); !ok { + if hostNodeID, ok := n.Latest.Lookup(report.HostNodeID); !ok { if id, ok := pseudoNodeID(n, local); ok { ret.addChild(n, id, newPseudoNode) } } else { - id := report.MakeHostNodeID(report.ExtractHostID(n)) - ret.addChild(n, id, func(id string) report.Node { - // we have a hostNodeID, but no matching host node; - // create a new one rather than dropping the data - return newHostNode(id). - WithLatest(report.HostNodeID, timestamp, hostNodeID) - }) + ret.addChild(n, hostNodeID, newHostNode) } } return ret.result(endpoints)