Activity log for bug #1339295

Date Who What changed Old value New value Message
2014-07-08 19:27:14 Cory Stone bug added bug
2014-07-08 19:28:07 Cory Stone description It looks like config template substitution only works with options in the default group. The sqlite_db entry is now in the [database] group, so the sample config of 'sqlite:///$state_path/$sqlite_db' doesn't work. Instead, you get this lovely stack trace: 2014-07-08 19:17:04.070 TRACE cinder Traceback (most recent call last): 2014-07-08 19:17:04.070 TRACE cinder File "/usr/local/bin/cinder-manage", line 6, in <module> 2014-07-08 19:17:04.070 TRACE cinder exec(compile(open(__file__).read(), __file__, 'exec')) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 561, in <module> 2014-07-08 19:17:04.070 TRACE cinder main() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 558, in main 2014-07-08 19:17:04.070 TRACE cinder fn(*fn_args) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 229, in version 2014-07-08 19:17:04.070 TRACE cinder print(migration.db_version()) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/migration.py", line 33, in db_version 2014-07-08 19:17:04.070 TRACE cinder return IMPL.db_version() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/migration.py", line 51, in db_version 2014-07-08 19:17:04.070 TRACE cinder return versioning_api.db_version(get_engine(), repository) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/api.py", line 69, in get_engine 2014-07-08 19:17:04.070 TRACE cinder facade = _create_facade_lazily() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/api.py", line 62, in _create_facade_lazily 2014-07-08 19:17:04.070 TRACE cinder CONF.database.connection, 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2292, in __getattr__ 2014-07-08 19:17:04.070 TRACE cinder return self._conf._get(name, self._group) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2030, in _get 2014-07-08 19:17:04.070 TRACE cinder value = self._do_get(name, group, namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2066, in _do_get 2014-07-08 19:17:04.070 TRACE cinder return convert(opt._get_from_namespace(namespace, group_name)) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2061, in convert 2014-07-08 19:17:04.070 TRACE cinder return self._convert_value(self._substitute(value, namespace), opt) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2110, in _substitute 2014-07-08 19:17:04.070 TRACE cinder self.StrSubWrapper(self, namespace=namespace)) 2014-07-08 19:17:04.070 TRACE cinder File "/usr/lib/python2.7/string.py", line 205, in safe_substitute 2014-07-08 19:17:04.070 TRACE cinder return self.pattern.sub(convert, self.template) 2014-07-08 19:17:04.070 TRACE cinder File "/usr/lib/python2.7/string.py", line 190, in convert 2014-07-08 19:17:04.070 TRACE cinder return '%s' % (mapping[named],) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2367, in __getitem__ 2014-07-08 19:17:04.070 TRACE cinder value = self.conf._get(key, namespace=self.namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2030, in _get 2014-07-08 19:17:04.070 TRACE cinder value = self._do_get(name, group, namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2048, in _do_get 2014-07-08 19:17:04.070 TRACE cinder info = self._get_opt_info(name, group) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2172, in _get_opt_info 2014-07-08 19:17:04.070 TRACE cinder raise NoSuchOptError(opt_name, group) 2014-07-08 19:17:04.070 TRACE cinder NoSuchOptError: no such option: sqlite_db It looks like config template substitution only works with options in the default group. The sqlite_db entry is now in the [database] group, so the default config value of 'sqlite:///$state_path/$sqlite_db' doesn't work. Instead, you get this lovely stack trace: 2014-07-08 19:17:04.070 TRACE cinder Traceback (most recent call last): 2014-07-08 19:17:04.070 TRACE cinder File "/usr/local/bin/cinder-manage", line 6, in <module> 2014-07-08 19:17:04.070 TRACE cinder exec(compile(open(__file__).read(), __file__, 'exec')) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 561, in <module> 2014-07-08 19:17:04.070 TRACE cinder main() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 558, in main 2014-07-08 19:17:04.070 TRACE cinder fn(*fn_args) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/bin/cinder-manage", line 229, in version 2014-07-08 19:17:04.070 TRACE cinder print(migration.db_version()) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/migration.py", line 33, in db_version 2014-07-08 19:17:04.070 TRACE cinder return IMPL.db_version() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/migration.py", line 51, in db_version 2014-07-08 19:17:04.070 TRACE cinder return versioning_api.db_version(get_engine(), repository) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/api.py", line 69, in get_engine 2014-07-08 19:17:04.070 TRACE cinder facade = _create_facade_lazily() 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/cinder/cinder/db/sqlalchemy/api.py", line 62, in _create_facade_lazily 2014-07-08 19:17:04.070 TRACE cinder CONF.database.connection, 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2292, in __getattr__ 2014-07-08 19:17:04.070 TRACE cinder return self._conf._get(name, self._group) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2030, in _get 2014-07-08 19:17:04.070 TRACE cinder value = self._do_get(name, group, namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2066, in _do_get 2014-07-08 19:17:04.070 TRACE cinder return convert(opt._get_from_namespace(namespace, group_name)) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2061, in convert 2014-07-08 19:17:04.070 TRACE cinder return self._convert_value(self._substitute(value, namespace), opt) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2110, in _substitute 2014-07-08 19:17:04.070 TRACE cinder self.StrSubWrapper(self, namespace=namespace)) 2014-07-08 19:17:04.070 TRACE cinder File "/usr/lib/python2.7/string.py", line 205, in safe_substitute 2014-07-08 19:17:04.070 TRACE cinder return self.pattern.sub(convert, self.template) 2014-07-08 19:17:04.070 TRACE cinder File "/usr/lib/python2.7/string.py", line 190, in convert 2014-07-08 19:17:04.070 TRACE cinder return '%s' % (mapping[named],) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2367, in __getitem__ 2014-07-08 19:17:04.070 TRACE cinder value = self.conf._get(key, namespace=self.namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2030, in _get 2014-07-08 19:17:04.070 TRACE cinder value = self._do_get(name, group, namespace) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2048, in _do_get 2014-07-08 19:17:04.070 TRACE cinder info = self._get_opt_info(name, group) 2014-07-08 19:17:04.070 TRACE cinder File "/opt/stack/oslo.config/oslo/config/cfg.py", line 2172, in _get_opt_info 2014-07-08 19:17:04.070 TRACE cinder raise NoSuchOptError(opt_name, group) 2014-07-08 19:17:04.070 TRACE cinder NoSuchOptError: no such option: sqlite_db
2014-07-08 21:27:04 OpenStack Infra cinder: status New In Progress
2014-07-08 21:27:04 OpenStack Infra cinder: assignee Cory Stone (corystone)
2014-07-10 07:12:32 Huang Zhiteng cinder: importance Undecided Medium
2014-07-10 07:12:37 Huang Zhiteng cinder: milestone juno-2
2014-07-10 09:24:00 OpenStack Infra cinder: status In Progress Fix Committed
2014-07-24 12:25:39 Russell Bryant cinder: status Fix Committed Fix Released
2014-10-16 09:13:23 Thierry Carrez cinder: milestone juno-2 2014.2