Hi,
I have taken a more thorough look at the database implementations. On
the plugin side all of the plugins make use of the common database code
(../quantum/quantum/db/*). Today I tested a number of scenarios with
connectivity to the server. This works well with the linuxbridge and the
openvswitch plugins. Taking into account that we working on the
scalability of the agents
(https://blueprints.launchpad.net/quantum/+spec/scalable-agent-comms), I
am pretty convinced that a large part of the blueprint is redundant.
Nonetheless I still think we need to address
1. Common configuration for the database strings (similarly to those in
OpenStack)
2. If the Quantum service starts and the database is down. Quantum
service terminates. Output:
[f17-dev@localhost ~]$ quantum list_nets default
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/quantum/client/cli_lib.py", line 237,
in list_nets_v11
res = client.list_networks(**filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 145,
in with_params
ret = self.function(instance, *args)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 522,
in list_networks
return self.get(self.networks_path, params=filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 379,
in get
headers=headers, params=params)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 371,
in retry_request
raise exceptions.ConnectionFailed(reason=_("Maximum attempts
reached"))
ConnectionFailed: Connection to quantum failed: Maximum attempts
reached
3. Error handling - for example when using the CLI and the DB is down we
get the attached output. It would be better if the trace was looged and
the user would receive the specific error message.
[f17-dev@localhost ~]$ quantum list_nets default
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/quantum/client/cli_lib.py", line 237,
in list_nets_v11
res = client.list_networks(**filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 145,
in with_params
ret = self.function(instance, *args)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 522,
in list_networks
...
raise exceptions.QuantumClientException(message=msg)
QuantumClientException: 500-{'message': 'Traceback (most recent
call last):\n File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py",
line 336, in handle_one_response\n result =
self.application(self.environ, start_response)\n File
"/usr/lib/python2.7/site-packages/paste/urlmap.py", line 203, in
__call__\n return app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in
__call__\n response = self.app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in
__call__\n response = self.app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 147, in
__call__\n resp = self.call_func(req, *args, **self.kwargs)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 210, in
call_func\n return self.func(req, *args, **kwargs)\n File
"/usr/lib/python2.7/site-packages/quantum/wsgi.py", line 748, in
__call__\n action_result = self.dispatch(request, action, args)\n
File "/usr/lib/python2.7/site-packages/quantum/wsgi.py", line 780, in
dispatch\n return controller_method(request=request,
**action_args)\n File
"/usr/lib/python2.7/site-packages/quantum/api/api_common.py", line 108,
in the_func\n return func(*args, **kwargs)\n File
"/usr/lib/python2.7/site-packages/quantum/api/networks.py", line 101, in
index\n return self._items(request, tenant_id)\n File
"/usr/lib/python2.7/site-packages/quantum/api/networks.py", line 84, in
_items\n filter_opts=filter_opts)\n File
"/usr/lib/python2.7/site-packages/quantum/plugins/linuxbridge/LinuxBridgePlugin.py",
line 71, in get_all_networks\n networks_list =
db.network_list(tenant_id)\n File
"/usr/lib/python2.7/site-packages/quantum/db/api.py", line 131, in
network_list\n filter_by(tenant_id=tenant_id).\\\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2066,
in all\n return list(self)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2176,
in __iter__\n return self._execute_and_instances(context)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2189,
in _execute_and_instances\n close_with_result=True)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2180,
in _connection_from_session\n **kw)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line
729, in connection\n close_with_result=close_with_result)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line
735, in _connection_for_bind\n return
engine.contextual_connect(**kwargs)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line
2476, in contextual_connect\n self.pool.connect(),\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 224, in
connect\n return _ConnectionFairy(self).checkout()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 466, in
checkout\n self.connection =
self._connection_record.get_connection()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 300, in
get_connection\n self.connection = self.__connect()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 330, in
__connect\n connection = self.__pool._creator()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py",
line 80, in connect\n return dialect.connect(*cargs, **cparams)\n
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py",
line 285, in connect\n return self.dbapi.connect(*cargs,
**cparams)\n File
"/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in
Connect\n return Connection(*args, **kwargs)\n File
"/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187,
in __init__\n super(Connection, self).__init__(*args,
**kwargs2)\nOperationalError: (OperationalError) (2003, "Can\'t connect
to MySQL server on \'localhost.localdomain\' (111)") None None\n'}
Any thought and or comments. Any objections if I update the blueprint to
deal with the the above items.
Thanks
Gary
--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp
I have taken a more thorough look at the database implementations. On
the plugin side all of the plugins make use of the common database code
(../quantum/quantum/db/*). Today I tested a number of scenarios with
connectivity to the server. This works well with the linuxbridge and the
openvswitch plugins. Taking into account that we working on the
scalability of the agents
(https://blueprints.launchpad.net/quantum/+spec/scalable-agent-comms), I
am pretty convinced that a large part of the blueprint is redundant.
Nonetheless I still think we need to address
1. Common configuration for the database strings (similarly to those in
OpenStack)
2. If the Quantum service starts and the database is down. Quantum
service terminates. Output:
[f17-dev@localhost ~]$ quantum list_nets default
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/quantum/client/cli_lib.py", line 237,
in list_nets_v11
res = client.list_networks(**filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 145,
in with_params
ret = self.function(instance, *args)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 522,
in list_networks
return self.get(self.networks_path, params=filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 379,
in get
headers=headers, params=params)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 371,
in retry_request
raise exceptions.ConnectionFailed(reason=_("Maximum attempts
reached"))
ConnectionFailed: Connection to quantum failed: Maximum attempts
reached
3. Error handling - for example when using the CLI and the DB is down we
get the attached output. It would be better if the trace was looged and
the user would receive the specific error message.
[f17-dev@localhost ~]$ quantum list_nets default
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/quantum/client/cli_lib.py", line 237,
in list_nets_v11
res = client.list_networks(**filters)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 145,
in with_params
ret = self.function(instance, *args)
File
"/usr/lib/python2.7/site-packages/quantum/client/__init__.py", line 522,
in list_networks
...
raise exceptions.QuantumClientException(message=msg)
QuantumClientException: 500-{'message': 'Traceback (most recent
call last):\n File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py",
line 336, in handle_one_response\n result =
self.application(self.environ, start_response)\n File
"/usr/lib/python2.7/site-packages/paste/urlmap.py", line 203, in
__call__\n return app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in
__call__\n response = self.app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in
__call__\n response = self.app(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 159, in
__call__\n return resp(environ, start_response)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 147, in
__call__\n resp = self.call_func(req, *args, **self.kwargs)\n File
"/usr/lib/python2.7/site-packages/webob/dec.py", line 210, in
call_func\n return self.func(req, *args, **kwargs)\n File
"/usr/lib/python2.7/site-packages/quantum/wsgi.py", line 748, in
__call__\n action_result = self.dispatch(request, action, args)\n
File "/usr/lib/python2.7/site-packages/quantum/wsgi.py", line 780, in
dispatch\n return controller_method(request=request,
**action_args)\n File
"/usr/lib/python2.7/site-packages/quantum/api/api_common.py", line 108,
in the_func\n return func(*args, **kwargs)\n File
"/usr/lib/python2.7/site-packages/quantum/api/networks.py", line 101, in
index\n return self._items(request, tenant_id)\n File
"/usr/lib/python2.7/site-packages/quantum/api/networks.py", line 84, in
_items\n filter_opts=filter_opts)\n File
"/usr/lib/python2.7/site-packages/quantum/plugins/linuxbridge/LinuxBridgePlugin.py",
line 71, in get_all_networks\n networks_list =
db.network_list(tenant_id)\n File
"/usr/lib/python2.7/site-packages/quantum/db/api.py", line 131, in
network_list\n filter_by(tenant_id=tenant_id).\\\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2066,
in all\n return list(self)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2176,
in __iter__\n return self._execute_and_instances(context)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2189,
in _execute_and_instances\n close_with_result=True)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2180,
in _connection_from_session\n **kw)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line
729, in connection\n close_with_result=close_with_result)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line
735, in _connection_for_bind\n return
engine.contextual_connect(**kwargs)\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line
2476, in contextual_connect\n self.pool.connect(),\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 224, in
connect\n return _ConnectionFairy(self).checkout()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 466, in
checkout\n self.connection =
self._connection_record.get_connection()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 300, in
get_connection\n self.connection = self.__connect()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 330, in
__connect\n connection = self.__pool._creator()\n File
"/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py",
line 80, in connect\n return dialect.connect(*cargs, **cparams)\n
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py",
line 285, in connect\n return self.dbapi.connect(*cargs,
**cparams)\n File
"/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in
Connect\n return Connection(*args, **kwargs)\n File
"/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187,
in __init__\n super(Connection, self).__init__(*args,
**kwargs2)\nOperationalError: (OperationalError) (2003, "Can\'t connect
to MySQL server on \'localhost.localdomain\' (111)") None None\n'}
Any thought and or comments. Any objections if I update the blueprint to
deal with the the above items.
Thanks
Gary
--
Mailing list: https://launchpad.net/~netstack
Post to : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help : https://help.launchpad.net/ListHelp