Ensure nova migration package is installed during minor update

Package management in puppet is disabled by default:
https://github.com/openstack/puppet-tripleo/blob/stable/newton/manifests/packages.pp

For a minor update we re-enable package management by setting enable_updates=true,
but only when there are updated packages available.

If the initial attempt to update fails it could have installed the updated packages
but not run the puppet manifest that install openstack-nova-migration. Subsequent
attempts to update will not resolve the issue as there are no longer updates available.

Change-Id: I4ea4b8def009ad11d8da7b82c365144fdd709e1e
This commit is contained in:
Oliver Walsh 2017-06-22 15:20:50 +01:00
parent eed982876f
commit a1e633c074
1 changed files with 9 additions and 0 deletions

View File

@ -33,6 +33,15 @@ if [[ -a "$timestamp_file" ]]; then
fi
touch "$timestamp_file"
# install openstack-nova-migration on computes prior to checking for updates
if hiera -c /etc/puppet/hiera.yaml service_names | grep -q nova_compute; then
echo "Checking openstack-nova-migration is installed"
if ! yum -q list installed openstack-nova-migration > /dev/null 2>&1; then
echo "Installing openstack-nova-migration"
yum -q -y install openstack-nova-migration
fi
fi
command_arguments=${command_arguments:-}
# yum check-update exits 100 if updates are available