Cisco N1KV plugin doesn't process correctly SQLAlchemy exceptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Ann Taraday |
Bug Description
Test tempest.
"/opt/stack/
Problem reproduced when creating ports and n1kv profile_id not found in database. According Neutron API, for this request allowed only next error codes:
- badRequest (400)
- unauthorized (401)
- forbidden (403)
- itemNotFound (404)
- macGenerationFa
- serviceUnavailable (503)
Test log:
2014-11-17 03:24:07,926 18176 DEBUG [tempest.
Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"network": {"name": "test-network-
Response - Headers: {'status': '201', 'content-length': '301', 'connection': 'close', 'date': 'Mon, 17 Nov 2014 03:24:07 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-
Body: {"network": {"status": "ACTIVE", "subnets": [], "name": "test-network-
2014-11-17 03:24:08,335 18176 DEBUG [tempest.
Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"network": {"name": "test-network-
Response - Headers: {'status': '201', 'content-length': '304', 'connection': 'close', 'date': 'Mon, 17 Nov 2014 03:24:08 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-
Body: {"network": {"status": "ACTIVE", "subnets": [], "name": "test-network-
2014-11-17 03:24:08,390 18176 DEBUG [tempest.
Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"ports": [{"network_id": "dc7b7044-
Response - Headers: {'status': '500', 'content-length': '150', 'connection': 'close', 'date': 'Mon, 17 Nov 2014 03:24:08 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-
Body: {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalSe
}}}
Traceback (most recent call last):
File "tempest/
_, body = self.client.
File "tempest/
resp, body = self.post(uri, body)
File "tempest/
return self.rest_
File "tempest/
return self.request(
File "tempest/
resp, resp_body)
File "tempest/
raise exceptions.
ServerFault: Got server fault
Details: Request Failed: internal server error while processing your request.
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
Neutron log:
2014-11-17 10:15:03.365 ERROR neutron.
2014-11-17 10:15:03.366 ERROR neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
2014-11-17 10:15:03.366 TRACE neutron.
Devstack local.conf:
[[local|localrc]]
MYSQL_PASSWORD=nova
RABBIT_
SERVICE_TOKEN=nova
SERVICE_
ADMIN_PASSWORD=nova
ENABLED_
disable_service horizon
disable_service n-net, q-agt, q-l3
enable_service mysql, q-svc, q-dhcp, q-meta, q-lbaas, neutron, tempest
VOLUME_
Q_PLUGIN=cisco
declare -a Q_CISCO_
Q_CISCO_
Q_CISCO_
Q_CISCO_
Q_CISCO_
Q_CISCO_
Q_CISCO_
Q_CISCO_
PHYSICAL_
LIBVIRT_
API_RATE_
VERBOSE=True
DEBUG=True
tags: | added: cisco |
tags: | added: n1kv |
information type: | Public → Public Security |
information type: | Public Security → Public |
Changed in neutron: | |
importance: | Undecided → Low |
status: | New → Confirmed |
tags: | added: api |
Changed in neutron: | |
assignee: | nobody → Ann Kamyshnikova (akamyshnikova) |
Changed in neutron: | |
status: | Confirmed → In Progress |
Changed in neutron: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | kilo-1 → 2015.1.0 |
Reviewed: https:/ /review. openstack. org/135533 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=aef70818855 4948f84be4ce3cb 1b1a8778f6153e
Committed: https:/
Submitter: Jenkins
Branch: master
commit aef708188554948 f84be4ce3cb1b1a 8778f6153e
Author: Ann Kamyshnikova <email address hidden>
Date: Wed Nov 19 11:51:14 2014 +0300
Catch NoResultFound in _get_policy_ profile_ by_name
Add try-except in _get_policy_ profile_ by_name to raise meNotFound if profile not found in
proper PolicyProfileNa
database.
Also unittest is added.
Closes-bug: #1393399
Change-Id: I3ab50a6870ff77 a95e0977c75255e 9cbd7286fbb