Skip to contentSkip to conversation

master - dmeventd: lvm2 plugin uses envvar registry

PATCH Zdenek Kabelac 1 participant 1 message Oct 10, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=194eccf9254653f5085cc116954e7ffb0a759226
Commit:        194eccf9254653f5085cc116954e7ffb0a759226
Parent:        11d4e6388875f06e152a035290dc41df19dc79b6
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Aug 27 10:18:26 2018 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Oct 10 09:54:07 2018 +0200

dmeventd: lvm2 plugin uses envvar registry

Thin plugin started to use configuble setting to allow to configure usage of external scripts - however to read this value it needed to execute internal command as dmeventd itself has no access to lvm.conf and the API for dmeventd plugin has been kept stable.

The call of command itself was not normally 'a big issue' until users started to use higher number of monitored LVs and execution of command got stuck because other monitored resource already started to execute some other lvm2 command and become blocked waiting on VG lock.

This scenario revealed necesity to somehow avoid calling lvm2 command during resource registration - but this requires bigger changes - so meanwhile this patch tries to minimize the possibility to hit this race by obtaining any configurable setting just once - such patch is small and covers majority of problem - yet better solution needs to be introduced likely with bigger rework of dmeventd.

TODO: avoid blocking registration of resource with execution of lvm2 commands since those can get stuck waiting on mutexes.

---
 WHATS_NEW                                    |    1 +
 daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c |   49 ++++++++++++++++++++------
 2 files changed, 39 insertions(+), 11 deletions(-)
WHATS_NEW +1 -0
index a065a17..db5f212 100644
@@ -1,5 +1,6 @@
 Version 3.0.0
 =============
+  Add hot fix to avoiding locking collision when monitoring thin-pools.
   Allow raid4 -> linear conversion request.
   Fix lvconvert striped/raid0/raid0_meta -> raid6 regression.
   Add 'lvm2-activation-generator:' prefix for kmsg messages logged by generator.
daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +38 -11

74 lines not on this page · raw message