aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/tasks/pacemaker_common_functions.sh
diff options
context:
space:
mode:
authormarios <marios@redhat.com>2017-07-13 16:11:13 +0300
committermarios <marios@redhat.com>2017-07-13 16:25:52 +0300
commit839c0b111651b8f5a1608f179781707b78dbacaa (patch)
tree2131f5bc822ebc90461374a2b5e63fb6b5feaa7b /extraconfig/tasks/pacemaker_common_functions.sh
parent156ed04010b456701af2a626eefc89a4dd25e79b (diff)
Adds check for existing yum process during the legacy minor update
Checks for an existing /var/run/yum.pid and exit 1 with an error message saying why. Change-Id: I374eeb4164a8007ae67fea2796eac109fffdef97 Closes-Bug: 1704131
Diffstat (limited to 'extraconfig/tasks/pacemaker_common_functions.sh')
-rwxr-xr-xextraconfig/tasks/pacemaker_common_functions.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh
index d1dd5d1d..367f50d7 100755
--- a/extraconfig/tasks/pacemaker_common_functions.sh
+++ b/extraconfig/tasks/pacemaker_common_functions.sh
@@ -371,3 +371,15 @@ function fixup_wrong_ipv6_vip {
fi
)
}
+
+# https://bugs.launchpad.net/tripleo/+bug/1704131 guard against yum update
+# waiting for an existing process until the heat stack time out
+function check_for_yum_lock {
+ if [[ -f /var/run/yum.pid ]] ; then
+ ERR="ERROR existing yum.pid detected - can't continue! Please ensure
+there is no other package update process for the duration of the minor update
+worfklow. Exiting."
+ echo $ERR
+ exit 1
+ fi
+}