Security Group Create and adding rule to it, is not raising proper error code for overlimit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Eoghan Glynn |
Bug Description
Security Group Create and adding rule to it, is not raising proper error code for overlimit
Actual result : http 400
Excepted result: http 413
Creation of security group after reaching over limit it is raising HTTP 400, instead of raising HTTP 413.
Following is the nova command log for security group creation
muralik@ubuntu:~$ nova secgroup-create testsec testdesc
ERROR: Quota exceeded, too many security groups. (HTTP 400) (Request-ID: req-f1789db3-
muralik@ubuntu:~$ nova secgroup-list
+------
| Name | Description |
+------
| testsec1 | testsecdesc1 |
| testsec2 | testsecdesc2 |
| testsec3 | testsecdesc3 |
| testsec4 | testsecdesc4 |
| testsec5 | testsecdesc5 |
| testsec6 | testsecdesc6 |
| testsec7 | testsecdesc7 |
| testsec8 | testsecdesc8 |
| testsec9 | testsecdesc9 |
| default | default |
+------
And also the behaviour is same for adding rule to the security group
nova secgroup-add-rule testsec12 icmp 23 19 0.0.0.0/0
ERROR: Quota exceeded, too many security group rules. (HTTP 400) (Request-ID: req-81a7d160-
muralik@ubuntu:~$ nova secgroup-list-rules testsec12
+------
| IP Protocol | From Port | To Port | IP Range | Source Group |
+------
| icmp | 3 | 23 | 0.0.0.0/0 | |
| icmp | 5 | 23 | 0.0.0.0/0 | |
| icmp | 6 | 23 | 0.0.0.0/0 | |
| icmp | 7 | 23 | 0.0.0.0/0 | |
| icmp | 8 | 23 | 0.0.0.0/0 | |
| icmp | 9 | 23 | 0.0.0.0/0 | |
| icmp | 10 | 23 | 0.0.0.0/0 | |
| icmp | 11 | 23 | 0.0.0.0/0 | |
| icmp | 14 | 23 | 0.0.0.0/0 | |
| icmp | 17 | 23 | 0.0.0.0/0 | |
| icmp | 18 | 23 | 0.0.0.0/0 | |
| icmp | 19 | 23 | 0.0.0.0/0 | |
| icmp | 20 | 23 | 0.0.0.0/0 | |
| icmp | 21 | 23 | 0.0.0.0/0 | |
| icmp | 22 | 23 | 0.0.0.0/0 | |
| icmp | 23 | 20 | 0.0.0.0/0 | |
| icmp | 23 | 21 | 0.0.0.0/0 | |
| icmp | 23 | 22 | 0.0.0.0/0 | |
| icmp | 23 | 23 | 0.0.0.0/0 | |
| tcp | 22 | 23 | 0.0.0.0/0 | |
+------
affects: | tempest → nova |
description: | updated |
summary: |
- Security Group Create is not raising proper error code for overlimit + Security Group Create and adding rule to it, is not raising proper + error code for overlimit |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
importance: | Undecided → Low |
milestone: | none → folsom-3 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-3 → 2012.2 |
Ok, here's where the over-quota errors are being raised:
class NativeSecurityG roupAPI( compute. api.SecurityGro upAPI): quota(msg) : est(explanation =msg)
@staticmethod
def raise_over_
raise exc.HTTPBadRequ
@staticmethod found(msg) : d(explanation= msg)
def raise_not_
raise exc.HTTPNotFoun
these should probably just raise exceptions which are subclasses of QuotaError which will cause a 413 to be raised