Skip to content
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

Update all the entry points (services, scripts) to use /etc/st2/st2.conf as a default config file location #4111

Merged
merged 8 commits into from
May 7, 2018

Conversation

Kami
Copy link
Member

@Kami Kami commented May 4, 2018

This pull request updates code to use /etc/st2/st2.conf as a default config file location for all the services and script entry points.

This will save users some typing and provide a better default user-experience.

Previously, if user ran some script (e.g. st2-apply-rbac-definitions -v) without providing --config-file CLI argument, a weird and non-user friendly exception was thrown. It meant user always needed to run scripts with that option (e.g. st2-apply-rbac-definitions --config-file /etc/st2/st2.conf).

This change is fully backward compatible since since it just uses this location as a default value and user can still override the location and use a config from a different path using --config-file CLI argument.

In addition to that, we should still try to explicitly provide --config-file argument everywhere where possible since that makes debugging easier and it's more explicit (we already do that in service manager setup files, wsgi entry points, etc.).

Resolves #3203.

TODO

  • Tests

as a default config file value.

This way users don't always need to explicitly pass --config-file
/etc/st2/st2.conf argument to all the scripts on production
installation.
@Kami Kami added this to the 2.8.0 milestone May 4, 2018
Copy link
Contributor

@LindsayHill LindsayHill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome change. Will be much appreciated by users. Saves everyone time and hassle

@Kami Kami merged commit 5f89c1f into master May 7, 2018
@Kami Kami deleted the default_config_change branch May 7, 2018 08:31
@nmaludy
Copy link
Member

nmaludy commented May 7, 2018

Now i have to remember not to pass in --config-file /etc/st2/st2.conf (joking).

Nice change! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants