zbyszek / rpms / lvm2

Forked from rpms/lvm2 4 years ago
Clone
384fa07
 WHATS_NEW                                          | 2 ++
384fa07
 scripts/lvm2_monitoring_systemd_red_hat.service.in | 7 ++++---
384fa07
 2 files changed, 6 insertions(+), 3 deletions(-)
384fa07
384fa07
diff --git a/WHATS_NEW b/WHATS_NEW
384fa07
index d0e0cd4..7322e1c 100644
384fa07
--- a/WHATS_NEW
384fa07
+++ b/WHATS_NEW
384fa07
@@ -1,5 +1,7 @@
384fa07
 Version 2.02.99 - 
384fa07
 ===================================
384fa07
+  Don't use lvmetad in lvm2-monitor.service ExecStop to avoid a systemd issue.
384fa07
+  Depend on lvm2-lvmetad.socket in lvm2-monitor.service systemd unit.
384fa07
   Initialize lvmetad lazily to avoid early socket access on config overrides.
384fa07
   Hardcode use_lvmetad=0 if cluster locking used and issue a warning msg.
384fa07
 
384fa07
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
384fa07
index 6c4c55f..170309f 100644
384fa07
--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
384fa07
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
384fa07
@@ -1,8 +1,8 @@
384fa07
 [Unit]
384fa07
 Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
384fa07
 Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
384fa07
-Requires=dm-event.socket
384fa07
-After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service
384fa07
+Requires=dm-event.socket lvm2-lvmetad.socket
384fa07
+After=dm-event.socket lvm2-lvmetad.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-activation.service lvm2-lvmetad.service
384fa07
 Before=local-fs.target
384fa07
 DefaultDependencies=no
384fa07
 Conflicts=shutdown.target
384fa07
@@ -11,7 +11,8 @@ Conflicts=shutdown.target
384fa07
 Type=oneshot
384fa07
 Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
384fa07
 ExecStart=@sbindir@/lvm vgchange --monitor y
384fa07
-ExecStop=@sbindir@/lvm vgchange --monitor n
384fa07
+# The lvmetad must be disabled here, it needs https://bugzilla.redhat.com/show_bug.cgi?id=843587 to be resolved first.
57c5e36
+ExecStop=@sbindir@/lvm vgchange --monitor n --config 'global{use_lvmetad=0}'
384fa07
 RemainAfterExit=yes
384fa07
 
384fa07
 [Install]