Report error while fetching network stats.
This commit is contained in:
parent
65c872bd8e
commit
ff9a4995a1
@ -60,8 +60,10 @@ func NewContainerHandler(name string) (ContainerHandler, error) {
|
||||
glog.V(1).Infof("Error trying to work out if we can hande %s: %v", name, err)
|
||||
}
|
||||
if canHandle {
|
||||
glog.V(1).Infof("Using factory %q for container %q", factory.String(), name)
|
||||
glog.V(1).Infof("Using factory %q for container %q", factory, name)
|
||||
return factory.NewContainerHandler(name)
|
||||
} else {
|
||||
glog.V(1).Infof("Factory %q was unable to handle container %q", factory, name)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,10 @@ func GetStats(cgroup *cgroups.Cgroup, state *libcontainer.State) (*info.Containe
|
||||
}
|
||||
|
||||
stats.NetworkStats, err = network.GetStats(&state.NetworkState)
|
||||
if err != nil {
|
||||
return &info.ContainerStats{}, err
|
||||
}
|
||||
|
||||
return toContainerStats(stats), nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user