Cells capacity reports can be wrong when multiple flavors have the same disk/ram size

Bug #1276728 reported by Andrew Laski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Andrew Laski

Bug Description

mysql> select memory_mb,memory_mb_used,free_ram_mb,free_disk_gb from compute_nodes where free_ram_mb > 8000;
+-----------+----------------+-------------+--------------+
| memory_mb | memory_mb_used | free_ram_mb | free_disk_gb |
+-----------+----------------+-------------+--------------+
| 131026 | 121640 | 9386 | 810 |
| 131026 | 121621 | 9405 | 990 |
| 131026 | 121636 | 9390 | 790 |
+-----------+----------------+-------------+--------------+
3 rows in set (0.00 sec)

which indicates three hosts that can handle an 8GB instance, but the capacity reported in the cell log shows:

capacities: {'ram_free': {'units_by_mb': {'8192': 6,

What's happening is that two flavors have memory_mb set to 8192 so the slots are being counted twice.

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

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

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

Reviewed: https://review.openstack.org/71372
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3720fd17b060de6f14e537e6c003e923c67c65a0
Submitter: Jenkins
Branch: master

commit 3720fd17b060de6f14e537e6c003e923c67c65a0
Author: Andrew Laski <email address hidden>
Date: Wed Feb 5 15:07:23 2014 -0500

    Count memory and disk slots once in cells state manager

    If multiple instance types in a cell had the same memory_mb value or
    root_gb + ephemeral_gb added to the same value, then capacity counts
    would be inaccurate since slots would get counted multiple times.
    Rather than counting based on instance type it is now based on the set
    of memory or disk values pulled from instance types.

    Change-Id: Iaded7fa69dadb4aa0335ef1569975bdfcb2767c6
    Closes-bug: #1276728

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.