[BUG] SSH orch/saltutil.cmd
with ssh=True
breaks gpg renderer and mine/publish wrappers
#65670
Closed
4 tasks done
Labels
Description
When using the orchestrate runner with
salt.state
andssh: true
, loaded mods for the SSH minion have slightly different__opts__
than when executingsalt-ssh
directly. This breaks thegpg
renderer and the roster with nested calls.This has the similar symptoms as #60002 (fixed in #65484), but a slightly different cause.
Setup
I'm running with the above-mentioned patch, otherwise the GPG renderer would be broken with salt-ssh as well.
Steps to Reproduce the behavior
salt-ssh myminion state.highstate
and see that it workssalt-run state.orch orch.ssh_hs
and see that it fails (orsalt-call saltutil.cmd myminion state.highstate ssh=true
)Expected behavior
Work as usual
Screenshots
Patching the above to look in
__opts["__master_opts__"]
if set, another error transpires (I'm using thepublish
andmine
wrappers during state rendering):Can't access roster for backend flat: Roster file "/var/tmp/.root_abcdef_salt/roster" not found
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
After a lot of debugging and suspecting the loader, I found that the issue is simply that instantiating
salt.client.ssh.client.SSHClient
does not populateconfig_dir
in the SSH master opts (which is a difference to the CLI variant). This results ina)
config_dir
being set wrong during pillar rendering (it's taken from the remote minion opts)b)
config_dir
missing from__opts__["__master_opts__"]
.(a) breaks the GPG renderer during pillar rendering.
(b) breaks the workaround inside
salt.roster.Roster.get_roster_file
for nested SSH calls.The text was updated successfully, but these errors were encountered: