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
salt states duplicate key detection #8053
Comments
I confirm it's not throwing an error when the same ID is referenced twice (or more) within a state. It detects the conflict when the ID is in different states though : |
@sebw The conflicting IDs for included states should be fixed. The lack of conflicting ID errors in a single state file is a regression that we will get fixed. |
- YAML exceptions are now re-reaised as SaltRenderErrors - Duplicate ID's in single state files now result in errors, and not just warnings. This is now consistent with the how conflicting ID's in separate state files are handled.
Fix for issue #8053: raise error on duplicate ID's in one state file
Can anyone verify that this one is fixed so we can close it? |
The original issue contains the following sample SLS which was said to incorrectly execute at least one of the states:
As of today's develop branch running
This is expected behavior. Therefore, I am closing this issue. If it needs to stay open for some reason, please leave a comment and we'll re-open. Thanks! |
Great! |
@ cachedout That is the expected behavior? Is there a way to work around this? (Yes, Emilisto, I just posted this question on your other post) =). I need to touch/append a single file multiple times and am running to this error. Looking forward to the reply. |
@KatoneVi The common approach is to use the Here's an example:
|
Thanks a bunch =) It worked!!!! ^_^ |
Refer to discussion https://groups.google.com/forum/#!topic/salt-users/uCh0lWSS78g
Need to detect duplicate keys and alert accordingly. Currently this issue persists in 0.16.4 and 0.17.1 versions.
A simple example.
---- mystate.sls---
/tmp/test-file1:
file.touch
/tmp/test-file1:
file.managed:
- source: salt://another-file2
------mystate,sls----
I can run
salt '*' state.sls mystate
and it will execute one of the state from above.
The text was updated successfully, but these errors were encountered: