Closed patrickjahns closed 1 year ago
I having a same problem: lvm-driver:0.8.3
LVM version: 2.02.176(2) (2017-11-03)
Library version: 1.02.145 (2017-11-03)
Driver version: 4.41.0
any updates? we have exact same problem.
openebs/lvm-driver:1.0.0
Same problem with openebs/lvm-driver:1.1.0
What steps did you take and what happened:
Prometheus is no longer able to fetch metrics from a node. Checking the logs revelead the following errors in the logs
What did you expect to happen:
Scraping of prometheus metrics working without any issue.
Anything else you would like to add:
When the logical volume is split in several Segments (in this case 2),
ListLVMLogicalVolume
will return several entries. ( https://github.com/openebs/lvm-localpv/blob/develop/pkg/lvm/lvm_util.go#L854-L867 ) and since the prometheus collector only iterates over the results ( https://github.com/openebs/lvm-localpv/blob/develop/pkg/collector/lv_collector.go#L102 ) above error is shown.Compare it with lvdisplay
A
lvlscan
only shows one entry for the volumeSimilar issue was reported for a different project - see https://github.com/storaged-project/libblockdev/issues/667
Searching for
ListLVMLogicalVolume
revealed, that it is currently only used for the metrics. So I propose to either dedup the results fromListLVMLogicalVolume
or skip them within the loop in prometheus.If agreed upon, I can provide a PR with a fix for this issue