Send data for all interfaces for raw containers

This commit is contained in:
Victor Marmol 2015-06-08 09:58:34 -07:00
parent b923eff11c
commit 72df0cb098

View File

@ -305,15 +305,13 @@ func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error {
}
func (self *rawContainerHandler) GetStats() (*info.ContainerStats, error) {
var networkInterfaces []string
nd, err := self.GetRootNetworkDevices()
if err != nil {
return new(info.ContainerStats), err
}
if len(nd) != 0 {
// ContainerStats only reports stat for one network device.
// TODO(rjnagal): Handle multiple physical network devices.
networkInterfaces = []string{nd[0].Name}
networkInterfaces := make([]string, len(nd))
for i := range nd {
networkInterfaces[i] = nd[i].Name
}
stats, err := libcontainer.GetStats(self.cgroupManager, networkInterfaces)
if err != nil {