[Performance]Can not disable quota check for button availability check

Bug #1662347 reported by Lingxian Kong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Undecided
Feilong Wang

Bug Description

When loading a resource page, Horizon will decide if the resource creation button should be hidden or not according to tenant resource usage. Horizon implements quota checking as a generic method as it may be used in many places, so it will get resource usage from Nova, Cinder, Neutron, not only from Neutron. It will lead to several issues:

1. The page loading is very slow because of the quota check.
2. The quota check (especially in Horizon) doesn't make much sense in public cloud.

Tags: performance
Lingxian Kong (kong)
tags: added: performance
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/430029

Changed in horizon:
assignee: nobody → Lingxian Kong (kong)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Lingxian Kong (<email address hidden>) on branch: master
Review: https://review.openstack.org/430029

Revision history for this message
Feilong Wang (flwang) wrote : Re: Can not disable quota check for button availability check

This is a follow up for this bug but focusing on the instance panel. Based on my test, running Horizon Pike locally and using our public cloud API, I got below result:

1. For some reasons, the quota check/allowed of the launch instance button will be called 2 times, which takes about 0.14 seconds based on our prod env (prod API with local horizon)

2. The launch instance form will do the quota check again, so user will not be able to create instance and don't have to wait resp from nova if the quota has been exceeded.

See https://ibb.co/kor5Tw and https://ibb.co/kKm8Fb

So in summary, it's safe to remove the quota check for "Launch Instance" button and leave it to the form. I will propose a patch soon.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/509038

Changed in horizon:
assignee: Lingxian Kong (kong) → Feilong Wang (flwang)
Revision history for this message
Radomir Dopieralski (deshipu) wrote : Re: Can not disable quota check for button availability check

I'm a bit conflicted about this. On one hand, we shouldn't display to users actions that we know will fail for them — that's just bad feedback. On the other hand, the users should not have to guess why a given option is disabled in a particular situation, and that is what happens when we just disable the button without any extra information.

Feilong Wang (flwang)
summary: - Can not disable quota check for button availability check
+ [Performance]Can not disable quota check for button availability check
Revision history for this message
Feilong Wang (flwang) wrote :

@Radomir, thanks for the comments. Actually, there is no user experience impacting. Please see See https://ibb.co/kor5Tw and https://ibb.co/kKm8Fb

Maybe I should update the bug description. Currently, there are duplicated checking for the instance quota. One for the “Launch Instance" button, one in the launch instance form. So currently, the idea is we don't check the quota when loading the page, but always show the "Launch Instance" button. When user try to launch a new instance, if the quota has been exceeded, then user will see https://ibb.co/kor5Tw and https://ibb.co/kKm8Fb So I don't think the UX is impacted because comparing a very slow instance panel, we're definitely making it better :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/509038
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4083d08e863878fe7990556bae72852a019d39e1
Submitter: Jenkins
Branch: master

commit 4083d08e863878fe7990556bae72852a019d39e1
Author: Feilong Wang <email address hidden>
Date: Tue Oct 3 13:04:34 2017 +1300

    Remove the quota check for "Launch Instance" button

    This patch is going to remove the quota check for "Launch Instance" button,
    because:

    1. For some reasons, the quota check/allowed of the launch instance button
    will be called 2 times, which takes about 0.14 seconds based on our prod
    env (prod API with local horizon)

    2. The launch instance form will do the quota check again, so user will
    not be able to create instance and don't have to wait resp from nova if
    the quota has been exceeded. See https://ibb.co/kor5Tw and
    https://ibb.co/kKm8Fb

    Partial-Bug: #1662347

    Change-Id: I0c4aaf6da29145856f4ab307e40a91c4b47b2135

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/511072

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/pike)

Change abandoned by Feilong Wang (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/511072

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.