Show Table of Contents
4.2. Upgrading OpenStack by Updating Service Individually, With Live Compute in an HA Environment
This section describes the steps you should follow to upgrade your cloud deployment by updating one service at a time with live compute in a High Availability (HA) environment.
- Pre-upgrade tasks:On all of your hosts:
- If you are running
Puppetas configured by Staypuft, you must disable it:#systemctl stop puppet#systemctl disable puppetThis ensures that the Staypuft-configured puppet will not revert changes made as part of the upgrade process. - Install the yum repository for Red Hat Enterprise Linux OpenStack Platform 7 (Kilo).
- Manually upgrade all the python packages.
#yum upgrade python* - Upgrade the
openstack-selinuxpackage, if available:#yum upgrade openstack-selinuxThis is necessary to ensure that the upgraded services will run correctly on a system with SELinux enabled.
- Service upgrades:Upgrade each of your services. The following is a reasonable order in which to perform the upgrades on your controllers:Upgrade MariaDB:Perform the follow steps on each host running MariaDB. Complete the steps on one host before starting the process on another host.
- Stop the service from running on the local node:
#pcs resource ban galera-master $(crm_node -n) - Wait until
pcs statusshows that the service is no longer running on the local node. This may take a few minutes. The local node will first transition to slave mode:Master/Slave Set: galera-master [galera] Masters: [ pcmk-mac525400aeb753 pcmk-mac525400bab8ae ] Slaves: [ pcmk-mac5254004bd62f ]
It will eventually transition to stopped:Master/Slave Set: galera-master [galera] Masters: [ pcmk-mac525400aeb753 pcmk-mac525400bab8ae ] Stopped: [ pcmk-mac5254004bd62f ]
- Upgrade the relevant packages.
#yum upgrade '*mariadb*' '*galera*' - Allow Pacemaker to schedule the
galeraresource on the local node:#pcs resource clear galera-master - Wait until
pcs statusshows that the galera resource is running on the local node as a master. The output frompcs statusshould include something like:Master/Slave Set: galera-master [galera] Masters: [ pcmk-mac5254004bd62f pcmk-mac525400aeb753 pcmk-mac525400bab8ae ]
Upgrade MongoDB:- Remove the
mongodresource from Pacemaker's control:#pcs resource unmanage mongod-clone - Stop the service on all of your controllers. On each controller, run:
#systemctl stop mongod - Upgrade the relevant packages:
#yum upgrade 'mongodb*' 'python-pymongo*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Restart the
mongodservice on your controllers by running, on each controller:#systemctl start mongod - Clean up the resource to Pacemaker control:
#pcs resource cleanup mongod-clone - Return the resource to Pacemaker control:
#pcs resource manage mongod-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Identity service (keystone):- Remove Identity service from Pacemaker's control:
#pcs resource unmanage keystone-clone - Stop the Identity service by running the following on each of your controllers:
#systemctl stop openstack-keystone - Upgrade the relevant packages:
#yum upgrade 'openstack-keystone*' 'python-keystone*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - In the RHEL OpenStack Platform 7 (Kilo) release, the location of the token persistence backends has changed. You need to update the
driveroption in the[token]section of thekeystone.conf. To do this, replace any instance ofkeystone.token.backendswithkeystone.token.persistence.backends.#sed -i 's/keystone.token.backends/keystone.token.persistence.backends/g' \/etc/keystone/keystone.confPackage updates may include newsystemdunit files, so ensure thatsystemdis aware of any updated files.#systemctl daemon-reload - Earlier versions of the installer may not have configured your system to automatically purge expired Keystone token, it is possible that your token table has a large number of expired entries. This can dramatically increase the time it takes to complete the database schema upgrade.To flush expired tokens from the database and alleviate the problem, the
keystone-managecommand can be used before running the Identity database upgrade.This will flush expired tokens from the database. You can arrange to run this command periodically (e.g., daily) usingcron.#keystone-manage token_flush - Update the Identity service database schema:
#openstack-db --service keystone --update - Restart the service by running the following on each of your controllers:
#systemctl start openstack-keystone - Clean up the Identity service using Pacemaker:
#pcs resource cleanup keystone-clone - Return the resource to Pacemaker control:
#pcs resource manage keystone-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Image service (glance):- Stop the Image service resources in Pacemaker:
#pcs resource disable glance-registry-clone#pcs resource disable glance-api-clone - Wait until the output of
pcs statusshows that both services have stopped running. - Upgrade the relevant packages:
#yum upgrade 'openstack-glance*' 'python-glance*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Update the Image service database schema:
#openstack-db --service glance --update - Clean up the Image service using Pacemaker:
#pcs resource cleanup glance-api-clone#pcs resource cleanup glance-registry-clone - Restart Image service resources in Pacemaker:
#pcs resource enable glance-api-clone#pcs resource enable glance-registry-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Block Storage service (cinder):- Stop all Block Storage service resources in Pacemaker:
#pcs resource disable cinder-api-clone#pcs resource disable cinder-scheduler-clone#pcs resource disable cinder-volume - Wait until the output of
pcs statusshows that the above services have stopped running. - Upgrade the relevant packages:
#yum upgrade 'openstack-cinder*' 'python-cinder*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Update the Block Storage service database schema:
#openstack-db --service cinder --update - Clean up the Block Storage service using Pacemaker:
#pcs resource cleanup cinder-volume#pcs resource cleanup cinder-scheduler-clone#pcs resource cleanup cinder-api-clone - Restart all Block Storage service resources in Pacemaker:
#pcs resource enable cinder-volume#pcs resource enable cinder-scheduler-clone#pcs resource enable cinder-api-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Orchestration (heat):- Stop Orchestration resources in Pacemaker:
#pcs resource disable heat-api-clone#pcs resource disable heat-api-cfn-clone#pcs resource disable heat-api-cloudwatch-clone#pcs resource disable heat - Wait until the output of
pcs statusshows that the above services have stopped running. - Upgrade the relevant packages:
#yum upgrade 'openstack-heat*' 'python-heat*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Update the Orchestration database schema:
#openstack-db --service heat --update - Clean up the Orchestration service using Pacemaker:
#pcs resource cleanup heat#pcs resource cleanup heat-api-cloudwatch-clone#pcs resource cleanup heat-api-cfn-clone#pcs resource cleanup heat-api-clone - Restart Orchestration resources in Pacemaker:
#pcs resource enable heat#pcs resource enable heat-api-cloudwatch-clone#pcs resource enable heat-api-cfn-clone#pcs resource enable heat-api-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Telemetry (ceilometer):- Stop all Telemetry resources in Pacemaker:
#pcs resource disable openstack-ceilometer-central#pcs resource disable openstack-ceilometer-api-clone#pcs resource disable openstack-ceilometer-alarm-evaluator-clone#pcs resource disable openstack-ceilometer-collector-clone#pcs resource disable openstack-ceilometer-notification-clone#pcs resource disable openstack-ceilometer-alarm-notifier-clone#pcs resource disable ceilometer-delay-clone - Wait until the output of
pcs statusshows that the above services have stopped running. - Upgrade the relevant packages:
#yum upgrade 'openstack-ceilometer*' 'python-ceilometer*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - If you are using the MySQL backend for Telemetry, update the Telemetry database schema.
#openstack-db --service ceilometer --updateNote
This step is not necessary of you are using the MongoDB backend. - Clean up the Telemetry service using Pacemaker:
#pcs resource cleanup ceilometer-delay-clone#pcs resource cleanup openstack-ceilometer-alarm-notifier-clone#pcs resource cleanup openstack-ceilometer-notification-clone#pcs resource cleanup openstack-ceilometer-collector-clone#pcs resource cleanup openstack-ceilometer-alarm-evaluator-clone#pcs resource cleanup openstack-ceilometer-api-clone#pcs resource cleanup openstack-ceilometer-central - Restart all Telemetry resources in Pacemaker:
#pcs resource enable ceilometer-delay-clone#pcs resource enable openstack-ceilometer-alarm-notifier-clone#pcs resource enable openstack-ceilometer-notification-clone#pcs resource enable openstack-ceilometer-collector-clone#pcs resource enable openstack-ceilometer-alarm-evaluator-clone#pcs resource enable openstack-ceilometer-api-clone#pcs resource enable openstack-ceilometer-central - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Compute (nova):- Stop all Compute resources in Pacemaker:
#pcs resource disable openstack-nova-novncproxy-clone#pcs resource disable openstack-nova-consoleauth-clone#pcs resource disable openstack-nova-conductor-clone#pcs resource disable openstack-nova-api-clone#pcs resource disable openstack-nova-scheduler-clone - Wait until the output of
pcs statusshows that the above services have stopped running. - Upgrade the relevant packages:
#yum upgrade 'openstack-nova*' 'python-nova*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Update the Compute database schema:
#openstack-db --service nova --updateAfter fully upgrading to Kilo (i.e. all nodes are running Kilo), you should start a background migration of flavor information. Kilo conductor nodes will do this on the fly when necessary, but the rest of the idle data needs to be migrated in the the background. Run the following command as anovauser:#runuser -u nova -- nova-manage db migrate_flavor_data - If you are performing a rolling upgrade of your compute hosts you need to set explicit API version limits to ensure compatibility between your Juno and Kilo environments.Before starting Kilo controller or compute services, you need to set the
computeoption in the[upgrade_levels]section ofnova.conftojuno:#crudini --set /etc/nova/nova.conf upgrade_levels compute junoYou will need to first unmanage the Compute resources by runningpcs resource unmanageon one of your controllers:#pcs resource unmanage openstack-nova-novncproxy-clone#pcs resource unmanage openstack-nova-consoleauth-clone#pcs resource unmanage openstack-nova-conductor-clone#pcs resource unmanage openstack-nova-api-clone#pcs resource unmanage openstack-nova-scheduler-cloneRestart all the services on all controllers:#openstack-service restart novaYou should return control to the Pacemaker after upgrading all of your compute hosts to OpenStack Kilo.#pcs resource manage openstack-nova-scheduler-clone#pcs resource manage openstack-nova-api-clone#pcs resource manage openstack-nova-conductor-clone#pcs resource manage openstack-nova-consoleauth-clone#pcs resource manage openstack-nova-novncproxy-clone - Clean up all Compute resources in Pacemaker:
#pcs resource cleanup openstack-nova-scheduler-clone#pcs resource cleanup openstack-nova-api-clone#pcs resource cleanup openstack-nova-conductor-clone#pcs resource cleanup openstack-nova-consoleauth-clone#pcs resource cleanup openstack-nova-novncproxy-clone - Restart all Compute resources in Pacemaker:
#pcs resource enable openstack-nova-scheduler-clone#pcs resource enable openstack-nova-api-clone#pcs resource enable openstack-nova-conductor-clone#pcs resource enable openstack-nova-consoleauth-clone#pcs resource enable openstack-nova-novncproxy-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade OpenStack Networking (neutron):- Prevent Pacemaker from triggering the OpenStack Networking cleanup scripts:
#pcs resource unmanage neutron-ovs-cleanup-clone#pcs resource unmanage neutron-netns-cleanup-clone - Stop OpenStack Networking resources in Pacemaker:
#pcs resource disable neutron-server-clone#pcs resource disable neutron-openvswitch-agent-clone#pcs resource disable neutron-dhcp-agent-clone#pcs resource disable neutron-l3-agent-clone#pcs resource disable neutron-metadata-agent-clone - Upgrade the relevant packages
#yum upgrade 'openstack-neutron*' 'python-neutron*' - Install packages for the advanced Openstack Networking services enabled in the
neutron.conffile, for example,openstack-neutron-vpnaas,openstack-neutron-fwaasandopenstack-neutron-lbaas.#yum install openstack-neutron-vpnaas#yum install openstack-neutron-fwaas#yum install openstack-neutron-lbaasInstalling these packages will create the corresponding configuration files. - For the VPNaaS, LBaaS service entries in the
neutron.conffile, copy theservice_providerentries to the correspondingneutron-*aas.conffile located in/etc/neutronand comment these entries from theneutron.conffile.For the FWaaS service entry, theservice_providerparameters should remain in theneutron.conffile. - On every node that runs the LBaaS agents, install the
openstack-neutron-lbaaspackage.#yum install openstack-neutron-lbaas - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Update the OpenStack Networking database schema:
#openstack-db --service neutron --update - Once you have completed upgrading the OpenStack Networking service, you need to edit the
rootwrap dhcp.filterconfiguration file.To do so, in the/usr/share/neutron/rootwrap/dhcp.filtersfile, replace the value ofdnsmasq. For example, replace:dnsmasq: EnvFilter, env, root, CONFIG_FILE=, NETWORK_ID=, dnsmasq
withdnsmasq: CommandFilter, dnsmasq, root
- Clean up OpenStack Networking resources in Pacemaker:
#pcs resource cleanup neutron-metadata-agent-clone#pcs resource cleanup neutron-l3-agent-clone#pcs resource cleanup neutron-dhcp-agent-clone#pcs resource cleanup neutron-openvswitch-agent-clone#pcs resource cleanup neutron-server-clone - Restart OpenStack Networking resources in Pacemaker:
#pcs resource enable neutron-metadata-agent-clone#pcs resource enable neutron-l3-agent-clone#pcs resource enable neutron-dhcp-agent-clone#pcs resource enable neutron-openvswitch-agent-clone#pcs resource enable neutron-server-clone - Return the cleanup agents to Pacemaker control:
#pcs resource manage neutron-ovs-cleanup-clone#pcs resource manage neutron-netns-cleanup-clone - Wait until the output of
pcs statusshows that the above resources are running.
Upgrade Dashboard (horizon):- Stop the Dashboard resource in Pacemaker:
#pcs resource disable horizon-clone - Wait until the output of
pcs statusshows that the service has stopped running. - Upgrade the relevant packages:
#yum upgrade httpd 'openstack-dashboard*' 'python-django*' - Reload
systemdto account for updated unit files:#systemctl daemon-reload - Correct the Dashboard configuration:Fix Apache Configuration:The
openstack-dashboardpackage installs/etc/httpd/conf.d/openstack-dashboard.conffile, but the Staypuft installer replaces this with the/etc/httpd/conf.d/15-horizon_vhost.conffile. After upgrading horizon, you will have the following configuration files:15-horizon_vhost.confopenstack-dashboard.confopenstack-dashboard.conf.rpmnew
Ensure you make the following changes:- Remove the
openstack-dashboard.conf.rpmnewfile:#rm openstack-dashboard.conf.rpmnew - Modify the
15-horizon_vhost.conffile by replacing:Alias /static "/usr/share/openstack-dashboard/static"
withAlias /dashboard/static "/usr/share/openstack-dashboard/static"
Fix Dashboard Configuration:Theopenstack-dashboardpackage installs the/etc/openstack-dashboard/local_settingsfile. After an upgrade, you will find the following configuration files:/etc/openstack-dashboard/local_settings/etc/openstack-dashboard/local_settings.rpmnew
Ensure you make the following changes:- Backup your existing
local_settingsfile:#cp local_settings local_settings.old - Rename the
local_settings.rpmnewfile tolocal_settingsfile:#mv local_settings.rpmnew local_settings - Replace the following configuration options with the corresponding value from your
local_settings.oldfile:- ALLOWED_HOSTS
- SECRET_KEY
- CACHES
- OPENSTACK_KEYSTONE_URL
- Restart the web server on all your controllers to apply all changes:
#service httpd restart
- Clean up the Dashboard resource in Pacemaker:
#pcs resource cleanup horizon-clone - Restart the Dashboard resource in Pacemaker:
#pcs resource enable horizon-clone - Wait until the output of
pcs statusshows that the above resource is running.
Upgrade Compute hosts (nova):On each compute host:- Stop all OpenStack services on the host:
#openstack-service stop - Upgrade all packages:
#yum upgrade - If you are performing a rolling upgrade of your compute hosts you need to set explicit API version limits to ensure compatibility between your Juno and Kilo environments.Before starting Kilo controller or compute services, you need to set the
computeoption in the[upgrade_levels]section ofnova.conftojuno:#crudini --set /etc/nova/nova.conf upgrade_levels compute junoYou need to make this change on your controllers and on your compute hosts. - Start all openstack services on the host:
#openstack-service start - After you have upgraded all of your hosts to Kilo, you will want to remove the API limits configured in the previous step. On all of your hosts:
#crudini --del /etc/nova/nova.conf upgrade_levels compute
Post-upgrade tasks:- After completing all of your individual service upgrades, you should perform a complete package upgrade on all of your systems:
#yum upgradeThis will ensure that all packages are up-to-date. You may want to schedule a restart of your OpenStack hosts at a future date in order to ensure that all running processes are using updated versions of the underlying binaries. - Review the resulting configuration files. The upgraded packages will have installed
.rpmnewfiles appropriate to the Red Hat Enterprise Linux OpenStack Platform 7 version of the service.New versions of OpenStack services may deprecate certain configuration options. You should also review your OpenStack logs for any deprecation warnings, because these may cause problems during a future upgrade. For more information on the new, updated and deprecated configuration options for each service , see Configuration Reference available from: Red Hat Enterprise Linux OpenStack Platform Documentation Suite.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.