BIND 10 #1253: Datasource refactor finishing touch 3: factory/containers and wrappers
BIND 10 Development
do-not-reply at isc.org
Wed Oct 5 13:58:46 UTC 2011
#1253: Datasource refactor finishing touch 3: factory/containers and wrappers
-------------------------------------+-------------------------------------
Reporter: jelte | Owner: jelte
Type: task | Status: reviewing
Priority: minor | Milestone:
Component: data | Sprint-20111011
source | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: DNS
Feature Depending on Ticket: | Estimated Difficulty: 3
Add Hours to Ticket: 0 | Total Hours: 0
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by vorner):
* owner: vorner => jelte
* status: accepted => reviewing
Comment:
Hello
First, I fixed a problem in Makefile, it failed with `make -j6` here (as
the library was not yet made).
Secondly, I still have trouble with it, it fails the tests:
{{{
Running test: datasrc_test.py
.EEE.EE
======================================================================
ERROR: test_constructors (__main__.DataSrcClient)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests/datasrc_test.py",
line 74, in test_constructors
isc.datasrc.DataSourceClient, "sqlite3", "{}")
File "/usr/lib64/python3.2/unittest/case.py", line 557, in assertRaises
callableObj(*args, **kwargs)
isc.datasrc.Error: Failed to create DataSourceClient of type
sqlite3:/home/vorner/testing/bind10/lib/sqlite3_ds.so: undefined symbol:
_ZNK3isc9Exception4whatEv
======================================================================
ERROR: test_find (__main__.DataSrcClient)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests/datasrc_test.py",
line 194, in test_find
dsc = isc.datasrc.DataSourceClient("sqlite3", READ_ZONE_DB_CONFIG)
isc.datasrc.Error: Failed to create DataSourceClient of type
sqlite3:/home/vorner/testing/bind10/lib/sqlite3_ds.so: undefined symbol:
_ZNK3isc9Exception4whatEv
======================================================================
ERROR: test_iterate (__main__.DataSrcClient)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests/datasrc_test.py",
line 83, in test_iterate
dsc = isc.datasrc.DataSourceClient("sqlite3", READ_ZONE_DB_CONFIG)
isc.datasrc.Error: Failed to create DataSourceClient of type
sqlite3:/home/vorner/testing/bind10/lib/sqlite3_ds.so: undefined symbol:
_ZNK3isc9Exception4whatEv
======================================================================
ERROR: test_update_delete_abort (__main__.DataSrcUpdater)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests/datasrc_test.py",
line 352, in test_update_delete_abort
dsc = isc.datasrc.DataSourceClient("sqlite3", WRITE_ZONE_DB_CONFIG)
isc.datasrc.Error: Failed to create DataSourceClient of type
sqlite3:/home/vorner/testing/bind10/lib/sqlite3_ds.so: undefined symbol:
_ZNK3isc9Exception4whatEv
======================================================================
ERROR: test_update_delete_commit (__main__.DataSrcUpdater)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests/datasrc_test.py",
line 278, in test_update_delete_commit
dsc = isc.datasrc.DataSourceClient("sqlite3", WRITE_ZONE_DB_CONFIG)
isc.datasrc.Error: Failed to create DataSourceClient of type
sqlite3:/home/vorner/testing/bind10/lib/sqlite3_ds.so: undefined symbol:
_ZNK3isc9Exception4whatEv
----------------------------------------------------------------------
Ran 7 tests in 0.003s
FAILED (errors=5)
make[7]: *** [check-local] Error 1
make[7]: Leaving directory
`/home/vorner/work/bind10/src/lib/python/isc/datasrc/tests'
}}}
I have a faint memory that gentoo linker is set to strip symbols that are
not used when loading dynamic libraries or something and maybe the python
test doesn't use the symbol, so it gets lost or something. But that's just
a wild guess.
The stuff in a8a8ceb589f9f3bf4da29717eec446cb2766032c looks strange. What
happened when it threw? Because this is both incomplete (there's
infinitely more unhandled exceptions), wrong (as something that inherits
from DataSourceError can be thrown, in which case this loses information)
and woodoo-looking.
I'm thinking if we except our iterators, etc, to hold a shared pointer to
the parent data source client. Maybe not, so in which case your approach
might be nice (because python programmers don't expect such attacks from
the language, C++ ones are already used).
And a question, does anything use the factory in some way already? Or we
need to update different branches?
Thanks
--
Ticket URL: <http://bind10.isc.org/ticket/1253#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list