diff options
Diffstat (limited to 'docker/base')
| -rw-r--r-- | docker/base/set_configs.py | 19 | ||||
| -rw-r--r-- | docker/base/sudoers | 2 |
2 files changed, 4 insertions, 17 deletions
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index 1d1fc48ae..559f1c0f3 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -272,21 +272,8 @@ def validate_source(data): def load_config(): - def load_from_env(): - config_raw = os.environ.get("KOLLA_CONFIG") - if config_raw is None: - return None - - # Attempt to read config - try: - return json.loads(config_raw) - except ValueError: - raise InvalidConfig('Invalid json for Kolla config') - def load_from_file(): - config_file = os.environ.get("KOLLA_CONFIG_FILE") - if not config_file: - config_file = '/var/lib/kolla/config_files/config.json' + config_file = '/var/lib/kolla/config_files/config.json' LOG.info("Loading config file at %s", config_file) # Attempt to read config file @@ -300,9 +287,7 @@ def load_config(): raise InvalidConfig( "Could not read file %s: %r" % (config_file, e)) - config = load_from_env() - if config is None: - config = load_from_file() + config = load_from_file() LOG.info('Validating config file') validate_config(config) diff --git a/docker/base/sudoers b/docker/base/sudoers index da9c04c30..9b2bfb8dc 100644 --- a/docker/base/sudoers +++ b/docker/base/sudoers @@ -6,6 +6,8 @@ # anyone in the kolla group may sudo -E (set the environment) Defaults: %kolla setenv +Defaults secure_path="/var/lib/kolla/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + # root may run any commands via sudo as the network seervice user. This is # neededfor database migrations of existing services which have not been # converted to run as a non-root user, but instead do that via sudo -E glance |
