When using GitFS, and the config below (setup) and one testing branch, which contains the same data as base, salt generates output like this:
[root@servername gitfs]# salt servername state.apply test=true
servername:
Data failed to compile:
----------
Detected conflicting IDs, SLS IDs need to be globally unique.
The conflicting ID is 'enp8s0f0' and is found in SLS 'base:network.nodenetwork' and SLS 'nfs:network.nodenetwork'
----------
Detected conflicting IDs, SLS IDs need to be globally unique.
The conflicting ID is 'br0' and is found in SLS 'base:network.nodenetwork' and SLS 'nfs:network.nodenetwork'
----------
Detected conflicting IDs, SLS IDs need to be globally unique.
The conflicting ID is '/etc/exports' and is found in SLS 'base:nfs-server' and SLS 'nfs:nfs-server'
When i add saltenv=base, everything works normally. As I understand the master config, these environments should be completely isolated from one another.
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
top_file_merging_strategy: same
default_top: base
(Include debug logs if possible and relevant.)
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 2018.3.0
Dependency Versions:
cffi: 1.6.0
cherrypy: Not Installed
dateutil: 1.5
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: 0.26.3
libnacl: Not Installed
M2Crypto: 0.28.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.1
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.26.4
Python: 2.7.5 (default, Apr 11 2018, 07:36:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.5.1804 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-862.el7.x86_64
system: Linux
version: CentOS Linux 7.5.1804 Core
from the docs here: https://docs.saltstack.com/en/latest/ref/states/top.html
it states that top_file_merging_strategy: same is used to:
force each environment to use its own top file
So if you have the same top file in each environment pointing to the same files with the same IDs I can see how you would have conflicts if you are using the same exact data.
If you are just attempting to make sure you only ever use base then you can set state_top_saltenv: base
Thank you, state_top_saltenv: base worked.
Most helpful comment
Thank you,
state_top_saltenv: baseworked.