<div dir="ltr"><div>Here's the pertinent error. <span style="color:rgb(33,33,33)">It looks like you have a typo in one of your translators. </span></div><br class="inbox-inbox-Apple-interchange-newline"><div><span style="color:rgb(33,33,33)">2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node InvalidParamException: Params (field_translators, selector_type) are invalid. Valid params: ('translation-type', 'table-name', 'parent-key', 'id-col', 'selector-type', 'field-translators', 'in-list', 'parent-col-name', 'objects-extract-fn', 'parent-key-desc')</span><br></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><br></div><div>If you push your Magnum datasource code to review, we can help you more easily. Let us know if you need help doing that. Here's the quickstart guide. </div><div><a href="http://docs.openstack.org/contributor-guide/quickstart/first-timers.html">http://docs.openstack.org/contributor-guide/quickstart/first-timers.html</a><br></div><div><br></div><div>There are 2 kinds of testing you can do. </div><div><br></div><div>1. Run congress and magnum using Devstack (as it seems you're doing). Manually add a couple of objects to Magnum and manually check that those objects are showing up in Congress.</div><div><br></div><div>2. You can run unit tests on a Linux box with the following commands.</div><div>$ cd /path/to/congress</div><div>$ tox</div><div><br></div><div>You can run specific tests with ...</div><div>$ tox -epy34 // just run the Python34 tests</div><div>$ tox -epy34 congress.tests.datasources // just run the tests in the congress/tests/datasources directory</div><div>$ tox -epy34 congress.tests.datasources.glancev2_driver // just run the tests in the file test_glancev2_driver.py</div><div>$ tox -epy34 congress.tests.datasources.glancev2_driver.test_update_from_datasource // just run the test_update_from_datasource test</div><div><br></div><div>Tim</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 8, 2016 at 3:26 AM Ruben <<a href="mailto:r.manganiello1@studenti.unisa.it">r.manganiello1@studenti.unisa.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everybody,<br class="gmail_msg">
really, I've not been able to create the datasource for magnum.<br class="gmail_msg">
Now, I've seen that I've these errors when I restart the congress server..<br class="gmail_msg">
<br class="gmail_msg">
"ERROR congress.dse2.dse_node [-] Error loading instance of module 'congress.datasources.magnum_driver.MagnumDriver'<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node Traceback (most recent call last):<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/dse2/dse_node.py", line 841, in create_datasource_service<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node service = getattr(module, class_name)(**kwargs)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/magnum_driver.py", line 49, in __init__<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node super(MagnumDriver, self).__init__(name, args=args)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 1282, in __init__<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node super(PollingDataSourceDriver, self).__init__(name, args=args)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 324, in __init__<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node self.initialize_translators()<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 1324, in initialize_translators<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node self.register_translator(translator)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 457, in register_translator<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node self._validate_translator(translator, related_tables)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 446, in _validate_translator<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node self._validate_by_translation_type(translator, related_tables)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 415, in _validate_by_translation_type<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node self._get_translator_params(translation_type))<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node File "/opt/stack/congress/congress/datasources/datasource_driver.py", line 1066, in check_params<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node raise exception.InvalidParamException(err)<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node InvalidParamException: Params (field_translators, selector_type) are invalid. Valid params: ('translation-type', 'table-name', 'parent-key', 'id-col', 'selector-type', 'field-translators', 'in-list', 'parent-col-name', 'objects-extract-fn', 'parent-key-desc')<br class="gmail_msg">
2016-11-08 12:15:29.906 TRACE congress.dse2.dse_node<br class="gmail_msg">
2016-11-08 12:15:29.911 ERROR congress.harness [-] datasource magnum creation failed.<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness Traceback (most recent call last):<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness File "/opt/stack/congress/congress/harness.py", line 167, in create_datasources<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness service = bus.create_datasource_service(ds)<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness File "/opt/stack/congress/congress/dse2/dse_node.py", line 845, in create_datasource_service<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness raise exception.DataServiceError(msg % class_path)<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness DataServiceError: Error loading instance of module 'congress.datasources.magnum_driver.MagnumDriver'<br class="gmail_msg">
2016-11-08 12:15:29.911 TRACE congress.harness<br class="gmail_msg">
2016-11-08 12:15:29.912 ERROR congress.service [-] Fatal Exception:<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service Traceback (most recent call last):<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service File "/opt/stack/congress/congress/service.py", line 34, in wrapper<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service return f(*args, **kw)<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service File "/opt/stack/congress/congress/service.py", line 51, in congress_app_factory<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service datasources=flags_dict['datasources'])<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service File "/opt/stack/congress/congress/harness.py", line 93, in create2<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service services['datasources'] = create_datasources(node)<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service File "/opt/stack/congress/congress/harness.py", line 167, in create_datasources<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service service = bus.create_datasource_service(ds)<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service File "/opt/stack/congress/congress/dse2/dse_node.py", line 845, in create_datasource_service<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service raise exception.DataServiceError(msg % class_path)<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service DataServiceError: Error loading instance of module 'congress.datasources.magnum_driver.MagnumDriver'<br class="gmail_msg">
2016-11-08 12:15:29.912 TRACE congress.service<br class="gmail_msg">
2016-11-08 12:15:29.914 DEBUG oslo_concurrency.lockutils [-] Acquired semaphore "singleton_lock" from (pid=10406) lock /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:212<br class="gmail_msg">
2016-11-08 12:15:29.914 DEBUG oslo_concurrency.lockutils [-] Releasing semaphore "singleton_lock" from (pid=10406) lock /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:225<br class="gmail_msg">
"<br class="gmail_msg">
<br class="gmail_msg">
Ruben<br class="gmail_msg">
<br class="gmail_msg">
----- Messaggio originale -----<br class="gmail_msg">
Da: "Ruben" <<a href="mailto:r.manganiello1@studenti.unisa.it" class="gmail_msg" target="_blank">r.manganiello1@studenti.unisa.it</a>><br class="gmail_msg">
A: "Eric" <<a href="mailto:ekcs.openstack@gmail.com" class="gmail_msg" target="_blank">ekcs.openstack@gmail.com</a>><br class="gmail_msg">
Cc: <a href="mailto:openstack-dev@lists.openstack.org" class="gmail_msg" target="_blank">openstack-dev@lists.openstack.org</a><br class="gmail_msg">
Inviato: Domenica, 6 novembre 2016 17:48:24<br class="gmail_msg">
Oggetto: Re: [openstack-dev] [Congress] Restart Congress server<br class="gmail_msg">
<br class="gmail_msg">
Hi Eric,<br class="gmail_msg">
also with the old congress.conf file there is the error.<br class="gmail_msg">
I've used devstack with a single-process congress deployment.<br class="gmail_msg">
<br class="gmail_msg">
To stop the congress server I make: screen -x stack and Ctrl-C in the congress window.<br class="gmail_msg">
To restart the congress server I make: screen -x stack and sudo /usr/local/bin/congress-server --debug in the congress window.<br class="gmail_msg">
<br class="gmail_msg">
Is it possible that I should rejoin the stack?<br class="gmail_msg">
<br class="gmail_msg">
Ruben<br class="gmail_msg">
<br class="gmail_msg">
----- Original Message -----<br class="gmail_msg">
From: "Eric" <<a href="mailto:ekcs.openstack@gmail.com" class="gmail_msg" target="_blank">ekcs.openstack@gmail.com</a>><br class="gmail_msg">
To: <a href="mailto:openstack-dev@lists.openstack.org" class="gmail_msg" target="_blank">openstack-dev@lists.openstack.org</a><br class="gmail_msg">
Cc: "Ruben" <<a href="mailto:r.manganiello1@studenti.unisa.it" class="gmail_msg" target="_blank">r.manganiello1@studenti.unisa.it</a>><br class="gmail_msg">
Sent: Friday, November 4, 2016 7:23:50 PM<br class="gmail_msg">
Subject: Re: [Congress] Restart Congress server<br class="gmail_msg">
<br class="gmail_msg">
Hi Ruben,<br class="gmail_msg">
<br class="gmail_msg">
Awesome to hear about your progress!<br class="gmail_msg">
<br class="gmail_msg">
The error seems to be independent of adding a new driver.<br class="gmail_msg">
<br class="gmail_msg">
Could you try using the unchanged congress.conf and restarting again to<br class="gmail_msg">
see if the same problem shows up?<br class="gmail_msg">
<br class="gmail_msg">
Also, could you give the command you¹re using the launch congress-server?<br class="gmail_msg">
<br class="gmail_msg">
Mainly I want to understand whether you¹re using single-process congress<br class="gmail_msg">
deployment or multi-process congress deployment. If multi-process, it¹s<br class="gmail_msg">
possible that the datasources process was stopped but wasn¹t restarted.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
If your screen listing (access by pressing Ctrl-A followed by ") shows<br class="gmail_msg">
three congress windows like this, then you¹re running in multi-process<br class="gmail_msg">
mode:<br class="gmail_msg">
29 congress-api<br class="gmail_msg">
$(L)<br class="gmail_msg">
30 congress-engine<br class="gmail_msg">
$(L)<br class="gmail_msg">
31 congress-datasources<br class="gmail_msg">
$(L)<br class="gmail_msg">
<br class="gmail_msg">
To launch Congress, make sure all three are running properly.<br class="gmail_msg">
<br class="gmail_msg">
A simpler alternative (but takes some time) is to deploy devstack from<br class="gmail_msg">
scratch (saving your work somewhere of course) using the latest versions<br class="gmail_msg">
(defaults to single process), which should reduce complications from<br class="gmail_msg">
multiple processes and make everything easier for dev-testing.<br class="gmail_msg">
<br class="gmail_msg">
All the best!<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
On 11/4/16, 4:53 AM, "Ruben" <<a href="mailto:r.manganiello1@studenti.unisa.it" class="gmail_msg" target="_blank">r.manganiello1@studenti.unisa.it</a>> wrote:<br class="gmail_msg">
<br class="gmail_msg">
>Hi everyone,<br class="gmail_msg">
>I've tried to write a datasource driver for Magnum and the unit test for<br class="gmail_msg">
>it.<br class="gmail_msg">
>So I've add this datasource driver in<br class="gmail_msg">
>/opt/stack/congress/congress/datasources/ and the unit test in<br class="gmail_msg">
>/opt/stack/congress/congress/tests/datasources/ to test it.<br class="gmail_msg">
>Moreover, I've add the driver to /etc/congress/congress.conf, but when I<br class="gmail_msg">
>try to restart Congress server I've some errors.<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
>"2016-11-04 12:13:00.390 TRACE congress.service self.service_id,<br class="gmail_msg">
>service, table)<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service File<br class="gmail_msg">
>"/opt/stack/congress/congress/dse2/dse_node.py", line 468, in<br class="gmail_msg">
>subscribe_table<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service {'table': table})<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service File<br class="gmail_msg">
>"/opt/stack/congress/congress/dse2/dse_node.py", line 355, in<br class="gmail_msg">
>invoke_service_rpc<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service raise<br class="gmail_msg">
>exception.NotFound(msg % service_id)<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service NotFound: service 'nova'<br class="gmail_msg">
>could not be found<br class="gmail_msg">
>2016-11-04 12:13:00.390 TRACE congress.service<br class="gmail_msg">
>2016-11-04 12:13:00.537 DEBUG oslo_concurrency.lockutils [-] Acquired<br class="gmail_msg">
>semaphore "singleton_lock" from (pid=24411) lock<br class="gmail_msg">
>/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:212<br class="gmail_msg">
>2016-11-04 12:13:00.538 DEBUG oslo_concurrency.lockutils [-] Releasing<br class="gmail_msg">
>semaphore "singleton_lock" from (pid=24411) lock<br class="gmail_msg">
>/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:225"<br class="gmail_msg">
><br class="gmail_msg">
>I don't know what to do to solve it and even if the driver I've written<br class="gmail_msg">
>works.<br class="gmail_msg">
>Maybe I make mistakes when I restart Congress server..<br class="gmail_msg">
>What should I do to restart Congress server?<br class="gmail_msg">
>What could I do to test the datasource and solve these problems?<br class="gmail_msg">
><br class="gmail_msg">
>Ruben<br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
</blockquote></div>