Cannot display project overview page due to "cannot convert float infinity to integer" error

Bug #1370869 reported by Akihiro Motoki
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki
Icehouse
Fix Released
Medium
Julie Pichon

Bug Description

Due to nova bug 1370867, nova absolute-limits sometimes returns -1 for *Used fields rather than 0.
If this happens, the project overview page cannot be displayed with "cannot convert float infinity to integer" error.
Users cannot use the dashboard without specifying URL directly, so it is better the dashboard guards this situation.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

[Thu Sep 18 05:11:31.177843 2014] [:error] [pid 28497:tid 139872488023808]
[Thu Sep 18 05:11:31.177862 2014] [:error] [pid 28497:tid 139872488023808] REQ: curl -i --insecure 'https://172.16.201.25:8774/v2/ebcbf37ab1454484b6e22a99fb31e7d6/limits' -X GET -H "X-Auth-Project-Id: ebcbf37ab1454484b6e22a99fb31e7d6" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 760f5e88c49232e38db8cf459d5f1d20"
[Thu Sep 18 05:11:31.177870 2014] [:error] [pid 28497:tid 139872488023808]
[Thu Sep 18 05:11:31.178005 2014] [:error] [pid 28497:tid 139872488023808] New session created for: (https://172.16.201.25:8774)
[Thu Sep 18 05:11:31.179368 2014] [:error] [pid 28497:tid 139872488023808] DEBUG:urllib3.connectionpool:Setting read timeout to None
[Thu Sep 18 05:11:31.202475 2014] [:error] [pid 28497:tid 139872488023808] DEBUG:urllib3.connectionpool:"GET /v2/ebcbf37ab1454484b6e22a99fb31e7d6/limits HTTP/1.1" 200 437
[Thu Sep 18 05:11:31.203036 2014] [:error] [pid 28497:tid 139872488023808] RESP: [200] CaseInsensitiveDict({'date': 'Thu, 18 Sep 2014 05:11:31 GMT', 'content-length': '437', 'content-type': 'application/json', 'x-compute-request-id': 'req-244a0865-bf44-4932-85aa-0c5569cf10f1'})
[Thu Sep 18 05:11:31.203057 2014] [:error] [pid 28497:tid 139872488023808] RESP BODY: {"limits": {"rate": [], "absolute": {"maxServerMeta": 128, "maxPersonality": 5, "maxImageMeta": 128, "maxPersonalitySize": 10240, "maxSecurityGroupRules": 20, "maxTotalKeypairs": 100, "totalRAMUsed": -2048, "totalInstancesUsed": -1, "maxSecurityGroups": 10, "totalFloatingIpsUsed": 0, "maxTotalCores": 20, "totalSecurityGroupsUsed": 1, "maxTotalFloatingIps": 10, "maxTotalInstances": 10, "totalCoresUsed": -1, "maxTotalRAMSize": 51200}}}

Revision history for this message
Akihiro Motoki (amotoki) wrote :
Revision history for this message
Julie Pichon (jpichon) wrote :

I think this is higher priority than "Low", Horizon shouldn't return an error 500 and block the user from performing any other action. Putting as Medium but if this can happen often, I think it should be High... Thanks for the report and the workaround indicated in the nova bug.

Changed in horizon:
importance: Low → Medium
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Ah.. I just thought it is Low because it rarely happens in my experience in the testbed.

On a second thought I agree higher priority looks appropriate because user impact is not small once if it happens.

Akihiro Motoki (amotoki)
tags: added: icehouse-backport-potential
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/122339

Changed in horizon:
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit d49ad74e280f9b7d9397e951f12dc428f26821df
Author: Akihiro Motoki <email address hidden>
Date: Thu Sep 18 15:52:35 2014 +0900

    Workaround for negative vals in total*Used in nova absolute_limits

    Due to bug 1370867 there is a case where negative values are returned
    in total*Used in absolute_limits. If it occurs, Horizon Overview page
    cannot be displayed due to an error "cannot convert float infinity to
    integer". This commit replaces negative values in total*Used with 0
    for a workarond.

    Change-Id: I606803bdff1d335cc9f92d67619ff82f356a5143
    Closes-Bug: #1370869

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: juno-rc1 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/132257

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

Reviewed: https://review.openstack.org/132257
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2b292e839019b02ff75546f0e19923ff1e8a10c9
Submitter: Jenkins
Branch: stable/icehouse

commit 2b292e839019b02ff75546f0e19923ff1e8a10c9
Author: Akihiro Motoki <email address hidden>
Date: Thu Sep 18 15:52:35 2014 +0900

    Workaround for negative vals in total*Used in nova absolute_limits

    Due to bug 1370867 there is a case where negative values are returned
    in total*Used in absolute_limits. If it occurs, Horizon Overview page
    cannot be displayed due to an error "cannot convert float infinity to
    integer". This commit replaces negative values in total*Used with 0
    for a workarond.

    Conflicts:
     openstack_dashboard/test/api_tests/nova_tests.py

    Change-Id: I606803bdff1d335cc9f92d67619ff82f356a5143
    Closes-Bug: #1370869
    (cherry picked from commit d49ad74e280f9b7d9397e951f12dc428f26821df)

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.