From 142ac50ecbd81f218e401dd33b9941bed254e7ed Mon Sep 17 00:00:00 2001 From: Jared Rodriguez Date: Tue, 30 Jul 2019 18:44:49 -0500 Subject: [PATCH] not all providers utilize calc.py --- gen/exhibitor_tls_bootstrap.py | 5 ++++- packages/exhibitor/extra/bootstrap_exhibitor_tls.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gen/exhibitor_tls_bootstrap.py b/gen/exhibitor_tls_bootstrap.py index 8da964239c..96245c724e 100644 --- a/gen/exhibitor_tls_bootstrap.py +++ b/gen/exhibitor_tls_bootstrap.py @@ -25,7 +25,7 @@ def _check(config: Dict[str, Any]) -> List[str]: DC/OS variant must be enterprise """ checks = [ - (lambda: config['exhibitor_tls_enabled'] == 'true', + (lambda: config.get('exhibitor_tls_enabled', False) == 'true', 'Exhibitor security is disabled'), (lambda: config['exhibitor_storage_backend'] == 'static', 'Only static exhibitor backends are supported'), @@ -92,6 +92,9 @@ def _get_ca_alt_name(config: Dict[str, Any]) -> str: def initialize_exhibitor_ca(final_arguments: Dict[str, Any]): + if final_arguments['platform'] != 'onprem': + return + reasons = _check(final_arguments) if reasons: print('[{}] not bootstrapping exhibitor CA: {}'.format( diff --git a/packages/exhibitor/extra/bootstrap_exhibitor_tls.py b/packages/exhibitor/extra/bootstrap_exhibitor_tls.py index 8ad0d03128..1068dad8ea 100644 --- a/packages/exhibitor/extra/bootstrap_exhibitor_tls.py +++ b/packages/exhibitor/extra/bootstrap_exhibitor_tls.py @@ -142,7 +142,7 @@ def gen_tls_artifacts(ca_url, artifacts_path) -> None: def main(): exhibitor_env = os.environ.copy() - if exhibitor_env['EXHIBITOR_TLS_ENABLED'] == 'false': + if exhibitor_env.get('EXHIBITOR_TLS_ENABLED', 'false') == 'false': return if os.path.exists(TLS_ARTIFACT_LOCATION):