`salt/files/minion.d/f_defaults.conf` renders `master_fallback` /
`master_fallback_interval`, but Salt's options are `master_failback` /
`master_failback_interval`. Easy typo to miss — the embedded word should be
`fail`, not `fall`:
master_fallback <- template renders this (not a Salt option)
master_failback <- Salt's actual option
^
With no generic passthrough (only keys with an explicit `get_config` call are
rendered), setting `master_failback` in pillar is silently dropped today; the
correct spelling already appears in this file's comments.
Verify against Salt's source (VALID_OPTS / DEFAULT_MINION_OPTS):
https://github.com/saltstack/salt/blob/v3008.1/salt/config/__init__.py#L151-L154https://github.com/saltstack/salt/blob/v3008.1/salt/config/__init__.py#L1132-L1133
Typo present since 2017 (edce95f).
Co-authored-by: Claude <noreply@anthropic.com>
Right now when you set module_config entries in your pillar data
like this:
salt:
minion:
module_config:
smtp.from: 'Kali Salt <admins+salt@kali.org>'
smtp.to: 'Kali Admins <admins+salt@kali.org>'
smtp.host: localhost
smtp.subject: 'Results of salt actions on'
smtp.fields: id,fun
On each run, you will always a different ordering of the various
fields in the minion configuration file, leading to spurious restart
of the minion and admin annoyance:
ID: salt-minion
Function: file.recurse
Name: /etc/salt/minion.d
Result: True
Comment: Recursively updated /etc/salt/minion.d
Started: 13:39:25.689775
Duration: 874.318 ms
Changes:
----------
/etc/salt/minion.d/f_defaults.conf:
----------
diff:
---
+++
@@ -930,10 +930,10 @@
# A dict for the test module:
#test.baz: {spam: sausage, cheese: bread}
#
+smtp.fields: id,fun
+smtp.from: Kali Salt <admins+salt@kali.org>
smtp.to: Kali Admins <admins+salt@kali.org>
-smtp.fields: id,fun
smtp.host: localhost
-smtp.from: Kali Salt <admins+salt@kali.org>
smtp.subject: Results of salt actions on
With the change here, this bad behaviour is gone...
* CVE-2021-25283 enables Jinja2 safe mode, which breaks use of
`'dict' in x.__class__.__name__` workaround
* Workaround no longer needed as CentOS 6 is EOL
Using the old salt.engines pillar and merging it with the new
salt.[master|minion].engines pillar.
This way, it doesn't break previous behavior and permits to define
common engines on master and minion.
In the merge, the salt.[master|minion].engines pillar takes precedence
if conflict as it's the more specific pillar.
the engines are now configured using the following pillars:
* salt.master.engines
* salt.minion.engines
instead of a global salt.engines pillar.
Note: the pillar.example provided seems to assume this behaviour.
(the pillar is salt.master.engines.slack and not salt.engines.slack)