Skip to content

Commit 50e1dee

Browse files
committed
Use scope in flavor properties
If we do not put an scope to the flavor properties and the site is using the AggregateInstanceExtraSpecsFilter the cASO's properties will prevent the scheduler from dispatching any request. closes #41
1 parent 822d5bf commit 50e1dee

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

caso/extract/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
help='File containing the VO <-> project mapping as used '
4444
'in Keystone-VOMS.'),
4545
cfg.StrOpt('benchmark_name_key',
46-
default='benchmark_type',
46+
default='accounting:benchmark_type',
4747
help='Metadata key used to retrieve the benchmark type '
4848
'from the flavor properties.'),
4949
cfg.StrOpt('benchmark_value_key',
50-
default='benchmark_value',
50+
default='accounting:benchmark_value',
5151
help='Metadata key used to retrieve the benchmark value '
5252
'from the flavor properties.'),
5353

doc/source/configuration.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,32 @@ benchmark information. In order to do so, you need to add this information to
2727
the flavor properties and configure caso to retrieve this information. There
2828
are two different values that need to be added to the flavor:
2929

30-
* The benchmark name, indicated with the ``benchmark_name`` flavor property.
31-
* The benchmark value, indicated with the ``benchmark_value`` flavor property.
30+
* The benchmark name, indicated with the ``accounting:benchmark_name`` flavor property.
31+
* The benchmark value, indicated with the ``accounting:benchmark_value`` flavor property.
3232

3333
So, if you are using HEPSPEC06 and the benchmark value is ``99`` for the flavor
3434
``m1.foo`` you should set this as follows::
3535

36-
openstack flavor set --property benchmark_name="HEPSPEC06" --property benchkark_value=99 m1.foo
36+
openstack flavor set --property benchmark_name="HEPSPEC06" --property accounting:benchmark_value=99 m1.foo
3737

3838
Using different keys
3939
~~~~~~~~~~~~~~~~~~~~
4040

41-
If you do not want to use the default flavor properties ``benchmark_name`` and
42-
``benchkark_value`` (for example because you are using different benchmark types
41+
If you do not want to use cASO's default flavor properties ``accounting:benchmark_name`` and
42+
``accounting:benchmark_value`` (for example because you are using different benchmark types
4343
and values) you can specify which properties ``cASO`` should look for by using
4444
the ``benchmark_name_key`` ``benchkark_value_key`` in the configuration file.
4545

46+
.. important::
47+
48+
Please note that there is an OpenStack scheduler filter that removes hosts
49+
based on flavor properties. In order to not interfere with the behaviour of
50+
this filter you must prefix the property with a ``scope:`` so that cASO's
51+
properties are not taken into account for this filtering. When adding these
52+
properties in cASO's configuration file, please include the complete name
53+
(i.e. ``scope:property``).
54+
55+
4656
User credentials
4757
----------------
4858

0 commit comments

Comments
 (0)