create_with_nonexistent_security_group fails : Quantum returns a 404 where Nova-network returns a 400
Bug #1183347 reported by
Jordan Pittier
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
melanie witt | ||
tempest |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In test_servers_
See https:/
Changed in tempest: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
milestone: | none → havana-1 |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Melanie Witt (melwitt) |
status: | Confirmed → In Progress |
Changed in tempest: | |
milestone: | havana-1 → havana-2 |
Changed in nova: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-2 → 2013.2 |
To post a comment you must log in.
Quantum driver is raising exc.HTTPNotFound exception from nova/api/ openstack/ compute/ contrib/ security_ groups. py NativeSecurityG roupExceptions, which gives the 404.
In nova/api/ openstack/ compute/ servers. py, exception. SecurityGroupNo tFound (that's raised at the nova db layer) is caught and then exc.HTTPBadRequest raised, so nova-network gives the 400 result.
There's a kwarg, map_exception, for the SecurityGroupAP I::get function in nova/compute/api.py that defaults to False. Because it's False, it re-raises the exception. SecurityGroupNo tFound instead of mapping it to exc.HTTPNotFound.
There are different ways to handle this:
1. Raise exc.HTTPNotFound in nova/api/ openstack/ compute/ servers. py when exception. SecurityGroupNo tFound is caught
2. Call SecurityGroupAP I::get with map_exception=True
3. Have quantum driver raise exception. SecurityGroupNo tFound instead of exc.HTTPNotFound if quantum api responds with 404.