vendor: update google/cadvisor and opencontainers/runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
12
vendor/github.com/google/cadvisor/machine/machine.go
generated
vendored
12
vendor/github.com/google/cadvisor/machine/machine.go
generated
vendored
@@ -16,6 +16,7 @@
|
||||
package machine
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@@ -246,6 +247,17 @@ func getUniqueCPUPropertyCount(cpuBusPath string, propertyName string) int {
|
||||
}
|
||||
uniques := make(map[string]bool)
|
||||
for _, sysCPUPath := range sysCPUPaths {
|
||||
onlinePath := filepath.Join(sysCPUPath, "online")
|
||||
onlineVal, err := ioutil.ReadFile(onlinePath)
|
||||
if err != nil {
|
||||
klog.Warningf("Cannot determine CPU %s online state, skipping", sysCPUPath)
|
||||
continue
|
||||
}
|
||||
onlineVal = bytes.TrimSpace(onlineVal)
|
||||
if len(onlineVal) == 0 || onlineVal[0] != 49 {
|
||||
klog.Warningf("CPU %s is offline, skipping", sysCPUPath)
|
||||
continue
|
||||
}
|
||||
propertyPath := filepath.Join(sysCPUPath, sysFsCPUTopology, propertyName)
|
||||
propertyVal, err := ioutil.ReadFile(propertyPath)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user