aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig/tasks/yum_update.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/yum_update.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/yum_update.sh')
-rwxr-xr-xextraconfig/tasks/yum_update.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index 0c4a7928..8f804583 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"