Every time salt.orchestrate is called from the reactor, salt orchestrate applies all the state under base as listed in top.sls
Using a single top.sls file under base environment which works fine if called normally (e.g: salt 'minionA' state.highstate)
Environment targeting is done via pillar data. A small sample of the top.sls file:
run_minion_highstate:
salt.state:
- tgt: 'minionA'
- highstate: True
- queue: True
#############
Following the above two samples, I would expect the salt.state orchestrate function for target "minionA" to apply all states (state1, state2 and state3). "minionA" does have "role:production" set in its pillar data.
Unfortunately only state1 and state2 get applied when the salt.state orchestrate function runs.
Double checked sat-master event bus (via salt-run state.event) and it reports executing:
#############
"fun": "runner.state.orchestrate",
"fun_args": [
[
"orchestrate.minion.highstate"
],
{
"exclude": null,
"orchestration_jid": null,
"pillar": {
"event_data": {
"_stamp": "2017-04-26T12:54:17.880661",
"cmd": "_minion_event",
"data": "Minion minionA started at Wed Apr 26 12:54:17 2017",
"id": "minionA",
"pretag": null,
"tag": "salt/minion/minionA/start"
},
"event_tag": "salt/minion/minionA/start"
},
"pillarenv": null,
"saltenv": "base",
"test": null
}
],
##############
I bet the route of this issue is the lack of the pillarenv variables but I do not see a reason for setting it. I would expect reactor->orchestrate flow to follow the same principles of operation as "salt 'minionA' state.highstate"/
Also experimented a lot with top_file_merging_strategy but without any success.
############### Master
Salt Version:
Salt: 2016.11.4
Dependency Versions:
cffi: Not Installed
cherrypy: 5.6.0
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8.1
libgit2: 0.20.0
libnacl: Not Installed
M2Crypto: 0.20.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.4.3
pygit2: 0.20.3
Python: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.5.0
RAET: Not Installed
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: centos 6.9 Final
machine: x86_64
release: 2.6.32-696.el6.x86_64
system: Linux
version: CentOS 6.9 Final
############### Minion
Salt Version:
Salt: 2016.11.4
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.20.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.4.3
pygit2: Not Installed
Python: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.5.0
RAET: Not Installed
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: centos 6.9 Final
machine: x86_64
release: 2.6.32-696.1.1.el6.x86_64
system: Linux
version: CentOS 6.9 Final