OSLO DB configurations not backward compatible with old quantum configs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
High
|
Gary Kotton |
Bug Description
If a uer has a configuration files that has:
[DATABASE]
sql_connection=
Then this does not work.
Please see and example below:
DBAPITestCase
test_
test_
test_
test_
test_
test_
test_
=======
ERROR: tests.unit.
-------
_StringException: Empty attachments:
pythonlogging
Traceback (most recent call last):
File "/home/
self.
File "/home/
return self._conf.
File "/home/
value = self._substitut
File "/home/
info = self._get_
File "/home/
raise NoSuchOptError(
NoSuchOptError: no such option in group database: connection
This is when adding the following code to OSLO:
diff --git a/requirements.txt b/requirements.txt
index 067af58..d7a33c6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,6 +12,6 @@ kombu==1.0.4
argparse
stevedore
SQLAlchemy>
-oslo.config>=1.1.0
+http://
qpid-python
six
diff --git a/tests/
index f6e0d4c..12ad847 100644
--- a/tests/
+++ b/tests/
@@ -55,6 +55,16 @@ class DBAPITestCase(
+ def test_dbapi_
+ paths = self.create_
+ '[DATABASE]\n'
+ 'sql_connection
+ )])
+
+ test_utils.
+ self.assertEqua
+ 'fake_connection')
+
Changed in oslo: | |
importance: | Undecided → High |
summary: |
- OSLO DB configurations not backward compatible + OSLO DB configurations not backward compatible with old quantum configs |
Changed in oslo: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | havana-2 → 2013.2 |
Sorry, my bad with the example:
from openstack.common.db import api common. db.sqlalchemy import session
+from openstack.
from tests import utils as test_utils
@@ -55,6 +56,16 @@ class DBAPITestCase( test_utils. BaseTestCase) :
self. assertEquals( test_utils. CONF.database. backend, 'test_123')
self. assertEquals( test_utils. CONF.database. use_tpool, True)
+ def test_dbapi_ upper_case_ deprecated_ parameters( self): tempfiles( [('test' , =fake_connectio n\n' CONF([' --config- file', paths[0]]) ls(test_ utils.CONF. database. connection,
+ paths = self.create_
+ '[DATABASE]\n'
+ 'sql_connection
+ )])
+
+ test_utils.
+ self.assertEqua
+ 'fake_connection')
+
DBAPITestCase dbapi_api_ class_method_ and_tpool_ false OK 0.00 dbapi_api_ class_method_ and_tpool_ true OK 0.37 dbapi_full_ path_module_ method OK 0.00 dbapi_parameter s OK 0.00 dbapi_unknown_ invalid_ backend OK 0.01 dbapi_upper_ case_deprecated _parameters FAIL 0.00 deprecated_ dbapi_parameter s OK 0.00
test_
test_
test_
test_
test_
test_
test_
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= db.test_ api.DBAPITestCa se.test_ dbapi_upper_ case_deprecated _parameters ------- ------- ------- ------- ------- ------- ------- ------- ------- :'openstack. common'
FAIL: tests.unit.
-------
_StringException: Empty attachments:
pythonlogging
Traceback (most recent call last): garyk/oslo- incubator/ tests/unit/ db/test_ api.py" , line 67, in test_dbapi_ upper_case_ deprecated_ parameters connection' ) garyk/oslo- incubator/ .tox/py27/ local/lib/ python2. 7/site- packages/ testtools/ testcase. py", line 322, in assertEqual assertThat( observed, matcher, message) garyk/oslo- incubator/ .tox/py27/ local/lib/ python2. 7/site- packages/ testtools/ testcase. py", line 417, in assertThat matchee, matcher, mismatch, verbose) ////home/ garyk/oslo- incubator/ .tox/py27/ local/lib/ python2. 7/site- packages/ openstack/ common/ db/oslo. sqlite'
File "/home/
'fake_
File "/home/
self.
File "/home/
raise MismatchError(
MismatchError: !=:
reference = 'sqlite:
actual = 'fake_connection'