Disable Greenwave gating by default

This commit is contained in:
mprahl
2019-04-04 13:13:11 -04:00
parent 321bb4940f
commit d6d0c870fc
3 changed files with 8 additions and 4 deletions

View File

@@ -124,6 +124,7 @@ class TestConfiguration(BaseConfiguration):
RESOLVER = 'db'
ALLOWED_GROUPS_TO_IMPORT_MODULE = set(['mbs-import-module'])
GREENWAVE_DECISION_CONTEXT = 'osci_compose_gate_modules'
class ProdConfiguration(BaseConfiguration):

View File

@@ -537,10 +537,8 @@ class Config(object):
},
'greenwave_decision_context': {
'type': str,
'default': 'osci_compose_gate_modules',
'desc': 'The Greenwave decision context that whose messages should '
'be handled by MBS. By default, MBS handles Greenwave '
'messages for OSCI.',
'default': '',
'desc': 'The Greenwave decision context that determines a module\'s gating status.',
},
'allowed_disttag_marking_module_names': {
'type': list,

View File

@@ -63,6 +63,11 @@ def decision_update(config, session, msg):
``greenwave.decision.update``.
:type msg: :class:`GreenwaveDecisionUpdate`
"""
if not config.greenwave_decision_context:
log.debug('Skip Greenwave message %s as MBS does not have GREENWAVE_DECISION_CONTEXT '
'configured', msg.msg_id)
return
if msg.decision_context != config.greenwave_decision_context:
log.debug('Skip Greenwave message %s as MBS only handles message in '
'decision context %s',