Merge "Ensure yum cache is ready before update"
[apex-tripleo-heat-templates.git] / extraconfig / tasks / yum_update.sh
index 5f5daf2..a2a04e8 100755 (executable)
@@ -96,6 +96,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"
@@ -105,8 +106,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"