How to Perform an Upgrade from Grizzly to Havana—Red Hat Enterprise Linux and Derivatives

For this section, we assume that you are starting with the architecture provided in the OpenStack Installation Guide and upgrading to the same architecture for Havana. All nodes should run Red Hat Enterprise Linux 6.4 or compatible derivatives. Newer minor releases should also work. This section primarily addresses upgrading core OpenStack services such as the Identity Service (keystone); Image Service (glance); Compute (nova), including networking; Block Storage (cinder); and the dashboard.

 Impact on Users

The upgrade process will interrupt management of your environment, including the dashboard. If you properly prepare for this upgrade, tenant instances will continue to operate normally.

 Upgrade Considerations

Always review the release notes before performing an upgrade to learn about newly available features that you may want to enable and deprecated features that you should disable.

 Perform a Backup

First, save the configuration files on all nodes:

# for i in keystone glance nova cinder openstack-dashboard
> do mkdir $i-grizzly
> done
# for i in keystone glance nova cinder openstack-dashboard
> do cp -r /etc/$i/* $i-grizzly/
> done
[Note]Note

You can modify this example script on each node to handle different services.

Next, back up all databases on the controller:

# mysqldump -u root -p --opt --add-drop-database --all-databases > grizzly-db-backup.sql

 Manage Repositories

On all nodes, remove the repository for Grizzly packages and add the repository for Havana packages:

# yum erase rdo-release-grizzly
# yum install http://repos.fedorapeople.org/repos/openstack/openstack-havana/rdo-release-havana-7.noarch.rpm
[Warning]Warning

Make sure any automatic updates are disabled.

[Note]Note

Consider checking for newer versions of the Havana repository.

 Update Configuration Files

Update the glance configuration on the controller node for compatibility with Havana.

If not currently present and configured as follows, add or modify the following keys in /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf.

# openstack-config --set /etc/glance/glance-api.conf keystone_authtoken \
  auth_uri http://controller:5000
# openstack-config --set /etc/glance/glance-api.conf keystone_authtoken \
  auth_host controller
# openstack-config --set /etc/glance/glance-api.conf keystone_authtoken \
  admin_tenant_name service
# openstack-config --set /etc/glance/glance-api.conf keystone_authtoken \
  admin_user glance
# openstack-config --set /etc/glance/glance-api.conf keystone_authtoken \
  admin_password GLANCE_PASS
# openstack-config --set /etc/glance/glance-api.conf paste_deploy \
  flavor keystone
# openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken \
  auth_uri http://controller:5000
# openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken \
  auth_host controller
# openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken \
  admin_tenant_name service
# openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken \
  admin_user glance
# openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken \
  admin_password GLANCE_PASS
# openstack-config --set /etc/glance/glance-registry.conf paste_deploy \
  flavor keystone

If currently present, remove the following key from the [filter:authtoken] section in /etc/glance/glance-api-paste.ini and /etc/glance/glance-registry-paste.ini.

[filter:authtoken]
flavor = keystone

Update the nova configuration on all nodes for compatibility with Havana.

Add the new [database] section and associated key to /etc/nova/nova.conf.

# openstack-config --set /etc/nova/nova.conf database \
  connection mysql://nova:NOVA_DBPASS@controller/nova

Remove defunct database configuration from /etc/nova/nova.conf.

# openstack-config --del /etc/nova/nova.conf DEFAULT sql_connection

If not already present and configured as follows, add or modify the following keys in /etc/nova/nova.conf.

# openstack-config --set /etc/nova/nova.conf keystone_authtoken \
  auth_uri http://controller:5000/v2.0
# openstack-config --set /etc/nova/nova.conf keystone_authtoken \
  auth_host controller
# openstack-config --set /etc/nova/nova.conf keystone_authtoken \
  admin_tenant_name service
# openstack-config --set /etc/nova/nova.conf keystone_authtoken \
  admin_user nova
# openstack-config --set /etc/nova/nova.conf keystone_authtoken \
  admin_password NOVA_PASS

On all compute nodes, increase the DHCP lease time (measured in seconds) in /etc/nova/nova.conf to enable currently active instances to continue leasing their IP addresses during the upgrade process, as shown here:

# openstack-config --set /etc/nova/nova.conf DEFAULT \
  dhcp_lease_time 86400
[Warning]Warning

Setting this value too high may cause more dynamic environments to run out of available IP addresses. Use an appropriate value for your environment.

You must restart dnsmasq and the nova networking service to enable the new DHCP lease time:

# pkill -9 dnsmasq
# service openstack-nova-network restart

Update the cinder configuration on the controller and storage nodes for compatibility with Havana.

Add the new [database] section and associated key to /etc/cinder/cinder.conf:

# openstack-config --set /etc/cinder/cinder.conf database \
  connection mysql://cinder:CINDER_DBPASS@controller/cinder

Remove defunct database configuration from /etc/cinder/cinder.conf:

# openstack-config --del /etc/cinder/cinder.conf DEFAULT sql_connection

If not currently present and configured as follows, add or modify the following key in /etc/cinder/cinder.conf:

# openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
  auth_uri http://controller:5000

Update the dashboard configuration on the controller node for compatibility with Havana.

The dashboard installation procedure and configuration file changed substantially between Grizzly and Havana. Particularly, if you are running Django 1.5 or later, you must ensure that /etc/openstack-dashboard/local_settings contains a correctly configured ALLOWED_HOSTS key that contains a list of hostnames recognized by the dashboard.

If users will access your dashboard using http://dashboard.example.com, you would set:

ALLOWED_HOSTS=['dashboard.example.com']

If users will access your dashboard on the local system, you would set:

ALLOWED_HOSTS=['localhost']

If users will access your dashboard using an IP address in addition to a hostname, you would set:

ALLOWED_HOSTS=['dashboard.example.com', '192.168.122.200']

 Upgrade Packages on the Controller Node

Upgrade packages on the controller node to Havana:

# yum upgrade
[Note]Note

Some services may terminate with an error during the package upgrade process. If this may cause a problem with your environment, consider stopping all services before upgrading them to Havana.

[Note]Note

The package manager will append .rpmnew to the end of newer versions of existing configuration files. You should consider adopting conventions associated with the newer configuration files and merging them with your existing configuration files after completing the upgrade process.

Install the OpenStack SELinux package on the controller node:

# yum install openstack-selinux

 Stop Services, Update Database Schemas, and Restart Services on the Controller Node

Stop each service, run the database synchronization command if necessary to update the associated database schema, and restart each service to apply the new configuration. Some services require additional commands:

  • OpenStack Identity:

    # service openstack-keystone stop
    # keystone-manage token_flush
    # keystone-manage db_sync
    # service openstack-keystone start
  • OpenStack Image Service:

    # service openstack-glance-api stop
    # service openstackglance-registry stop
    # glance-manage db_sync
    # service openstack-glance-api start
    # service openstack-glance-registry start
  • OpenStack Compute:

    # service openstack-nova-api stop
    # service openstack-nova-scheduler stop
    # service openstack-nova-conductor stop
    # service openstack-nova-cert stop
    # service openstack-nova-consoleauth stop
    # service openstack-nova-novncproxy stop
    # nova-manage db sync
    # service openstack-nova-api start
    # service openstack-nova-scheduler start
    # service openstack-nova-conductor start
    # service openstack-nova-cert start
    # service openstack-nova-consoleauth start
    # service openstack-nova-novncproxy start
  • OpenStack Block Storage:

    # service openstack-cinder-api stop
    # service openstack-cinder-scheduler stop
    # cinder-manage db sync
    # service openstack-cinder-api start
    # service openstack-cinder-scheduler start

The controller node update is complete. Now you can upgrade the compute nodes.

 Upgrade Packages and Restart Services on the Compute Nodes

Upgrade packages on the compute nodes to Havana:

# yum upgrade
[Note]Note

Make sure you have removed the repository for Grizzly packages and added the repository for Havana packages.

Install the OpenStack SELinux package on the compute nodes:

# yum install openstack-selinux

Restart Compute services:

# service openstack-nova-compute restart
# service openstack-nova-network restart
# service openstack-nova-metadata-api restart

 Upgrade Packages and Restart Services on the Block Storage Nodes

Upgrade packages on the storage nodes to Havana:

# yum upgrade
[Note]Note

Make sure you have removed the repository for Grizzly packages and added the repository for Havana packages.

Install the OpenStack SELinux package on the storage nodes:

# yum install openstack-selinux

Restart Block Storage services:

# service openstack-cinder-volume restart
Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...