[Bug 1943639] Re: project/instances/attach_interface has O(N) scaling time complexity for opening form

Nicolas Bock 1943639 at bugs.launchpad.net
Thu Aug 24 18:27:34 UTC 2023


** Description changed:

+ [ Impact ]
+ 
  The time complexity of opening the project/instances/attach_interface
- form box is O(N) where N is the number of networks in the project. This
- is due to
+ form box is O(N) where N is the number of networks in the project with a
+ large prefactor.
+ 
+ This is due to
  
  https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/dashboards/project/instances/utils.py#L210
  
  Which loops over the networks and requests the ports associated with the
  network. For large projects this scaling behavior can become
  prohibitive.
+ 
+ The patch [1] addresses this issue by reducing the number of API calls
+ and hence the prefactor of the algorithm.
+ 
+ [ Test Plan ]
+ 
+ In order to reproduce the issue, create a Nova VM and then add many
+ networks. On the instances tab in the Horizon UI click on "attach
+ interface" for the VM. It will take a moment for the dialog to appear.
+ The exact time until the dialog appears will depend on the number of
+ networks linearly.
+ 
+ With [1] the time it takes for the dialog box to appear will be
+ significantly shorter.
+ 
+ [ Where problems could occur ]
+ 
+ The patch [1] affects the "attach interface" dialog box and could break
+ this UI feature in case something was wrong with the implementation. It
+ is also possible that due to a bug in the implementation some networks
+ are missing from the dialog.
+ 
+ [1] https://review.opendev.org/c/openstack/horizon/+/866895

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/1943639

Title:
  project/instances/attach_interface has O(N) scaling time complexity
  for opening form

Status in OpenStack Dashboard (Horizon):
  Fix Released
Status in horizon package in Ubuntu:
  New
Status in horizon source package in Focal:
  New

Bug description:
  [ Impact ]

  The time complexity of opening the project/instances/attach_interface
  form box is O(N) where N is the number of networks in the project with
  a large prefactor.

  This is due to

  https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/dashboards/project/instances/utils.py#L210

  Which loops over the networks and requests the ports associated with
  the network. For large projects this scaling behavior can become
  prohibitive.

  The patch [1] addresses this issue by reducing the number of API calls
  and hence the prefactor of the algorithm.

  [ Test Plan ]

  In order to reproduce the issue, create a Nova VM and then add many
  networks. On the instances tab in the Horizon UI click on "attach
  interface" for the VM. It will take a moment for the dialog to appear.
  The exact time until the dialog appears will depend on the number of
  networks linearly.

  With [1] the time it takes for the dialog box to appear will be
  significantly shorter.

  [ Where problems could occur ]

  The patch [1] affects the "attach interface" dialog box and could
  break this UI feature in case something was wrong with the
  implementation. It is also possible that due to a bug in the
  implementation some networks are missing from the dialog.

  [1] https://review.opendev.org/c/openstack/horizon/+/866895

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1943639/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list