You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we could use file mtime or similar to invalidate the cache? It may even be worth removing the cache altogether, originally it was added because we ran udevadm but now we are just reading a file.
Relevant telegraf.conf:
System info:
Steps to reproduce:
lv-a
lv_a
lv-b
Expected behavior:
The new points should have the tag:
vg-1/lv-b
Actual behavior:
The new points will have the tag:
vg-1/lv-a
Additional info:
This is because linux reuse DM ID. Let's say that the first LV had the DM ID 39 its path would be
/dev/dm-39
.When deleting the LV, this dm ID will be freed. Thus linux can (and will) reuse it when we'll create another LV.
However since telegraf use a cache for the device infos (https://github.com/influxdata/telegraf/blob/master/plugins/inputs/diskio/diskio_linux.go#L33). It will always return the
lv-a
informations.A solution would be to track DM deletions (see if something is in the cache but not in the device list) and remove it from the cache.
The text was updated successfully, but these errors were encountered: