-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Discrepancy between 'salt' and 'salt-ssh' results with 'slsutil.update' within a Jinja expression-statement #65067
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
This is caused by a missing SSH wrapper module for |
@lkubb Can this fix be back ported to 3006.x? If not, I think we should close this issue as resolved in 3007.x |
@dwoz I can backport this fix. It's part of a whole list of Salt-SSH issues that are resolved in either 3006 or 3007, but still open: Already fixed in 3006.5+: #36796 Fixed in 3007.0+: #48067 (backport a bit more involved, adds 2 wrapper modules) Fixed in 3007.0+, already closed: I can add the trivial ones to the backport PR as well if desired. |
Please do, thank you for the help. |
This is fixed in |
Description
The slsutil.update module produces different results when called from a Jinja expression-statement depending on whether
salt
orsalt-ssh
is used.Setup
/srv/salt/bug/init.sls
Please be as specific as possible and give set-up details.
sudo dnf install salt-master salt-minion
Steps to Reproduce the behavior
Commands
sudo salt-ssh '*' state.sls bug
followed by:
sudo salt '*' state.sls bug
Output
Cleaned up
salt-ssh
output:Cleaned up
salt
output:Observe
The
notify-after-update
reveals different values for theupdate_map
dictionary depending on the command used.In contrast,
notify-before-merge
andnotify-after-merge
are the same between commands and are included to demonstrate thatslsutil.merge
does not have this issue.Expected behavior
I expect the same configuration to be applied with both the
salt
andsalt-ssh
commands.Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
{% do salt['slsutil.update'](update_map, new) %}
functions as I would expect when called withsalt
. By simply changing the command tosalt-ssh
, a different configuration is applied as the dictionary merge functions differently. This is troublesome when states are built upon thisdo salt['slsutil.update']
statement and successfully deployed withsalt
. If the need arises to usesalt-ssh
, the same input configuration produces a different output in an unexpected way.Notable situations where
salt
andsalt-ssh
produce the same result:{% do salt['slsutil.merge'](update_map, new) %}
:slsutil.merge
creates a deepcopy before manipulating the dictionary. This produces consistent results.{% set final_map = salt['slsutil.update'](update_map, new) %}
: Explicitly assigning the results to a variable usingset
rather thando
produces consistent results.Thank you.
The text was updated successfully, but these errors were encountered: