Skip to content

Commit

Permalink
Merge pull request kubernetes#341 from vmarmol/err
Browse files Browse the repository at this point in the history
Report error while fetching network stats.
  • Loading branch information
vishh committed Dec 10, 2014
2 parents 65c872b + ff9a499 commit 5064ad4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion container/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 4 additions & 0 deletions container/libcontainer/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5064ad4

Please sign in to comment.