From: Cory Stone Date: Tue, 8 Jul 2014 20:01:04 +0000 (-0500) Subject: Remove $sqlite_db from default database connection X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b1315f6eee54f56e245f947574d173aea06bcaa2;p=openstack-build%2Fcinder-build.git Remove $sqlite_db from default database connection sqlite_db used to be a config option in the DEFAULT section. This allowed it to be used in config template substitution. Now that it is in the database section, the template substitution fails with a NoSuchOptError. The quick fix is to just hardcode the default connection option to refer directly to 'cinder.sqlite' instead. Closes bug: 1339295 Change-Id: Ifd2267aaa8c55d78f88ce6648badefe3f9f664ee --- diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 643419a93..7e7cb9f5f 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -46,7 +46,7 @@ from cinder.openstack.common import uuidutils CONF = cfg.CONF LOG = logging.getLogger(__name__) -options.set_defaults(sql_connection='sqlite:///$state_path/$sqlite_db', +options.set_defaults(sql_connection='sqlite:///$state_path/cinder.sqlite', sqlite_db='cinder.sqlite') _LOCK = threading.Lock() diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 6eebf405c..7964eeb5f 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -272,9 +272,10 @@ # Port on which OpenStack Volume API listens (integer value) #osapi_volume_listen_port=8776 -# Number of workers for OpenStack Volume API service (integer +# Number of workers for OpenStack Volume API service. The +# default is equal to the number of CPUs available. (integer # value) -#osapi_volume_workers=1 +#osapi_volume_workers= # @@ -1964,7 +1965,7 @@ # Deprecated group/name - [DEFAULT]/sql_connection # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection -#connection=sqlite:///$state_path/$sqlite_db +#connection=sqlite:///$state_path/cinder.sqlite # The SQL mode to be used for MySQL sessions. This option, # including the default, overrides any server-set SQL mode. To