salt icon indicating copy to clipboard operation
salt copied to clipboard

top file now broken with 2015.8.1

Open smithjm opened this issue 11 years ago • 7 comments

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

smithjm avatar Oct 20 '15 21:10 smithjm

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

smithjm avatar Oct 20 '15 22:10 smithjm

Duplicate of #28016?

eliasp avatar Oct 21 '15 04:10 eliasp

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 avatar Oct 21 '15 12:10 smithjm

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

jfindlay avatar Oct 22 '15 17:10 jfindlay

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 avatar Oct 26 '15 23:10 smithjm

@smithjm, thanks for the extra info.

jfindlay avatar Oct 27 '15 23:10 jfindlay

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.

stale[bot] avatar Jan 24 '18 23:01 stale[bot]