-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
2 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rade
Author
Member
|
||
} | ||
} | ||
return ret.result(endpoints) | ||
|
What changes now we don't do
MakeHostNodeID(ExtractHostID())
?