diff --git a/SOURCES/bz1972236-LVM-activate-fix-drop-in.patch b/SOURCES/bz1972236-LVM-activate-fix-drop-in.patch new file mode 100644 index 0000000..272b16a --- /dev/null +++ b/SOURCES/bz1972236-LVM-activate-fix-drop-in.patch @@ -0,0 +1,39 @@ +From 5729c79c6ab06f3dacf1fe8dafab9403e5560e34 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 20 May 2021 10:14:49 +0200 +Subject: [PATCH] LVM-activate: fix drop-in check to avoid re-creating drop-in + file when it already exists + +--- + heartbeat/LVM-activate | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/heartbeat/LVM-activate b/heartbeat/LVM-activate +index a8e40dce4..53223367e 100755 +--- a/heartbeat/LVM-activate ++++ b/heartbeat/LVM-activate +@@ -820,17 +820,14 @@ lvm_start() { + if systemd_is_running ; then + # Create drop-in to deactivate VG before stopping + # storage services during shutdown/reboot. +- after=$(systemctl show resource-agents-deps.target.d \ +- --property=After | cut -d'=' -f2) +- +- case "$after" in +- *" blk-availability.service "*) +- ;; +- *) +- systemd_drop_in "99-LVM-activate" "After" \ ++ systemctl show resource-agents-deps.target \ ++ --property=After | cut -d'=' -f2 | \ ++ grep -qE "(^|\s)blk-availability.service(\s|$)" ++ ++ if [ "$?" -ne 0 ]; then ++ systemd_drop_in "99-LVM-activate" "After" \ + "blk-availability.service" +- ;; +- esac ++ fi + + # If blk-availability isn't started, the "After=" + # directive has no effect. diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index bdff36f..3ee8b95 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -70,7 +70,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.1.1 -Release: 90%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.6 +Release: 90%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.7 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -271,6 +271,7 @@ Patch179: bz1940363-2-bundle-disable-validate-with.patch Patch180: bz1943093-aws-vpc-move-ip-add-ENI-lookup.patch Patch181: bz1973035-podman-fix-container-creation-race.patch Patch182: bz1986868-podman-return-not-running-probe.patch +Patch183: bz1972236-LVM-activate-fix-drop-in.patch # bundle patches Patch1000: 7-gcp-bundled.patch @@ -609,6 +610,7 @@ exit 1 %patch180 -p1 -F2 %patch181 -p1 %patch182 -p1 +%patch183 -p1 chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate @@ -1172,6 +1174,11 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Tue Aug 3 2021 Oyvind Albrigtsen - 4.1.1-90.7 +- LVM-activate: fix drop-in check to avoid re-creating drop-in + + Resolves: rhbz#1972236 + * Wed Jul 28 2021 Oyvind Albrigtsen - 4.1.1-90.6 - podman: return NOT_RUNNING when monitor cmd fails