How to Perform an Upgrade from Grizzly to Havana—Ubuntu

For this section, we assume that you are starting with the architecture provided in the OpenStack OpenStack Installation Guide and upgrading to the same architecture for Havana. All nodes should run Ubuntu 12.04 LTS. 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 interrupts management of your environment, including the dashboard. If you properly prepare for this upgrade, tenant instances continue to operate normally.

 Upgrade Considerations

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

 Perform a Backup

Save the configuration files on all nodes, as shown here:

# 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.

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:

# apt-add-repository -r cloud-archive:grizzly
# apt-add-repository cloud-archive:havana
[Warning]Warning

Make sure any automatic updates are disabled.

 Update Configuration Files

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

Add or modify the following keys in the /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf files:

[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
admin_tenant_name = service
admin_user = glance
admin_password = GLANCE_PASS

[paste_deploy]
flavor = keystone

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

[filter:authtoken]
flavor = keystone

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

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

[database]
connection = mysql://nova:NOVA_DBPASS@controller/nova

Remove defunct configuration from the [DEFAULT] section in the /etc/nova/nova.conf file:

[DEFAULT]
sql_connection = mysql://nova:NOVA_DBPASS@controller/nova

Add or modify the following keys in the /etc/nova/nova.conf file:

[keystone_authtoken]
auth_uri = http://controller:5000/v2.0
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASS

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

[DEFAULT]
dhcp_lease_time = 86400
[Warning]Warning

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

You must restart dnsmasq and the networking component of Compute to enable the new DHCP lease time:

# pkill -9 dnsmasq
# service nova-network restart

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

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

[database]
connection = mysql://cinder:CINDER_DBPASS@controller/cinder

Remove defunct configuration from the [DEFAULT] section in the /etc/cinder/cinder.conf file:

[DEFAULT]
sql_connection = mysql://cinder:CINDER_DBPASS@controller/cinder

Add or modify the following key in the /etc/cinder/cinder.conf file:

[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 host names recognized by the dashboard.

If users access your dashboard by using http://dashboard.example.com, define ALLOWED_HOSTS, as follows:

ALLOWED_HOSTS=['dashboard.example.com']

If users access your dashboard on the local system, define ALLOWED_HOSTS, as follows:

ALLOWED_HOSTS=['localhost']

If users access your dashboard by using an IP address in addition to a host name, define ALLOWED_HOSTS, as follows:

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

 Upgrade Packages on the Controller Node

Upgrade packages on the controller node to Havana, as follows:

# apt-get update
# apt-get dist-upgrade
[Note]Note

Depending on your specific configuration, performing a dist-upgrade might restart services supplemental to your OpenStack environment. For example, if you use Open-iSCSI for Block Storage volumes and the upgrade includes a new open-scsi package, the package manager restarts Open-iSCSI services, which might cause the volumes for your users to be disconnected.

The package manager prompts you to update various configuration files. Reject these changes. The package manager appends .dpkg-dist to the 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.

 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 keystone stop
# keystone-manage token_flush
# keystone-manage db_sync
# service keystone start
OpenStack Image Service
# service glance-api stop
# service glance-registry stop
# glance-manage db_sync
# service glance-api start
# service glance-registry start
OpenStack Compute
# service nova-api stop
# service nova-scheduler stop
# service nova-conductor stop
# service nova-cert stop
# service nova-consoleauth stop
# service nova-novncproxy stop
# nova-manage db sync
# service nova-api start
# service nova-scheduler start
# service nova-conductor start
# service nova-cert start
# service nova-consoleauth start
# service nova-novncproxy start
OpenStack Block Storage
# service cinder-api stop
# service cinder-scheduler stop
# cinder-manage db sync
# service cinder-api start
# service 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:

# apt-get update
# apt-get dist-upgrade
[Note]Note

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

[Warning]Warning

Due to a packaging issue, this command might fail with the following error:

Errors were encountered while processing:
    /var/cache/apt/archives/
      qemu-utils_1.5.0+dfsg-3ubuntu5~cloud0_amd64.deb
    /var/cache/apt/archives/
      qemu-system-common_1.5.0+dfsg-3ubuntu5~cloud0_
        amd64.deb
    E: Sub-process /usr/bin/dpkg
    returned an error code (1)

Fix this issue by running this command:

# apt-get -f install

The packaging system prompts you to update the /etc/nova/api-paste.ini file. As with the controller upgrade, we recommend that you reject these changes and review the .dpkg-dist file after the upgrade process completes.

To restart compute services:

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

 Upgrade Packages and Restart Services on the Block Storage Nodes

Upgrade packages on the storage nodes to Havana:

# apt-get update
# apt-get dist-upgrade
[Note]Note

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

The packaging system prompts you to update the /etc/cinder/api-paste.ini file. Like the controller upgrade, reject these changes and review the .dpkg-dist file after the the upgrade process completes.

To restart Block Storage services:

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


loading table of contents...