-
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
require_in overrides excludes #6237
Comments
Yes, exclude will remove the item that is being excluded making it impossible to find, you have created a state, then told salt to remove it, resulting it is not being available to be required. Exclude does not rip out requisites. |
And it should not ript out? At least with me, i'm using it to "patch" some machines. base:
'roles:worker':
- match: grain
- php
- mongodb.mongos
'roles:nomongos':
- match: grain
- mongodb.nomongos and my nomongos.sls exclude:
- sls: mongodb.mongos In production my minion is someting like this: grains:
project: rockpigeon
roles:
- worker In devel, my minion is like this: grains:
project: rockpigeon
roles:
- worker
- nomongos I'm doing this, cause worker with mongos is the default behavior, and i get problems before in separate them, in other words, forcing the minion to use a "mongos" grain. |
CentOS 6.4 64-bit
I too am experiencing what I perceive as a bug in exclude with requisites, but a little different. Note the require_in clause instead of require.
When I run a highstate I get an error like this:
I believe that excluding the test1 SLS should exclude everything that SLS does, including the require_in. But it seems like the require_in is added to /tmp/nothing2 before the test1 SLS is ripped out, causing a failure. |
Thanks for pointing this out, @jhenry82. I'm guessing that it's just an edge case that was not considered when we implemented exclude. |
Was this bug ever fixed? I'm experiencing it now with the below salt --versions-report: gesadmin@ny5kmduatinit01:~ $ salt --versions-report Dependency Versions: System Versions: |
This has not been fixed and I am leaning towards not fixing it. I worry that having an exclude do this may result in unwanted side effects..... |
What would be the recommended workaround? |
I would say to make a state that does not include the intended exclusion in the first place. |
+1 for a fix. Still don't understand how to work around this. I've the same issue like @jhenry82 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
this issue is still valid |
Thank you for updating this issue. It is no longer marked as stale. |
@josmardias your original issue is expected behavior, though the documentation isn't very clear. I've opened #55550 to track updating the docs/error message. @jhenry82 this is a proper bug - if an exclude remove a state that has |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Still valid |
Thank you for updating this issue. It is no longer marked as stale. |
@waynew is there a PR or another ticket for changing requistes/excludes? |
@sagetherage this is the ticket for the buggy behavior and #55550 is the ticket to enhance the documentation/error messaging. |
@josmardias @disaster123 This issue is very old and has never gotten much traction. If this is still a priority for you please open a new issue against one of the currently supported versions. |
I'm using Fedora 19
State:
Output
The text was updated successfully, but these errors were encountered: