vendor: cadvisor v0.38.4

This commit is contained in:
David Porter
2020-11-13 19:52:57 +00:00
parent ec734aced7
commit 8af7405f17
396 changed files with 73154 additions and 18510 deletions

View File

@@ -40,6 +40,7 @@ func init() {
// Unfortunately klog does not seem to work here. I believe it's better to
// output information using fmt rather then let it disappear silently.
fmt.Printf("libipmctl initialization failed with status %d", cErr)
return
}
isNVMLibInitialized = true
}
@@ -57,6 +58,11 @@ func getAvgPowerBudget() (uint, error) {
return uint(0), fmt.Errorf("Unable to get number of NVM devices. Status code: %d", err)
}
if count == 0 {
klog.Warningf("There are no NVM devices!")
return uint(0), nil
}
// Load basic device information for all the devices
// to obtain UID of the first one.
devices := make([]C.struct_device_discovery, count)
@@ -97,7 +103,7 @@ func GetInfo() (info.NVMInfo, error) {
nvmInfo := info.NVMInfo{}
if !isNVMLibInitialized {
klog.V(1).Info("libimpctl has not been initialized. NVM information will not be available")
klog.V(1).Info("libipmctl has not been initialized. NVM information will not be available")
return nvmInfo, nil
}

View File

@@ -30,5 +30,5 @@ func GetInfo() (info.NVMInfo, error) {
// Finalize un-initializes libipmctl. See https://github.com/google/cadvisor/issues/2457.
// When libipmctl is not available it just logs that it's being called.
func Finalize() {
klog.V(4).Info("libimpctl not available, doing nothing.")
klog.V(4).Info("libipmctl not available, doing nothing.")
}