Update procfs library (#1640)
Bump procfs to latest release. Fixes: https://github.com/prometheus/node_exporter/issues/1625 Fixes: https://github.com/prometheus/node_exporter/issues/1634 Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
e49a13d0cf
commit
47610d0d2b
17 changed files with 345 additions and 64 deletions
4
vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go
generated
vendored
4
vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go
generated
vendored
|
|
@ -251,7 +251,7 @@ func parseInfiniBandCounters(portPath string) (*InfiniBandCounters, error) {
|
|||
name := filepath.Join(path, f.Name())
|
||||
value, err := util.SysReadFile(name)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
if os.IsNotExist(err) || os.IsPermission(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
continue
|
||||
}
|
||||
return nil, fmt.Errorf("failed to read file %q: %v", name, err)
|
||||
|
|
@ -334,7 +334,7 @@ func parseInfiniBandCounters(portPath string) (*InfiniBandCounters, error) {
|
|||
name := filepath.Join(path, f.Name())
|
||||
value, err := util.SysReadFile(name)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
if os.IsNotExist(err) || os.IsPermission(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
continue
|
||||
}
|
||||
return nil, fmt.Errorf("failed to read file %q: %v", name, err)
|
||||
|
|
|
|||
2
vendor/github.com/prometheus/procfs/sysfs/net_class.go
generated
vendored
2
vendor/github.com/prometheus/procfs/sysfs/net_class.go
generated
vendored
|
|
@ -119,7 +119,7 @@ func (nc NetClass) parseNetClassIface(devicePath string) (*NetClassIface, error)
|
|||
name := filepath.Join(devicePath, f.Name())
|
||||
value, err := util.SysReadFile(name)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
if os.IsNotExist(err) || os.IsPermission(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" {
|
||||
continue
|
||||
}
|
||||
return nil, fmt.Errorf("failed to read file %q: %v", name, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue