Bug 2262100

Summary: openstack security group list --project <project_name> takes very long and is not using RBAC
Product: Red Hat OpenStack Reporter: Eduard Barrera <ebarrera>
Component: openstack-neutronAssignee: Rodolfo Alonso <ralonsoh>
Status: MODIFIED --- QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: chrisw, ralonsoh, scohen
Target Milestone: ---Keywords: Triaged
Target Release: ---Flags: ralonsoh: needinfo? (ebarrera)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-15.3.5-2.20240220114830.63bac0f.el8osttrunk Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2263516 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2263516    

Description Eduard Barrera 2024-01-31 14:52:27 UTC
Description of problem:

There was this bug where neutron API was taking really long to answer when RBAC was used:

 https://bugzilla.redhat.com/show_bug.cgi?id=2218183


But in this case RBAC is not used an api calls takes really long to answer, even they timeout:

# time openstack security group list --project <ProjectName> |wc -l
HttpException: 504: Server Error for url: \ 
 https://osp-dev.inf.example:13696/v2.0/security-groups?project_id=b26cbe7dd923467689642da0c92f4f1f&
 tenant_id=b26cbe7dd923467689642da0c92f4f1f, 504 Gateway Time-out: The server didn't respond in time.


> select count(*) from securitygroupportbindings;
|    19457 |
> select count(*) from securitygrouprbacs;
|        0 |
> select count(*) from securitygrouprules;
|   123911 |
> select count(*) from securitygroups;
|     7196 |

# openstack port list -c ID -f value | wc -l
5613
# openstack project list -c ID -f value | wc -l
2582


Version-Release number of selected component (if applicable):
Red Hat OpenStack Platform release 16.2.2 (Train)


How reproducible:
Always

Steps to Reproduce:
1. openstack security group list --project <project_name> 
2.
3.

Actual results:
Api calls take too long, heat stack fails