Get rid of redundant cinder api calls

Bug #1703584 reported by Michael Dovgal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Michael Dovgal

Bug Description

During executing tenant_limit_usages quotas function here [0] we get information about cinder volumes/snapshots/gigabites usage. Like this:

{u'maxTotalBackupGigabytes': 1000,
 u'maxTotalBackups': 10,
 u'maxTotalSnapshots': 10,
 u'maxTotalVolumeGigabytes': 1000,
 u'maxTotalVolumes': 10,
 u'totalBackupGigabytesUsed': 1,
 u'totalBackupsUsed': 1,
 u'totalGigabytesUsed': 8,
 u'totalSnapshotsUsed': 1,
 u'totalVolumesUsed': 6
}

After it here [1] we trying to get the same information as we've already got and add it one more time to limits dict here [2]
Also these calls slows down the application, so we need to get rid of them.

[0] - https://github.com/openstack/horizon/blob/29a6ed4cc06ef9cbadee311c947fe19308a387ed/openstack_dashboard/usage/quotas.py#L489

https://github.com/openstack/horizon/blob/29a6ed4cc06ef9cbadee311c947fe19308a387ed/openstack_dashboard/usage/quotas.py#L490-L491
[2] - https://github.com/openstack/horizon/blob/29a6ed4cc06ef9cbadee311c947fe19308a387ed/openstack_dashboard/usage/quotas.py#L497-L499

Michael Dovgal (mdovgal)
description: updated
Changed in horizon:
assignee: nobody → Michael Dovgal (mdovgal)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit d132c2eb11bdf4a28bedcd4061d5b76b4402a08e
Author: Mykhailo Dovgal <email address hidden>
Date: Mon Jul 10 19:16:06 2017 +0300

    Get rid of redundant cinder api calls

    During executing tenant_limit_usages quotas function we get
    information about cinder volumes/snapshots/gigabites usage
    that we've already had after tenant_absolute_limits call.
    Getting this information we make more api calls that slow down
    our application.

    This patch fixes this issue.

    Closes-Bug: #1703584
    Change-Id: Ia6d2dbb8f18ce93f71668d6ebd2689b851586ca9

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: none → pike-3
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

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.