cinder-upgrade revision 4623
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import glob
('DEFAULT', 'rabbit_durable_queues'): ('DEFAULT', 'amqp_durable_queues'),
('rpc_notifier2', 'topics'): ('DEFAULT', 'notification_topics'),
('DEFAULT', 'osapi_compute_link_prefix'):
('DEFAULT', 'osapi_volume_base_URL'),
('DEFAULT', 'backup_service'): ('DEFAULT', 'backup_driver'),
('DEFAULT', 'pybasedir'): ('DEFAULT', 'state_path'),
('DEFAULT', 'log_config'): ('DEFAULT', 'log_config_append'),
('DEFAULT', 'logfile'): ('DEFAULT', 'log_file'),
('DEFAULT', 'logdir'): ('DEFAULT', 'log_dir'),
('DEFAULT', 'num_iscsi_scan_tries'):
('DEFAULT', 'num_volume_device_scan_tries'),
('DEFAULT', 'zfssa_host'): ('DEFAULT', 'san_ip'),
('DEFAULT', 'zfssa_auth_user'): ('DEFAULT', 'san_login'),
('DEFAULT', 'zfssa_auth_password'): ('DEFAULT', 'san_password'),
('DEFAULT', 'db_backend'): ('database', 'backend'),
('DEFAULT', 'sql_connection'): ('database', 'connection'),
('DATABASE', 'sql_connection'): ('database', 'connection'),
('sql', 'connection'): ('database', 'connection'),
('DEFAULT', 'sql_idle_timeout'): ('database', 'idle_timeout'),
('DATABASE', 'sql_idle_timeout'): ('database', 'idle_timeout'),
('sql', 'idle_timeout'): ('database', 'idle_timeout'),
('DEFAULT', 'sql_min_pool_size'): ('database', 'min_pool_size'),
('DATABASE', 'sql_min_pool_size'): ('database', 'min_pool_size'),
('DEFAULT', 'sql_max_pool_size'): ('database', 'max_pool_size'),
('DATABASE', 'sql_max_pool_size'): ('database', 'max_pool_size'),
('DEFAULT', 'sql_max_retries'): ('database', 'max_retries'),
('DATABASE', 'sql_max_retries'): ('database', 'max_retries'),
('DEFAULT', 'sql_retry_interval'): ('database', 'retry_interval'),
('DATABASE', 'reconnect_interval'): ('database', 'retry_interval'),
('DEFAULT', 'sql_max_overflow'): ('database', 'max_overflow'),
('DATABASE', 'sqlalchemy_max_overflow'): ('database', 'max_overflow'),
('DEFAULT', 'sql_connection_debug'): ('database', 'connection_debug'),
('DEFAULT', 'sql_connection_trace'): ('database', 'connection_trace'),
('DATABASE', 'sqlalchemy_pool_timeout'): ('database', 'pool_timeout'),
('DEFAULT', 'dbapi_use_tpool'): ('database', 'use_tpool'),
('DEFAULT', 'memcache_servers'):
('keystone_authtoken', 'memcached_servers'),
('DEFAULT', 'matchmaker_ringfile'): ('matchmaker_ring', 'ringfile'),
}
('DEFAULT', 'osapi_volume_workers'),
('DEFAULT', 'auth_strategy'),
('DEFAULT', 'san_is_local'),
('DEFAULT', 'volume_driver'),
('database', 'connection'),
('keystone_authtoken', 'auth_uri'),
('keystone_authtoken', 'identity_uri'),
('keystone_authtoken', 'admin_user'),
('keystone_authtoken', 'admin_password'),
('keystone_authtoken', 'admin_tenant_name'),
('keystone_authtoken', 'signing_dir'),
]
('filter:authtoken', 'auth_uri'): ('keystone_authtoken', 'auth_uri'),
('filter:authtoken', 'identity_uri'):
('keystone_authtoken', 'identity_uri'),
('filter:authtoken', 'admin_tenant_name'):
('keystone_authtoken', 'admin_tenant_name'),
('filter:authtoken', 'admin_user'): ('keystone_authtoken', 'admin_user'),
('filter:authtoken', 'admin_password'):
('keystone_authtoken', 'admin_password'),
('filter:authtoken', 'signing_dir'): ('keystone_authtoken', 'signing_dir'),
}
# pull out the current version of config/upgrade-id
# extract the openstack-upgrade-id from the pkg
# No need to upgrade
# look for any .new files
# the versions are different, so perform an upgrade
# modify the configuration files
# backup all the old configuration files
# before modifying cinder.conf, move the [filter:authtoken] entries
# from the updated api-paste.ini to the old cinder.conf
# In certain cases the database section does not exist and the
# default database chosen is sqlite.
if engine.url.username != '%SERVICE_USER%':
print "altered character set to utf8 in cinder tables"
# update the current version
if __name__ == '__main__':
try:
print 'Unknown error: %s' % err
print