relvalconsumer: handle reporting image size bugs to Bugzilla

This relies on changes in relvalconsumer itself and relval.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-09-19 13:00:09 -07:00 committed by Pierre-Yves Chibon
parent a518f49c7b
commit 10eb5d20f2
4 changed files with 19 additions and 9 deletions

View file

@ -1,3 +1,5 @@
# This var should never be set for more than one machine
relvalconsumer_prod: true
# this one probably shouldn't either
relvalconsumer_bugzilla_api_key: "{{ prod_relvalconsumer_bugzilla_secret_api_key }}"
relvalconsumer_env_suffix:

View file

@ -64,6 +64,12 @@
# - relvalconsumer_amqp_mailto
## list - List of email addresses to email errors to. If set,
## the email log handler will be configured.
# - relvalconsumer_bugzilla_api_key
## string - An API key for Bugzilla. If relvalconsumer_prod and
## this are both set, the consumer will be configured
## to report bugs to Bugzilla for oversize images. As
## with relvalconsumer_prod, only the 'official' prod
## instance should have this set.
# note: kept around for when we need packages from u-t
#- name: Install required packages (testing)
@ -160,6 +166,12 @@
tags:
- config
- name: Write python-bugzilla configuration file
template: src=bugzillarc.j2 dest=/root/.config/python-bugzilla/bugzillarc owner=root group=root mode=0600
when: "relvalconsumer_bugzilla_api_key is defined"
tags:
- config
- name: Configure fedora-messaging relvalconsumer
template: src=relvalconsumer.toml.j2 dest=/etc/fedora-messaging/relvalconsumer.toml owner=root group=root mode=0640
notify:

View file

@ -1,9 +0,0 @@
config = {
{% if relvalconsumer_prod %}
'relvalconsumer.prod.enabled': True,
'relvalconsumer.test.enabled': False,
{% else %}
'relvalconsumer.prod.enabled': False,
'relvalconsumer.test.enabled': True,
{% endif %}
}

View file

@ -44,6 +44,11 @@ routing_keys = [{% for key in relvalconsumer_amqp_routing_keys %}"{{ key }}",{%
[consumer_config]
relval_prod = {{ relvalconsumer_prod|lower }}
{% if relvalconsumer_bugzilla_api_key is defined and relval_prod is defined %}
relval_bugzilla = true
{% else %}
relval_bugzilla = false
{% endif %}
[qos]
prefetch_size = 0