mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 3 years ago
Clone

Blame SOURCES/lvm2-2_02_182-scripts-add-After-rbdmap.service-to-lvm2-activation.patch

5e29a5
From 4484518f67dd41151571e0841ef13134abe39408 Mon Sep 17 00:00:00 2001
5e29a5
From: Peter Rajnoha <prajnoha@redhat.com>
5e29a5
Date: Thu, 30 Aug 2018 12:35:58 +0200
5e29a5
Subject: [PATCH 2/2] scripts: add After=rbdmap.service to
5e29a5
 {lvm2-activation-net,blk-availability}.service
5e29a5
5e29a5
We need to have Ceph RBD devices mapped first before use in a stack
5e29a5
where LVM is on top so make sure rbdmap.service is called before
5e29a5
generated lvm2-activation-net.service.
5e29a5
5e29a5
On shutdown, we need to stop blk-availability first before we stop the
5e29a5
rbdmap.service.
5e29a5
5e29a5
Resolves: rhbz1623479
5e29a5
(cherry picked from commit cb17ef221bdefea3625a22c19c6d8f5504441771)
5e29a5
5e29a5
Conflicts:
5e29a5
	WHATS_NEW
5e29a5
5e29a5
(cherry picked from commit 3374a592502ef099d38491b0c2020a6945d825b1)
5e29a5
5e29a5
Conflicts:
5e29a5
	WHATS_NEW
5e29a5
---
5e29a5
 WHATS_NEW                                           | 2 ++
5e29a5
 scripts/blk_availability_systemd_red_hat.service.in | 2 +-
5e29a5
 scripts/lvm2_activation_generator_systemd_red_hat.c | 2 +-
5e29a5
 3 files changed, 4 insertions(+), 2 deletions(-)
5e29a5
5e29a5
diff --git a/WHATS_NEW b/WHATS_NEW
5e29a5
index 92e5c04..9da40b6 100644
5e29a5
--- a/WHATS_NEW
5e29a5
+++ b/WHATS_NEW
5e29a5
@@ -1,9 +1,11 @@
5e29a5
 Version 2.02.182 - 
5e29a5
 ==============================
5e29a5
+  Add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service.
5e29a5
   Fix lvconvert conversion attempts to linear.
5e29a5
   Fix lvconvert raid0/raid0_meta -> striped regression.
5e29a5
   Fix lvconvert --splitmirror for mirror type (2.02.178).
5e29a5
   Do not pair cache policy and cache metadata format.
5e29a5
+  Fix mirrors honoring read_only_volume_list.
5e29a5
 
5e29a5
 Version 2.02.181 - 
5e29a5
 =================================
5e29a5
diff --git a/scripts/blk_availability_systemd_red_hat.service.in b/scripts/blk_availability_systemd_red_hat.service.in
5e29a5
index 1198baa..9462072 100644
5e29a5
--- a/scripts/blk_availability_systemd_red_hat.service.in
5e29a5
+++ b/scripts/blk_availability_systemd_red_hat.service.in
5e29a5
@@ -1,6 +1,6 @@
5e29a5
 [Unit]
5e29a5
 Description=Availability of block devices
5e29a5
-After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service
5e29a5
+After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service
5e29a5
 DefaultDependencies=no
5e29a5
 Conflicts=shutdown.target
5e29a5
 
5e29a5
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
5e29a5
index 0f7f89c..487582f 100644
5e29a5
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
5e29a5
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
5e29a5
@@ -128,7 +128,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed)
5e29a5
 	      "DefaultDependencies=no\n", f);
5e29a5
 
5e29a5
 	if (unit == UNIT_NET) {
5e29a5
-		fprintf(f, "After=%s iscsi.service fcoe.service\n"
5e29a5
+		fprintf(f, "After=%s iscsi.service fcoe.service rbdmap.service\n"
5e29a5
 			"Before=remote-fs-pre.target shutdown.target\n\n"
5e29a5
 			"[Service]\n"
5e29a5
 			"ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]);
5e29a5
-- 
5e29a5
1.8.3.1
5e29a5