Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2242532

Summary: Horizon's suboptimal calls cause significant delays for admin/networks tab
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: python-django-horizonAssignee: Radomir Dopieralski <rdopiera>
Status: CLOSED ERRATA QA Contact: Ashish Gupta <ashigupt>
Severity: high Docs Contact:
Priority: high    
Version: 16.2 (Train)CC: dhill, dhughes, jpretori, ktordeur, madgupta, mariel, pgrist, pweeks, rdopiera, shtiwari, tovchinn
Target Milestone: asyncKeywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: python-django-horizon-16.2.3-2.20230510005036.f9e08ed.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-09 14:55:16 UTC 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:
Attachments:
Description Flags
Reproduced problem in my RHOSP 16.2 lab none

Description Alex Stupnikov 2023-10-06 18:23:03 UTC
Description of problem:
Customer complained about timeouts when opening admin/networks tab and we tried to understand what is going one and why requests time out. We focused on dashboard/admin/networks/ (customer also complained about instance's list).

Here are our findings:
- single v2.0/extensions -X GET
- single v2.0/networks -X GET (took around 7 seconds)
- single v2.0/subnets -X GET (around 2 seconds)
- 894 requests for NEUTRON v2.0/networks/UUID/dhcp-agents (took 36 seconds total)
- 336 requests for v2.0/quotas/ID/details (took 63 seconds total)

Here are the problems with this approach:

- Horizon uses information about number of DHCP agents to fill one of columns, but after switching to OVN most networks have 0 agents. So it is unclear why we really need this column at such cost.
- Horizon uses information about quotas to decide if admin can create a subnet or not using "Create Subnet" button. Again, it looks like cost is too high.
- Horizon makes requests one by one instead of making them in batches. In customer's environment there are 3 neutron servers with 12 workers each, most customers also run environments with multiple workers, so making more than 1200 requests one by one doesn't look like an optimal strategy.


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


How reproducible:
Create numerous networks and projects, open admin/networks tab.


Actual results:
More than 90 seconds are spent to obtain minor details about amount of DHCP agents and subnet quotas, this causes timeout in deployments with default Timeout settings.


Expected results:
No timeout because information about networks and subnets is obtained in 10 seconds

Comment 16 David Hill 2023-11-22 14:31:15 UTC
Something like this

https://review.opendev.org/c/openstack/horizon/+/901675

Comment 17 Alex Stupnikov 2023-11-22 17:24:13 UTC
Created attachment 2000941 [details]
Reproduced problem in my RHOSP 16.2 lab

Comment 37 errata-xmlrpc 2025-01-09 14:55:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.2 bug fix advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2025:0200