Don't report FS stats for system containers

This commit is contained in:
Tim St. Clair
2016-10-17 16:57:17 -07:00
parent 4a13431af3
commit bd80da5822
3 changed files with 9 additions and 6 deletions

View File

@@ -146,7 +146,11 @@ func (sb *summaryBuilder) build() (*stats.Summary, error) {
}
for sys, name := range systemContainers {
if info, ok := sb.infos[name]; ok {
nodeStats.SystemContainers = append(nodeStats.SystemContainers, sb.containerInfoV2ToStats(sys, &info))
sysCont := sb.containerInfoV2ToStats(sys, &info)
// System containers don't have a filesystem associated with them.
sysCont.Rootfs = nil
sysCont.Logs = nil
nodeStats.SystemContainers = append(nodeStats.SystemContainers, sysCont)
}
}