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

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