Fix top_file_merging_strategy warning if env_order is set

According to the documentation, the env_order config option allows one
to explicitly define the order in which top files are evaluated, when
top_file_merging_strategy is set to merge, and no environment is
specified for a highstate.

Despite honoring the environment order specified in env_order in
BaseHighState._get_envs(), salt still prints a warning recommending
setting env_order. Thus silence the warning when env_order is set.

fixes #29104

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
This commit is contained in:
Benjamin Drung 2017-02-01 16:08:56 +01:00
parent ec219b5f42
commit 74a3b066ea

View file

@ -2590,7 +2590,7 @@ class BaseHighState(object):
tops[saltenv].append({})
log.debug('No contents loaded for env: {0}'.format(saltenv))
if found > 1 and merging_strategy == 'merge':
if found > 1 and merging_strategy == 'merge' and not self.opts.get('env_order', None):
log.warning(
'top_file_merging_strategy is set to \'%s\' and '
'multiple top files were found. Merging order is not '