top file now broken with 2015.8.1
The following top file used to work on all salt versions 2015.8.0 and earlier, but has broken with 2015.8.1.
The pillar "environment" is defined via an external pillar (pepa).
base:
'I@environment:test':
- match: compound
- motd
dev:
'I@environment:dev':
- match: compound
- motd
qa:
'I@environment:qa':
- match: compound
- motd
pilot:
'I@environment:pilot':
- match: compound
- motd
prod:
'I@environment:prod':
- match: compound
- motd
2015.8.0 yields a working highstate, whereas 2015.8.1 returns No States
Followup:
I was incorrect. 2015.8.0 and 2015.8.1 behave the same. The above works with default settings, but breaks if you try to use the following settings in /etc/salt/master:
top_file_merging_strategy: same
env_order: ['base', 'dev', 'prod']
default_top: base
Duplicate of #28016?
It might shed more light on #28016, but I am not using gitfs on the backend. I'm using local files (that happen to be populated by an external checkout from git that runs as a separate process, completely unrelated to salt). I think it has to do with how and when external pillars are brought into the environment, vs. when the top file is parsed, as it works (with the "you should be using top order = same" warning) when the defaults are used, but breaks when the above settings are put into the /etc/salt/master file.
@smithjm, thanks for the report. I am confused by what you mean when you say "2015.8.0 and 2015.8.1 behave the same." They are both broken or they are both unbroken? The three configs you mentioned were introduced in 2015.8.0 to change the behavior of state top files. Will you describe how they break your pillar top setup?
I'll be out for at least a week, so won't be able to follow up. However, the problem isn't 2015.8.0 vs 2015.8.0. The breakage happens when the external pillar, which defines the environment, doesn't get populated. This occurs if I specify the above settings, otherwise it works fine. I suspect the new feature, when it kicks in, results in the top file being evaluated BEFORE the external pillar data is imported.
thanks,
Jean
On Thu, Oct 22, 2015 at 12:42 PM, Justin Findlay [email protected] wrote:
@smithjm https://github.com/smithjm, thanks for the report. I am confused by what you mean when you say "2015.8.0 and 2015.8.1 behave the same." They are both broken or they are both unbroken? The three configs you mentioned were introduced in 2015.8.0 to change the behavior of state top files. Will you describe how they break your pillar top setup?
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/28156#issuecomment-150301649.
@smithjm, thanks for the extra info.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.