Update all the entry points (services, scripts) to use /etc/st2/st2.conf as a default config file location #4111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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