mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
don't propagate HostNodeID in MapProcess2Container
...when creating Uncontained pseudo nodes. Summarisation of Uncontained/Umanaged only looks at the ID, which includes the HostNodeID. We adjust the promotion of Uncontained to Unmanaged, to operate on the ID instead of (re)extracting the hostID from the HostNodeID metadata. With that, nothing looks at the HostNodeID metadata of Uncontained/Unmanaged nodes.
This commit is contained in:
@@ -281,7 +281,6 @@ func MapProcess2Container(n report.Node) report.Nodes {
|
||||
} else {
|
||||
id = MakePseudoNodeID(UncontainedID, report.ExtractHostID(n))
|
||||
node = NewDerivedPseudoNode(id, n)
|
||||
node = propagateLatest(report.HostNodeID, n, node)
|
||||
node = propagateLatest(IsConnectedMark, n, node)
|
||||
}
|
||||
return report.Nodes{id: node}
|
||||
|
||||
@@ -139,7 +139,7 @@ func Map2Parent(
|
||||
return func(n report.Node) report.Nodes {
|
||||
// Uncontained becomes Unmanaged/whatever if noParentsPseudoID is set
|
||||
if noParentsPseudoID != "" && strings.HasPrefix(n.ID, UncontainedIDPrefix) {
|
||||
id := MakePseudoNodeID(noParentsPseudoID, report.ExtractHostID(n))
|
||||
id := MakePseudoNodeID(noParentsPseudoID, n.ID[len(UncontainedIDPrefix):])
|
||||
node := NewDerivedPseudoNode(id, n)
|
||||
return report.Nodes{id: node}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user