openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #02874
[NetStack]Quantum routes error
Hi,
I encountered a regular expression error when running Quantum service on
a Red Hat installation. The Quantum service is not able to process any
requests on account of which this error. The exception trace is appended
to this email, but in short, the offending regular expression appears to
be coming from the URL mapper for the "port" resource. After adding some
debug statements to the code, it seems like that regex is:
^/tenants\/(?P<tenant_id>[^/]+?)\/networks\/(?P<network_id>[^/]+?)\/port
s\/(?P<id>[^/]+?)\/attachment(?P<.format>[^/]+?)(/)?$
Trying to validate the above regex points to a "group" error.
I am able to get around this by commenting out the mapper.connect()
calls for the "port" resource in quantum/api/__init__.py
I did not see this error when running Quantum on Ubuntu. Is this an
artifact of an incorrect "routes" version that I might be running on
RHEL, or is it something else? Any pointers are appreciated.
Thanks,
~Sumit.
Exception trace:
...
...
2011-06-11 17:04:54 DEBUG [routes.middleware] Initialized with method
overriding = True, and path info altering = True
2011-06-11 17:04:54 DEBUG [eventlet.wsgi.server] (19740) wsgi
starting up on http://0.0.0.0:9696/
2011-06-11 17:09:41 DEBUG [quantum.common.wsgi] HERE -
wsgi.Router.__call__
2011-06-11 17:09:41 DEBUG [eventlet.wsgi.server] Traceback (most
recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 336, in
handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 203, in
__call__
return app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 159, in
__call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 82,
in __call__
config.environ = environ
File "/usr/lib/python2.6/site-packages/routes/__init__.py", line 22, in
__setattr__
self.load_wsgi_environ(value)
File "/usr/lib/python2.6/site-packages/routes/__init__.py", line 51,
in load_wsgi_environ
result = mapper.routematch(path)
File "/usr/lib/python2.6/site-packages/routes/mapper.py", line 336, in
routematch
result = self._match(url)
File "/usr/lib/python2.6/site-packages/routes/mapper.py", line 270, in
_match
self.create_regs()
File "/usr/lib/python2.6/site-packages/routes/mapper.py", line 237, in
create_regs
self._create_regs(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/routes/mapper.py", line 251, in
_create_regs
route.makeregexp(clist)
File "/usr/lib/python2.6/site-packages/routes/route.py", line 287, in
makeregexp
self.regmatch = re.compile(reg)
File "/usr/lib64/python2.6/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib64/python2.6/re.py", line 245, in _compile
raise error, v # invalid expression
error: bad character in group name
2011-06-11 17:09:41 DEBUG [eventlet.wsgi.server] 10.10.9.99 - -
[11/Jun/2011 17:09:41] "DELETE /v0.1/tenants/totore/networks/000003.json
HTTP/1.1" 500 1735 0.004934
...
...
Follow ups
References