-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[FEATURE REQUEST] Ignore service state actions when in chroot #62446
Comments
This doesn't feel like a good idea. It's a very specific case that's already solved by a generic solution. If a state is written to require services to be in particular states, with lots of requisites on the service, that should all fail rather than continue and mess things up. |
It's a parameter that enables cleaner state workflows and it should not be enabled by default. |
I'd rather see something like a more generic requisite similar to onlyif but the requisite is defined inline, similar to the slots functionality, where it's executed right before the state is run rather than at state file render time. This would solve a very large number of problems for me, and I think it mostly solves your use case as well. Something like:
I think a global option specific to whether a service is running in a chroot is too specific a use case |
Is your feature request related to a problem? Please describe.
We have a common workflow where we need to manage services, but only when Salt is not running in a chroot. Unless we gate the state blocks with Jinja, it runs and fails since the chroot does not have enough access to perform the action.
Describe the solution you'd like
Simple parameter for every state module function which will ignore actions while in chroot, but act normally when outside of it.
Describe alternatives you've considered
Wrapper Jinja around every service state block (or macros):
Additional context
Somewhat related to issue #38751, although we don't want to take action with this workflow... whereas the solution to that issue would allow some actions to be be taken from within the chroot if allowed.
Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.
The text was updated successfully, but these errors were encountered: