aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-14 00:33:58 +0000
committerGerrit Code Review <review@openstack.org>2017-07-14 00:33:58 +0000
commitc031108b9ac358042f726c1745be4151eca4a812 (patch)
tree7423595e6e46ac7140538e774cf5264f99d15b2d /extraconfig
parentfb5eb77331006fe34991189b1f84c3ebb6c00132 (diff)
parent839c0b111651b8f5a1608f179781707b78dbacaa (diff)
Merge "Adds check for existing yum process during the legacy minor update"
Diffstat (limited to 'extraconfig')
-rwxr-xr-xextraconfig/tasks/pacemaker_common_functions.sh12
-rwxr-xr-xextraconfig/tasks/yum_update.sh4
2 files changed, 15 insertions, 1 deletions
diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh
index d1dd5d1..367f50d 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
+}
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index 0c4a792..8f80458 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -93,6 +93,7 @@ if [[ "$pacemaker_status" == "active" ]] ; then
fi
else
echo "Upgrading openstack-puppet-modules and its dependencies"
+ check_for_yum_lock
yum -q -y update openstack-puppet-modules
yum deplist openstack-puppet-modules | awk '/dependency/{print $2}' | xargs yum -q -y update
echo "Upgrading other packages is handled by config management tooling"
@@ -102,8 +103,9 @@ fi
command=${command:-update}
full_command="yum -q -y $command $command_arguments"
-echo "Running: $full_command"
+echo "Running: $full_command"
+check_for_yum_lock
result=$($full_command)
return_code=$?
echo "$result"