- Impact on Users
- Upgrade Considerations
- Perform a Backup
- Manage Repositories
- Update Configuration Files
- Upgrade Packages on the Controller Node
- Stop Services, Update Database Schemas, and Restart Services on the Controller Node
- Upgrade Packages and Restart Services on the Compute Nodes
- Upgrade Packages and Restart Services on the Block Storage Nodes
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 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.
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.
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.
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 | |
---|---|
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
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 | |
---|---|
Make sure any automatic updates are disabled. |
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
.
[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
/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
.
[database] connection = mysql://nova:NOVA_DBPASS@controller/nova
Remove defunct configuration from the [DEFAULT] section in
/etc/nova/nova.conf
.
[DEFAULT] sql_connection = mysql://nova:NOVA_DBPASS@controller/nova
If not already present and configured as follows, add or
modify the following keys in
/etc/nova/nova.conf
.
[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 /etc/nova/nova.conf
to
enable currently active instances to continue leasing their IP
addresses during the upgrade process.
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. |
[DEFAULT] dhcp_lease_time = 86400
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 new [database] section and associated key to
/etc/cinder/cinder.conf
.
[database] connection = mysql://cinder:CINDER_DBPASS@controller/cinder
Remove defunct configuration from the [DEFAULT] section in
/etc/cinder/cinder.conf
.
[DEFAULT] sql_connection = mysql://cinder:CINDER_DBPASS@controller/cinder
If not currently present and configured as follows, add or
modify the following key in
/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 to Havana, as shown below:
# apt-get update # apt-get dist-upgrade
Note | |
---|---|
Depending on your specific configuration, performing a
|
The package manager will ask you about updating various
configuration files. We recommend denying these changes. The
package manager will append .dpkg-dist
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.
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 on the compute nodes to Havana:
Note | |
---|---|
Make sure you have removed the repository for Grizzly packages and added the repository for Havana packages. |
# apt-get update # apt-get dist-upgrade
Warning | |
---|---|
Due to a packaging issue, this command may 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) You can fix this issue by using the following command: # apt-get -f install |
The packaging system will ask about updating the
/etc/nova/api-paste.ini
file. As with the
controller upgrade, we recommend denying these changes and
reviewing the .dpkg-dist
file after completing
the upgrade process.
Restart Compute services:
# service nova-compute restart # service nova-network restart # service nova-api-metadata restart
Upgrade packages on the storage nodes to Havana:
# apt-get update # apt-get dist-upgrade
Note | |
---|---|
Make sure you have removed the repository for Grizzly packages and added the repository for Havana packages. |
The packaging system will ask about updating the
/etc/cinder/api-paste.ini
file. Like the
controller upgrade, we recommend denying these changes and
reviewing the .dpkg-dist
file after completing
the upgrade process.
Restart Block Storage services.
# service cinder-volume restart