salt icon indicating copy to clipboard operation
salt copied to clipboard

States that include other states is causing "conflicting IDs" errors.

Open luizsilva opened this issue 13 years ago • 33 comments

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.

luizsilva avatar Sep 30 '13 21:09 luizsilva

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.

basepi avatar Oct 01 '13 19:10 basepi

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.

luizsilva avatar Oct 01 '13 20:10 luizsilva

Ah, didn't realize this was a regression. Thanks for pointing that out, we'll get this fixed.

basepi avatar Oct 01 '13 23:10 basepi

@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 avatar Oct 07 '13 21:10 basepi

@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.

luizsilva avatar Oct 07 '13 21:10 luizsilva

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.

basepi avatar Oct 09 '13 01:10 basepi

We have the same problem. We hope it's be resolved soon.

hobbestigrou avatar Oct 09 '13 13:10 hobbestigrou

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.

Lothiraldan avatar Oct 09 '13 14:10 Lothiraldan

Same problem here, lots of duplicate IDs on 0.17.0

max-arnold avatar Oct 09 '13 16:10 max-arnold

Thanks for the additional reports. This is high on our priority list.

basepi avatar Oct 09 '13 23:10 basepi

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.

JustinCarmony avatar Oct 14 '13 04:10 JustinCarmony

Add me to this list. Same exact behavior.

tateeskew avatar Oct 14 '13 16:10 tateeskew

I use overstate as a workaround. It looks good. But please fix it as soon as possible.

HuangShaoyan avatar Oct 15 '13 09:10 HuangShaoyan

We still have an issue with this using 0.17.2. Did you actually have another fix after reverting the fix in da8a60f/2f71e6f ?

sblask avatar Nov 20 '13 13:11 sblask

I can confirm that this is still the case as well.

tateeskew avatar Nov 20 '13 13:11 tateeskew

What's the issue you're seeing? The same "conflicting IDs on imported states" problems?

basepi avatar Nov 20 '13 21:11 basepi

Yes, same thing.

sblask avatar Nov 21 '13 09:11 sblask

Alright, re-opened. Guess we still need to try to fix this without breaking PyDSL.

basepi avatar Nov 21 '13 20:11 basepi

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?

sblask avatar Nov 22 '13 12:11 sblask

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.

tateeskew avatar Nov 22 '13 15:11 tateeskew