-
-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #4025 - st2ctl environment variables #4027
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If you want to change .
to source
GFI, if not I'll merge.
st2common/bin/st2ctl
Outdated
|
||
# Ensure global environment is sourced if exists | ||
# Does not happen consistently with all OSes we support. | ||
[ -r /etc/environment ] && . /etc/environment | ||
|
||
# load in environment to allow override of COMPONENTS and ST2_CONFIG above | ||
# Ubuntu/Debian | ||
[ -r /etc/default/st2ctl ] && . /etc/default/st2ctl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like it better if we used source
here just be be more explicit, but this shebang is bash so it shouldn't matter - not a blocker, just a preference.
st2common/bin/st2ctl
Outdated
COMPONENTS="st2actionrunner st2api st2stream st2auth st2garbagecollector st2notifier st2resultstracker st2rulesengine st2sensorcontainer st2chatops mistral" | ||
STANCONF="/etc/st2/st2.conf" | ||
ST2_CONFIG="/etc/st2/st2.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to complain about this since we use STANCONF
in other places...but we also use ST2_CONF
in other places and I prefer the name ST2_CONF
so, YOLO?
@bigmstone I just pushed a change that uses |
This is a fix for #4025 .
It adds the ability for
st2ctl
to load in environment variables from an/etc/default/st2ctl
(ubuntu) or/etc/sysconfig/st2ctl
file. This allows deployments to utilize selective component lists and non-default st2.conf locations.