Skip to content

Commit

Permalink
Merge pull request #2668 from weaveworks/2665-connection-pid-attribution
Browse files Browse the repository at this point in the history
ignore endpoints with >1 adjacency in process rendering

This eliminates the worst effects of #2665.
  • Loading branch information
rade authored Jun 30, 2017
2 parents e65c80d + 708931f commit c5b2c9d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions render/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ func MapEndpoint2Process(n report.Node, local report.Networks) report.Nodes {
return report.Nodes{}
}

if len(n.Adjacency) > 1 {
// We cannot be sure that the pid is associated with all the
// connections. It is better to drop such an endpoint than
// risk rendering bogus connections.
return report.Nodes{}
}

id := report.MakeProcessNodeID(report.ExtractHostID(n), pid)
node := NewDerivedNode(id, n).WithTopology(report.Process)
node.Latest = node.Latest.Set(process.PID, timestamp, pid)
Expand Down

0 comments on commit c5b2c9d

Please sign in to comment.