From e284d4fbeac8b54c6b69d047167a375605f3eb83 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 15 Nov 2016 17:09:13 -0800 Subject: [PATCH] Allow for specifying a KOLLA_CONFIG_FILE Incases where it is useful to place many config.json files under the same directory (ie one for config_glance_api.json or one for config_glance_registry.json) we should be able to specify which file under that directory do we actually want to use (instead of assuming it is always config.json). Change-Id: I42eeb093d29bac27d71ee08e55e115c2d8b5e9ae --- docker/base/set_configs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index 01ae8bc1a8..142d1a7e29 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -155,7 +155,9 @@ def load_config(): sys.exit(1) def load_from_file(): - config_file = '/var/lib/kolla/config_files/config.json' + config_file = os.environ.get("KOLLA_CONFIG_FILE") + if not config_file: + config_file = '/var/lib/kolla/config_files/config.json' LOG.info("Loading config file at %s", config_file) # Attempt to read config file