When Nova quotas are disabled, one cannot choose flavor in Launch Instance NG

Bug #1482705 reported by Timur Sufiev
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Timur Sufiev

Bug Description

In some OpenStack setups Nova quotas are disabled (partly due to performance reasons, partly because of legacy issues) by using no-op driver for them. In this situation it's impossible to launch an instance with Angular-based workflow because the process is blocked at Flavor selection phase.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

The corresponding limits request looks like that:

REQ: curl -g -i 'http://<controller ip>:8774/v2/e02cd7bf61784ab980df1fffb6869e0d/limits?reserved=1' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: e02cd7bf61784ab980df1fffb6869e0d" -H "X-Auth-Token: {SHA1}5bc5cfe202c20ee5ad5f34dccc89935667a5df4d"
RESP: [200] {'date': 'Fri, 07 Aug 2015 16:03:02 GMT', 'connection': 'close', 'content-type': 'application/json', 'content-length': '509', 'x-compute-request-id': 'req-e48370e0-92f6-4cd1-9cd9-c9cebff733ac'}
RESP BODY: {"limits": {"rate": [], "absolute": {"maxServerMeta": -1, "maxPersonality": -1, "totalServerGroupsUsed": -2, "maxImageMeta": -1, "maxPersonalitySize": -1, "maxTotalRAMSize": -1, "maxTotalKeypairs": -1, "maxSecurityGroupRules": -1, "maxServerGroups": -1, "totalCoresUsed": -2, "totalRAMUsed": -2, "maxSecurityGroups": -1, "totalFloatingIpsUsed": -2, "totalInstancesUsed": -2, "totalSecurityGroupsUsed": -2, "maxTotalFloatingIps": -1, "maxTotalInstances": -1, "maxTotalCores": -1, "maxServerGroupMembers": -1}}}

Changed in horizon:
importance: Undecided → High
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
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/215196

Changed in horizon:
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
milestone: none → liberty-rc1
Revision history for this message
Travis Tripp (travis-tripp) wrote :

Verified with just ram and with all disabled.

Just RAM screenshot attached.

For those looking to test, you can disable all quotas or just make ram infinite for the demo project.

Just RAM:

 source ~/devstack/openrc admin admin
 tenant=$(openstack project show -f value -c id 'demo')
 nova quota-update --ram -1 $tenant
 nova quota-show --tenant $tenant

Then go into launch instance and expand a flavor.

All quotas: Do the following:

 vi /etc/nova/nova.conf

add to [DEFAULT]
quota_driver = nova.quota.NoopQuotaDriver

Restart nova api (n-api in devstack).

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

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

commit 5398de264d6b40120b20eb123faff68a13f9de30
Author: Timur Sufiev <email address hidden>
Date: Thu Aug 20 18:36:51 2015 +0300

    Enable Launch Instance NG for the case when Nova quotas are disabled

    Do this by representing every float('inf') python numeric as a 1e+999
    JSON token - this way Javascript JSON.parse() correctly transforms it
    to the Javascript Infinity object. The infinity value corresponds to
    disabled limits.

    The logic of representing infinity values as 1e+999 tokens is
    implemented by means of custom `NaNJSONEncoder` which overrides
    `iterencode` method of its `json.JSONEncoder` ancestor. Due to the
    fact that the ancestor method could take an advantage of
    `c_make_encoder` function (which is implemented in C) - and thus could
    be much faster, I'm using the custom encoder only where it's really
    needed, to not hamper Horizon performance.

    Rewrite pie-chart directive rendering according to
    https://invis.io/A4445BDSF

    Change-Id: If498d9ccd5f0144c9e78ae58583ede2c1cf83f0b
    Closes-Bug: #1482705

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-rc1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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