Bug 1787933 - Succeed to create new security group if security group rule quota is exceeded
Summary: Succeed to create new security group if security group rule quota is exceeded
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.0 (Train)
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: z2
: 16.0 (Train on RHEL 8.1)
Assignee: Rodolfo Alonso
QA Contact: Alex Katz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-05 16:13 UTC by Alex Katz
Modified: 2020-04-06 10:37 UTC (History)
4 users (show)

Fixed In Version: openstack-neutron-15.0.1-0.20191129040411.998d93b.el8ost.noarch
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-06 10:37:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1858680 0 None None None 2020-01-07 18:45:28 UTC
OpenStack gerrit 701565 0 None MERGED Check "security_group_rule" quota during security group creation 2020-09-21 12:33:56 UTC
OpenStack gerrit 705267 0 None MERGED Check "security_group_rule" quota during security group creation 2020-09-21 12:33:53 UTC

Description Alex Katz 2020-01-05 16:13:11 UTC
Description of problem:

New security groups with two default rules can be created successfully if the security group rule quota is exceeded.


How reproducible:

OS_PROJECT_NAME=admin
CREATED=`openstack security group list --project $OS_PROJECT_NAME -f json | jq -r '.[] | .ID' | xargs -I {} openstack security group rule list {} -f value | wc -l`
let "CREATED +=1"
SG=`openstack security group list --project $OS_PROJECT_NAME -f json | jq -r '.[0] | .ID'`
QUOTA=`openstack quota show $OS_PROJECT_NAME -f json | jq -r '.["secgroup-rules"]'`
for ((i=CREATED; i<=QUOTA; i++)); do
   PORT=`printf "%04d" $i`
   openstack security group rule create --ingress --protocol tcp --dst-port 5$PORT:5$PORT $SG
done
openstack security group create --project $OS_PROJECT_NAME sec_group_with_excess_rules


Actual results:

Security group "sec_group_with_excess_rules" created successfully


Expected results:

Security group creation should fail with the error that quota for "security_group_rules" exceed


Additional info:

Looks similar to https://bugs.launchpad.net/heat/+bug/1403092

Comment 6 Lon Hohberger 2020-02-26 12:15:52 UTC
According to our records, this should be resolved by openstack-neutron-15.0.1-0.20191129040411.998d93b.el8ost.  This build is available now.


Note You need to log in before you can comment on or make changes to this bug.