]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
openstack: resources hint is the max of all hints 664/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 22 Oct 2015 14:00:02 +0000 (16:00 +0200)
committerLoic Dachary <ldachary@redhat.com>
Fri, 23 Oct 2015 16:46:02 +0000 (18:46 +0200)
commit3ad094757edb57f29348516cec19862cd5f8b52b
tree7e04a70df54b9c9c510150d7c6097fcccbda05cf
parentfde531c67879b63a7de7448582ec6ab2f32e97db
openstack: resources hint is the max of all hints

Exactly one OpenStack resources hint can be included in a given job, as
part of an existing facet. It is error prone because it is sometimes not
trivial to figure out how a given job is composed and if two resources
hint are included only one of them will be taken into account which can
lead to problems difficult to diagnose. Another undesirable side effect
is to artificially increase resources usage. It is easier and more
reliable (from the test maintainer point of view) to increase the
resources of all jobs when a few need more RAM or disk rather than
trying to figure where to write the hints so that they are used by these
jobs and these jobs only.

Instead of being a fixed hint for a given job, the max of all hints
found in each facet is used. For instance, rados/thrash can have a facet
requiring that all jobs are given 3 devices.

cat rados/thrash/cluster/openstack.yaml
  openstack:
    - volumes:
        count: 3

If one task in rados/thrash needs 16GB RAM instead of the default of 8GB
RAM, it can have:

cat rados/thrash/tasks/bigworkunit.yaml

  task:
    - workunit: highmemoryusage.sh
  openstack:
    - machine:
        ram: 16 # GB

And a job composed of rados/thrash/{cluster/openstack.yaml
tasks/bigworkunit.yaml} is aggregated as the max of all resources,
including the default, that is:

  task:
    - workunit: highmemoryusage.sh
  openstack:
    - machine:
        disk: 20 # GB
        ram: 16 # GB
        cpu: 1
      volumes:
        count: 3
        size: 1 # GB

Signed-off-by: Loic Dachary <ldachary@redhat.com>
README.rst
teuthology/openstack/__init__.py
teuthology/openstack/test/test_openstack.py
teuthology/provision.py