States that include other states is causing "conflicting IDs" errors.
Using salt 0.17 On my top.sls I have
base:
'*'
- github
- openssh
The github state include openssh state. That is generating this error message:
Data failed to compile:
----------
Detected conflicting IDs, SLS IDs need to be globally unique.
If I remove the includes, the highstate runs normaly.
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:
base:
'*':
- common
and then later in something like a php5/init.sls file:
include:
- common
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 This is kind of a big deal because it basically renders the include statement obsolete in a lot of cases. Especially when you have states within non-base states that have a require statement from something that was to be included.