-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
I see the following error message in kubelet logs:
Jun 00 00:00:00 my-worker-node kubelet[XXXXXXX]: E0000 00:00:00.000000 2571634 info.go:99] Failed to get disk map: open /sys/block/nvme0c0n1/dev: no such file or directory
This error message matches cadvisor here:
Line 104 in b7e6727
| klog.Errorf("Failed to get disk map: %v", err) |
Looking for usages of /dev this is the culprit:
Line 208 in b7e6727
| dev, err := os.ReadFile(path.Join(blockDir, name, "/dev")) |
Full Stack:
Line 208 in b7e6727
dev, err := os.ReadFile(path.Join(blockDir, name, "/dev")) cadvisor/utils/sysinfo/sysinfo.go
Line 63 in b7e6727
dev, err := sysfs.GetBlockDeviceNumbers(name) Line 104 in b7e6727
klog.Errorf("Failed to get disk map: %v", err)
According to linux kernel source: the device name scheme means the device is in subsystem 0, controller 0, namespace 1
https://elixir.bootlin.com/linux/latest/source/drivers/nvme/host/core.c#L4361
This is a device for internal kernel usage only, and it's flagged as such with GENHD_FL_HIDDEN.
Therefore, it's probably wrong that cadvisor is trying to read this device. It should probably be ignored with a similar rule as here:
cadvisor/utils/sysinfo/sysinfo.go
Line 57 in b7e6727
| if strings.HasPrefix(name, "loop") || strings.HasPrefix(name, "ram") || strings.HasPrefix(name, "sr") { |
I'm not an NVMe expert. I've been told that this type of device might only be present when multipathing is enabled.
I'm also not sure what machine/info.go is doing with the information it gets from the block devices, so I'm not sure the impact here, other than there's a lot of errors in my kubelet log output.
Note that for _, disk := range disks { the err is return directly from the disk range, meaning other disks might not be gathered or inspected.