-
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
States that include other states is causing "conflicting IDs" errors. #7526
Comments
Right, the include pulls those states in. So if you include the openssh state in the github state you should not put the openssh state in your top.sls. |
The weird thing is that it was working fine on 0.16. It was very useful when running a single state that depended on other states. |
Ah, didn't realize this was a regression. Thanks for pointing that out, we'll get this fixed. |
@luizsilva Are you using 0.17.0, or a more recent build from git? Just want to make sure, as there was a change to includes (to fix wildcards) but it was after 0.17.0 was released. |
@basepi We are using salt 0.17.0 (yaourt package version 0.17.0-1 on Arch linux) I will wait for the package maintainer to update it and I will test again. |
OK, then this regression was not caused by the fix I mentioned. We'll figure out what's going on here and get it fixed. |
We have the same problem. We hope it's be resolved soon. |
I think the include system mimic the import in python. If states has already been included (either in top.sls or by other state), do not try to include it one more time. |
Same problem here, lots of duplicate IDs on 0.17.0 |
Thanks for the additional reports. This is high on our priority list. |
Ok, so I've had this problem as well on develop and v0.17.0. What seems to be the problem is if you include a state file via the top.sls, you cannot include it in any other state files. so if I have a common/init.sls state file, I can't currently do a:
and then later in something like a php5/init.sls file:
However, php5/init.sls and nginx/init.sls both can include common as long as it isn't included in the top.sls file. I hope this helps track down the bug. |
Add me to this list. Same exact behavior. |
I use overstate as a workaround. It looks good. But please fix it as soon as possible. |
We still have an issue with this using 0.17.2. Did you actually have another fix after reverting the fix in da8a60f/2f71e6f ? |
I can confirm that this is still the case as well. |
What's the issue you're seeing? The same "conflicting IDs on imported states" problems? |
Yes, same thing. |
Alright, re-opened. Guess we still need to try to fix this without breaking PyDSL. |
Because of this problem and the slowness, we tried not using gitfs anymore. Now we work from manual checkouts and replaced the different environments we had with standard git branching. Without actually changing the states, the problem doesn't occur anymore. So it's probably related to using different environments? |
My use case is identical to the original problem and it still exists in .17.2 |
Can you guys post some example SLS files that consistently cause this error? We need to try to reproduce it again on our end. |
Sure @basepi |
Another example if you needed one |
global unique is not ideal,maybe auto adding folder name as part of sls-id,that will be more nice to use. |
@medcl No worries, this is definitely a bug which we're working to fix. |
great! -------- 原始邮件 --------
|
So I have had some long-standing misunderstandings with the way this is supposed to work. State IDs must be globally unique across a single state run. This won't be changing. I was under the impression that you could have the same state ID in two different state files in the same highstate as long as they didn't include each other. This is false. That said, if you define an ID in a state file defined in the top.sls, and then also include that state file in a different state file defined in top.sls, this should not be producing conflicting ID errors. (Edited for clarifications) |
This original issue is still fixed, the issue brought up here is a separate issue now tracked in #9464 |
I don't think it's fixed. I see it now on 2014.7.x: |
OK, using "." in top.sls works. |
what if I have "mysql" in top.sls
Then in rabbitmq.sls I must ensure user and groups like this
I will have three duplicate global IDs? |
What was this not fixed? |
@DanielYWoo, that should then be rabbitmq:
group.present:
user.present:
- require:
- group: rabbitmq |
Using salt 0.17
On my top.sls I have
The github state include openssh state. That is generating this error message:
If I remove the includes, the highstate runs normaly.
The text was updated successfully, but these errors were encountered: