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:
Matthias Radestock
2017-12-28 10:58:19 +00:00
parent 7ce160d492
commit 5d06f90f10
2 changed files with 1 additions and 2 deletions

View File

@@ -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}

View File

@@ -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}
}