diff --git a/st2actions/st2actions/config.py b/st2actions/st2actions/config.py index 3ed43c3c6e..7a98134278 100644 --- a/st2actions/st2actions/config.py +++ b/st2actions/st2actions/config.py @@ -28,10 +28,13 @@ def parse_args(args=None): + # Override oslo_config's 'OS_' env var prefix with 'ST2_'. + CONF._env_driver = common_config.St2EnvironmentConfigurationSource() CONF( args=args, version=VERSION_STRING, default_config_files=[DEFAULT_CONFIG_FILE_PATH], + use_env=True, # Make our env var support explicit (default is True) ) diff --git a/st2reactor/st2reactor/cmd/trigger_re_fire.py b/st2reactor/st2reactor/cmd/trigger_re_fire.py index 8282a5decf..acee891da6 100644 --- a/st2reactor/st2reactor/cmd/trigger_re_fire.py +++ b/st2reactor/st2reactor/cmd/trigger_re_fire.py @@ -48,6 +48,8 @@ def _parse_config(): CONF.register_cli_opts(cli_opts) st2cfg.register_opts(ignore_errors=False) + # Override oslo_config's 'OS_' env var prefix with 'ST2_'. + CONF._env_driver = st2cfg.St2EnvironmentConfigurationSource() CONF(args=sys.argv[1:])