vendor: cadvisor v0.38.4
This commit is contained in:
8
vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go
generated
vendored
8
vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
2
vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go
generated
vendored
2
vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go
generated
vendored
@@ -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.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user