Bogdan, Your analysis is correct. This service plugin is not supported by contrail. Unfortunately, the way it is implemented, it does not allow plugins which do not use mysql db to support it in its current form. This will only be fixed in queens. For earlier releases, Edouard has committed a patch that disables this plugin for contrail (in master branch).
Sachin On Dec 7, 2017, at 8:02 AM, Bogdan Ratiu <bra...@lenovo.com<mailto:bra...@lenovo.com>> wrote: <image001.gif> Hi, I have a 4 node opencontrail setup (1 openstack, 1 contrail, 2 compute – nodes) I was playing around with the following neutron command: neutron net-ip-availability-list and I got the following error: Request Failed: internal server error while processing your request. Neutron server returns request_ids: ['req-ca7ade23-e972-449b-87b5-4dc8ffa502fd'] Checking inside /var/log/neutron/server.log on the Contrail node I have this backtrace: 2017-12-07 16:01:32.058 16604 INFO neutron.wsgi [req-d69fd435-7f28-4168-bb82-272c8bec26c2 1064cd1b5bab4afb8becbf4b318e1fbf 4f6faaab1d6f48fba4b3681f3d3cd0da - - -] 10.241.14.226,10.18.10.227 - - [07/Dec/2017 16:01:32] "GET /v2.0/security-groups.json?id=620b41f4-894f-4c05-8a5d-1dc4db59c45a HTTP/1.1" 200 1970 1.515413 2017-12-07 16:50:35.968 16608 WARNING keystonemiddleware.auth_token [-] Using the in-process token cache is deprecated as of the 4.2.0 release and may be removed in the 5.0.0 release or the 'O' development cycle. The in-process cache causes inconsistent results and high memory usage. When the feature is removed the auth_token middleware will not cache tokens by default which may result in performance issues. It is recommended to use memcache for the auth_token token cache by setting the memcached_servers option. 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource [req-ca7ade23-e972-449b-87b5-4dc8ffa502fd b70dec237bd94fdabca3b012658eafd0 c85f2c0bc70b40158ead1129a75c0bc6 - - -] index failed: No details. 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource Traceback (most recent call last): 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 93, in resource 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource result = method(request=request, **args) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 88, in wrapped 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource self.force_reraise() 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 84, in wrapped 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return f(*args, **kwargs) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource self.force_reraise() 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return f(*args, **kwargs) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 124, in wrapped 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource traceback.format_exc()) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource self.force_reraise() 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 119, in wrapped 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 371, in index 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return self._items(request, True, parent_id) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 307, in _items 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource obj_list = obj_getter(request.context, **kwargs) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/services/network_ip_availability/plugin.py", line 45, in get_network_ip_availabilities 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource self).get_network_ip_availabilities(context, filters) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/network_ip_availability_db.py", line 72, in get_network_ip_availabilities 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource filters) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/network_ip_availability_db.py", line 121, in _generate_subnet_total_ips_dict 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource for row in total_ips_query: 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__ 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return self._execute_and_instances(context) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return meth(self, multiparams, params) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource compiled_sql, distilled_params 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource context) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource context) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource cursor.execute(statement, parameters) 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource DBNonExistentTable: (sqlite3.OperationalError) no such table: networks [SQL: u'SELECT networks.id AS network_id, subnets.id AS subnet_id, subnets.cidr AS subnets_cidr, subnets.ip_version AS subnets_ip_version, ipallocationpools.first_ip AS ipallocationpools_first_ip, ipallocationpools.last_ip AS ipallocationpools_last_ip \nFROM networks LEFT OUTER JOIN subnets ON networks.id = subnets.network_id LEFT OUTER JOIN ipallocationpools ON subnets.id = ipallocationpools.subnet_id \nWHERE subnets.ip_version IN (?)'] [parameters: (u'4',)] 2017-12-07 16:50:36.762 16608 ERROR neutron.api.v2.resource 2017-12-07 16:50:36.770 16608 INFO neutron.wsgi [req-ca7ade23-e972-449b-87b5-4dc8ffa502fd b70dec237bd94fdabca3b012658eafd0 c85f2c0bc70b40158ead1129a75c0bc6 - - -] 10.18.10.226,10.18.10.227 - - [07/Dec/2017 16:50:36] "GET /v2.0/network-ip-availabilities.json?ip_version=4 HTTP/1.1" 500 363 0.807586 Based on my understanding, the reason for this error is that we do not have an implementation in our plugin for this particular neutron command: net-ip-availability-list Checking the file: neutron_plugin_base_v2.py I get a list of methods that need to be implemented by a plugin. In this case the net-ip-availability method is not in the list. Because of that, as shown above the code tries to call the regular neutron implementation which fails because there is no database to query on the neutron/contrail node. My question is: What should be the expected behavior when dealing with this neutron command? Some flavors of openstack (RedHat OSP) will use this API in their GUI and produce an error. I also noticed a similar bug on the openstack neutron: https://bugs.launchpad.net/neutron/+bug/1700651<https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_neutron_-2Bbug_1700651&d=DwMFAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=4SMc5wJ_FVS46-BSw4dDnrpmjQWP4eg0fer2nm244qg&m=LJZ4KG-9fg9iE7Jk3T-jVzciEevEVJ8Mwr3CMdsefJo&s=OV_dmTaR2QtE4EI8lQh33pBPLu-3U9CTTnEEVZgWNE8&e=> I tried to port the fix and try, but my implementation is quite different in the Newton version I am using. Regards, Bogdan _______________________________________________ Dev mailing list Dev@lists.opencontrail.org<mailto:Dev@lists.opencontrail.org> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opencontrail.org_mailman_listinfo_dev-5Flists.opencontrail.org&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=4SMc5wJ_FVS46-BSw4dDnrpmjQWP4eg0fer2nm244qg&m=LJZ4KG-9fg9iE7Jk3T-jVzciEevEVJ8Mwr3CMdsefJo&s=0sbfYLDn4MobKdJAbBfp-3mAkavcH66vI2_5wthg3Wg&e=
_______________________________________________ Dev mailing list Dev@lists.opencontrail.org http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org