Fake compute available resources are not configurable

Bug #1268943 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Joe Gordon

Bug Description

Available resources provided by fake computes to the scheduler are hardcoded in FakeDriver.get_available_resource.

Currently, It implies to change scheduler cpu/ram/disk_allocation because fake computes capacity is too low when using Core/Ram/DiskFilter.

The correction would allow to change fake compute available resources through configuration.

Tags: testing
Changed in nova:
assignee: nobody → Cedric Brandily (cbrandily)
Revision history for this message
Maithem (maithem) wrote :

I'm not sure if I understand correctly, Do you mean for unit testing? why not mock?

Revision history for this message
Cedric Brandily (cbrandily) wrote :

The use case is not unit tests, but integration tests: tempest (stress) tests, applications acting as nova client tests.

To better understand the context, it's linked to the bug https://bugs.launchpad.net/nova/+bug/1260771 and its associated gerrit change. An extract from the change is at the end of comment.

When the bug https://bugs.launchpad.net/nova/+bug/1260771 will be corrected, fake + kvm compute nova deployments will be possible. If you use scheduler limiting filters (RamFilter, CoreFilter, etc.) to avoid kvm compute overload, you also constraint fake computes capacity (which is currently hardcoded to a very low value)!

"""
The number of instances supported by fake computes is not limited by physical constraints.
It allows to perform stress tests on a deployment with few resources (typically a laptop).
But you must avoid to use scheduler filters limiting the number of instances per compute (like RamFi
lter, DiskFilter, AggregateCoreFilter),
otherwise they will limit the number of instances per compute.

Fake computes can also be used in multi hypervisor-type deployments in order to take advantage of fake and "real" computes during tests
* create many fake instances for stress tests
* create some "real" instances for functional tests

Fake computes can be used for testing Nova itself but also applications on top of it.
"""

Changed in nova:
status: New → In Progress
Changed in nova:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/94532

Tracy Jones (tjones-i)
tags: added: testing
Changed in nova:
assignee: Cedric Brandily (cbrandily) → nobody
Sean Dague (sdague)
Changed in nova:
status: New → In Progress
assignee: nobody → Joe Gordon (jogo)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

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

commit d9acc764299df9be8cb1a29e4da16461ac696bd6
Author: Joe Gordon <email address hidden>
Date: Wed May 21 14:34:45 2014 +0900

    Bump FakeDriver's resource numbers

    Bump the amount of memory and disk that FakeDriver reports so one can
    schedule larger instances. One should be able to schedule an instance
    larger with more then 8GB of ram onto the FakeDriver.

    Since the FakeVirt driver is now used for much more then just unit
    tests, subclass FakeVirt to decouple the amount of resources FakeVirt reports
    from the amounts in the api_samples. This way the api_samples don't need changing every
    time the resource amounts reported by FakeVirt are tweaked.

    Change-Id: Ifd3b8bd1abf985d279de334776ed5feb4fa72a27
    Related-Bug: #1268943

Joe Gordon (jogo)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
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.