From 6f4a1f16664b5778640914fc84db2f9e5d3c706b Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 30 Aug 2018 12:35:58 +0200 Subject: [PATCH] scripts: add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service We need to have Ceph RBD devices mapped first before use in a stack where LVM is on top so make sure rbdmap.service is called before generated lvm2-activation-net.service. On shutdown, we need to stop blk-availability first before we stop the rbdmap.service. Resolves: rhbz1623479 (cherry picked from commit cb17ef221bdefea3625a22c19c6d8f5504441771) Conflicts: WHATS_NEW (cherry picked from commit 366cb811c9ae94cb2777dde07fbda5763d807297) Conflicts: WHATS_NEW --- WHATS_NEW | 4 ++++ scripts/blk_availability_systemd_red_hat.service.in | 2 +- scripts/lvm2_activation_generator_systemd_red_hat.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 776c739..7b236c6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,3 +1,7 @@ +Version 2.02.182 - +============================== + Add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service. + Version 2.02.178 - ===================================== Do not report LV as remotely active when it's locally exclusive in cluster. diff --git a/scripts/blk_availability_systemd_red_hat.service.in b/scripts/blk_availability_systemd_red_hat.service.in index 1198baa..9462072 100644 --- a/scripts/blk_availability_systemd_red_hat.service.in +++ b/scripts/blk_availability_systemd_red_hat.service.in @@ -1,6 +1,6 @@ [Unit] Description=Availability of block devices -After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service +After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service DefaultDependencies=no Conflicts=shutdown.target diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c index 0f7f89c..487582f 100644 --- a/scripts/lvm2_activation_generator_systemd_red_hat.c +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c @@ -128,7 +128,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed) "DefaultDependencies=no\n", f); if (unit == UNIT_NET) { - fprintf(f, "After=%s iscsi.service fcoe.service\n" + fprintf(f, "After=%s iscsi.service fcoe.service rbdmap.service\n" "Before=remote-fs-pre.target shutdown.target\n\n" "[Service]\n" "ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]); -- 1.8.3.1