2018-06-01-stable - dmeventd: lvm2 plugin uses envvar registry
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a8d59404f7713ae4f9a3b172dd560ed1364d8bee Commit: a8d59404f7713ae4f9a3b172dd560ed1364d8bee Parent: a1a89a453f21e7359cea14dcf86920c1e3867ec3 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Aug 27 10:18:26 2018 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Sep 5 14:39:14 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_DM | 1 + daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c | 49 ++++++++++++++++++++------ 2 files changed, 39 insertions(+), 11 deletions(-)
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.151 - ============================== + Add hot fix to avoiding locking collision when monitoring thin-pools. Version 1.02.150 - 01 August 2018 =================================
daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +38 -11
74 lines not on this page · raw message