Merge "Ensure yum cache is ready before update"
authorJenkins <jenkins@review.openstack.org>
Tue, 18 Jul 2017 11:51:07 +0000 (11:51 +0000)
committerGerrit Code Review <review@openstack.org>
Tue, 18 Jul 2017 11:51:07 +0000 (11:51 +0000)
1  2 
extraconfig/tasks/yum_update.sh
puppet/services/openvswitch.yaml

@@@ -64,6 -64,9 +64,9 @@@ f
  
  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)
@@@ -93,7 -96,6 +96,7 @@@ if [[ "$pacemaker_status" == "active" ]
      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"
@@@ -103,9 -105,8 +106,9 @@@ f
  
  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"
@@@ -4,10 -4,6 +4,10 @@@ description: 
    Open vSwitch Configuration
  
  parameters:
 +  ServiceData:
 +    default: {}
 +    description: Dictionary packing service data
 +    type: json
    ServiceNetMap:
      default: {}
      description: Mapping of service_name -> network name. Typically set
@@@ -163,6 -159,8 +163,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.