Bug 1417548

Summary: [BackPort] Broken instances quota check in Liberty
Product: Red Hat OpenStack Reporter: Robin Cernin <rcernin>
Component: python-django-horizonAssignee: Radomir Dopieralski <rdopiera>
Status: CLOSED ERRATA QA Contact: Ido Ovadia <iovadia>
Severity: urgent Docs Contact:
Priority: high    
Version: 8.0 (Liberty)CC: aortega, apannu, athomas, dbecker, dcadzow, ealcaniz, iovadia, mburns, molasaga, mrunge, pablo.iranzo, rdopiera, sclewis, srevivo
Target Milestone: asyncKeywords: FeatureBackport, Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-django-horizon-8.0.1-12.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1430684 (view as bug list) Environment:
Last Closed: 2017-06-14 15:44:04 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:
Bug Depends On:    
Bug Blocks: 1381612, 1430684    

Description Robin Cernin 2017-01-30 09:02:41 UTC
Description of problem:

Bug description from LP:

~~~
I have recently upgraded my cluster to Liberty for all projects. Now, when I create new instances, I frequently get an incorrect quota warning from the instance creation workflow, despite having plenty of available quota:

"The requested instance cannot be launched as you only have 0 of your quota available."

The issue is happening within the _get_tenant_compute_usages() check. That function determines (correctly) that I am able to list instances in all projects, so passes 'all_tenants' to the nova api. That results in an api call that looks like this:

"GET /v2/<tenantid>/servers/detail?all_tenants=True&tenant_id=<tenantid> HTTP/1.1"

Nova replies with a list of every instance in my entire cloud, 719 at last count. The call is very slow and, of course, 719 is many more than my instance quota for the current project, so Horizon determines that I am over quota.

Note that this issue didn't appear when I was running Liberty Horizon with Kilo Nova (so maybe this is a bug or change in the nova-api) Best I can tell, the offending code in Horizon is still present in the git head.
~~~

Requested a patch(backport) to Liberty of LP#1610693

- https://bugs.launchpad.net/horizon/+bug/1610693

Version-Release number of selected component (if applicable):

Red Hat OpenStack Platform 8

Comment 10 Mikel Olasagasti 2017-03-07 10:43:58 UTC
Customer applied https://review.openstack.org/#/c/422760 manually and works.

Comment 12 Red Hat Bugzilla Rules Engine 2017-03-09 11:41:46 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 14 Edu Alcaniz 2017-04-03 09:07:16 UTC
Hi, it seems that the errata should be delivered on 	2017-Mar-29 (custom), could you update to the BZ please.

Comment 20 Radomir Dopieralski 2017-05-02 16:12:42 UTC
I verified that the "launch instance" dialog now only shows the count of instances from the currently selected project, and not from all projects.

Comment 26 errata-xmlrpc 2017-06-14 15:44:04 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, 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-2017:1471