vendor: update google/cadvisor and opencontainers/runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
4
vendor/github.com/google/cadvisor/machine/info.go
generated
vendored
4
vendor/github.com/google/cadvisor/machine/info.go
generated
vendored
@@ -22,6 +22,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/google/cadvisor/fs"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/nvm"
|
||||
@@ -30,8 +32,6 @@ import (
|
||||
"github.com/google/cadvisor/utils/sysinfo"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const hugepagesDirectory = "/sys/kernel/mm/hugepages/"
|
||||
|
||||
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