update to support newest libcontainer update
This commit is contained in:
parent
d1a2842b28
commit
b74d2c6296
@ -30,7 +30,7 @@ func GetStats(cgroup *cgroups.Cgroup, state *libcontainer.State) (*info.Containe
|
||||
stats := &libcontainer.ContainerStats{}
|
||||
|
||||
var err error
|
||||
stats.CgroupStats, err = cgroupfs.GetStats(cgroup)
|
||||
stats.CgroupStats, err = cgroupfs.GetStats(state.CgroupPaths)
|
||||
if err != nil {
|
||||
return &info.ContainerStats{}, err
|
||||
}
|
||||
@ -43,14 +43,6 @@ func GetStats(cgroup *cgroups.Cgroup, state *libcontainer.State) (*info.Containe
|
||||
return toContainerStats(stats), nil
|
||||
}
|
||||
|
||||
func GetStatsCgroupOnly(cgroup *cgroups.Cgroup) (*info.ContainerStats, error) {
|
||||
s, err := cgroupfs.GetStats(cgroup)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return toContainerStats(&libcontainer.ContainerStats{CgroupStats: s}), nil
|
||||
}
|
||||
|
||||
func DiskStatsCopy(blkio_stats []cgroups.BlkioStatEntry) (stat []info.PerDiskStats) {
|
||||
if len(blkio_stats) == 0 {
|
||||
return
|
||||
|
@ -252,7 +252,6 @@ func (self *rawContainerHandler) GetStats() (*info.ContainerStats, error) {
|
||||
NetworkState: network.NetworkState{
|
||||
VethHost: self.networkInterface.VethHost,
|
||||
VethChild: self.networkInterface.VethChild,
|
||||
NsPath: "unknown",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user