Add expected number of odcs backends

This value is mostly ignored by the application. It is included in the
Prometheus metrics to simplify calculation availability.

The default is set to 0. The number of hosts in the odcs_backend group
is used for the alternative definition in inventory.
This commit is contained in:
Lubomír Sedlář 2022-06-14 16:06:43 +02:00
parent c31c99a252
commit e453ce1649
3 changed files with 4 additions and 1 deletions

View file

@ -64,3 +64,4 @@ odcs_raw_config_urls:
config_filename: test.conf
url: https://pagure.io/jkaluza-test-compose.git
primary_auth_source: ipa
odcs_expected_backend_number: "{{ groups['odcs_backend'] | length }}"

View file

@ -49,4 +49,4 @@ odcs_seconds_to_live: 86400
odcs_max_seconds_to_live: 259200
odcs_celery_concurrency: 2
odcs_extra_target_dirs: {"private": "/srv/odcs/private"}
odcs_expected_backend_number: 0

View file

@ -168,3 +168,5 @@ class ProdConfiguration(BaseConfiguration):
CELERY_ROUTER_CONFIG = {{ odcs_celery_router_config }}
{% endif %}
EXPECTED_BACKEND_NUMBER = {{ odcs_expected_backend_number }}