From cb17ef221bdefea3625a22c19c6d8f5504441771 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 --- WHATS_NEW | 1 + scripts/blk_availability_systemd_red_hat.service.in | 2 +- scripts/lvm2_activation_generator_systemd_red_hat.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index bf03c490d..8489252d4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 3.0.0 ============= + Add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service. Reduce max concurrent aios to avoid EMFILE with many devices. Fix lvconvert conversion attempts to linear. Fix lvconvert raid0/raid0_meta -> striped regression. diff --git a/scripts/blk_availability_systemd_red_hat.service.in b/scripts/blk_availability_systemd_red_hat.service.in index 1198baa2a..9462072cc 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 b3d18d219..b75184127 100644 --- a/scripts/lvm2_activation_generator_systemd_red_hat.c +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c @@ -160,7 +160,7 @@ static int generate_unit(struct generator *gen, int unit) "SourcePath=/etc/lvm/lvm.conf\n" "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]);