From 1884e9c06aeb292b416ad2d2beaa474608543699 Mon Sep 17 00:00:00 2001 From: Jacob Callahan Date: Wed, 1 Nov 2023 10:57:33 -0400 Subject: [PATCH] Remove BROKER_DIRECTORY from robottelo config This is something that broker handles on its own and, due to import timing, isn't handled correctly in robottelo anyway. Removing the field and config mechanism should eliminate confusion around this behavior. (cherry picked from commit bc53d944e9f7869efb43d722f60884e10ab61a55) --- conf/broker.yaml.template | 4 +--- robottelo/config/__init__.py | 9 --------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/conf/broker.yaml.template b/conf/broker.yaml.template index 5f5067c321a..0c039df13bb 100644 --- a/conf/broker.yaml.template +++ b/conf/broker.yaml.template @@ -1,7 +1,5 @@ BROKER: - # The path where your broker settings and inventory are located - # If you leave it blank, the default is the output of `broker --version` - BROKER_DIRECTORY: + # Broker has its own config which you can find by running `broker --version` HOST_WORKFLOWS: POWER_CONTROL: vm-power-operation EXTEND: extend-vm diff --git a/robottelo/config/__init__.py b/robottelo/config/__init__.py index e078d2fcc63..2d66d00054b 100644 --- a/robottelo/config/__init__.py +++ b/robottelo/config/__init__.py @@ -48,15 +48,6 @@ def get_settings(): settings = get_settings() - - -if not os.getenv('BROKER_DIRECTORY'): - # set the BROKER_DIRECTORY envar so broker knows where to operate from - if _broker_dir := settings.robottelo.get('BROKER_DIRECTORY'): - logger.debug(f'Setting BROKER_DIRECTORY to {_broker_dir}') - os.environ['BROKER_DIRECTORY'] = _broker_dir - - robottelo_tmp_dir = Path(settings.robottelo.tmp_dir) robottelo_tmp_dir.mkdir(parents=True, exist_ok=True)