Merge "Ensure yum cache is ready before update" into stable/ocata

This commit is contained in:
Jenkins 2017-07-19 21:24:12 +00:00 committed by Gerrit Code Review
commit 61477ce1d9
3 changed files with 7 additions and 0 deletions

View File

@ -301,6 +301,8 @@ function systemctl_swift {
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1635205
# Update condition and add --notriggerun for +bug/1669714
function special_case_ovs_upgrade_if_needed {
# Always ensure yum has full cache
yum makecache || echo "Yum makecache failed. This can cause failure later on."
if rpm -qa | grep "^openvswitch-2.5.0-14" || rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep "systemctl.*try-restart" ; then
echo "Manual upgrade of openvswitch - ovs-2.5.0-14 or restart in postun detected"
rm -rf OVS_UPGRADE

View File

@ -64,6 +64,9 @@ fi
command_arguments=${command_arguments:-}
# Always ensure yum has full cache
yum makecache || echo "Yum makecache failed. This can cause failure later on."
# yum check-update exits 100 if updates are available
set +e
check_update=$(yum check-update 2>&1)

View File

@ -31,6 +31,8 @@ outputs:
owner: root
group: root
mode: 0750
- name: Make yum cache.
command: yum makecache
- name: Download OVS packages.
command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch
- name: Get rpm list for manual upgrade of OVS.