Stop services before upgrade only before Pike

Stopping the openstack, neutron and httpd services is
now executed within instack when executing 'openstack
undercloud upgrade' [0]

However, for backwards compatibility reasons we still
need to stop them when upgrading to a previous version.

[0] https://review.openstack.org/#/c/479081/

Change-Id: I5acd2b08b286071f3628617206d75574044adcb5
This commit is contained in:
Jose Luis Franco Arza 2017-10-10 17:20:42 +02:00 committed by Athlan-Guyot sofer
parent 9d7161ba18
commit 5ddfe22c66

View File

@ -2,16 +2,20 @@
set -eux
# Undercloud upgrade script.
# Those steps is for the major mariadb upgrade in mitaka
{% if target_upgrade_version in ['newton', 'ocata'] %}
# These steps have been added in Pike as a pre-upgrade entry point
# in instack, so they will be executed in 'openstack undercloud upgrade':
sudo systemctl stop 'openstack-*'
sudo systemctl stop 'neutron-*'
sudo systemctl stop httpd
#if you are going to do a backwards compatibility install save the old tht dir
# cp -r /usr/share/openstack-tripleo-heat-templates ~/tht
# update instack-undercloud and friends before running the upgrade
sudo yum -y update instack-undercloud openstack-puppet-modules openstack-tripleo-common python-tripleoclient
sudo yum -y update instack-undercloud openstack-puppet-modules openstack-tripleo-common
{% endif %}
sudo yum -y update python-tripleoclient
echo "Upgrade the undercloud"
openstack undercloud upgrade