mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
don't propagate ContainerHostname in MapContainer2Hostname
The container hostname is already the id of the node, and that's what summarisation renders. Nothing looks at the docker.ContainerHostname metadata of nodes in the ContainerHostname group topology.
This commit is contained in:
@@ -352,13 +352,12 @@ func MapContainer2Hostname(n report.Node) report.Nodes {
|
||||
|
||||
// Otherwise, if some some reason the container doesn't have a hostname
|
||||
// (maybe slightly out of sync reports), just drop it
|
||||
id, timestamp, ok := n.Latest.LookupEntry(docker.ContainerHostname)
|
||||
id, ok := n.Latest.Lookup(docker.ContainerHostname)
|
||||
if !ok {
|
||||
return report.Nodes{}
|
||||
}
|
||||
|
||||
node := NewDerivedNode(id, n).WithTopology(MakeGroupNodeTopology(n.Topology, docker.ContainerHostname))
|
||||
node.Latest = node.Latest.Set(docker.ContainerHostname, timestamp, id)
|
||||
node.Counters = node.Counters.Add(n.Topology, 1)
|
||||
return report.Nodes{id: node}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user