Repository navigation
Description
Description
salt-ssh can't work if root_dir path has blanks
Setup
I am executing salt-ssh from /var/lib/jenkins/workspace/Test job and here I have following config dir with file:
salt/master.d/master
Content of this file is:
root_dir:/var/lib/jenkins/workspace/Test job/salt
ssh_log_file: log/ssh
file_roots:
base:
- /var/lib/jenkins/workspace/Test job/salt/base
pillar_roots:
base:
- /var/lib/jenkins/workspace/Test job/salt/pillars
roster_file: /var/lib/jenkins/workspace/Test job/salt/roster
Getting this when I execute salt-ssh:
> [ERROR ] ERROR: Failure deploying thin, retrying:
> STDOUT:
> /usr/bin/scp
> _edbc7885e4f9aac9b83b35999b68d015148caf467b78fa39c05f669c0ff89878
> deploy
>
> STDERR:
> WARNING: Unable to locate current code checksum: /var/tmp/.root_dd8a91_salt/code-checksum.
>
> RETCODE: 11
> [ERROR ] ERROR: Failure deploying thin, retrying:
> STDOUT:
> /usr/bin/scp
> _edbc7885e4f9aac9b83b35999b68d015148caf467b78fa39c05f669c0ff89878
> deploy
>
> STDERR:
> WARNING: Unable to locate current code checksum: /var/tmp/.root_dd8a91_salt/code-checksum.
With debug turned on I see this issue:
> [DEBUG ] Executing command: scp -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no -o GSSAPIAuthentication=no -o ConnectTimeout=65 -o StrictHostKeyChecking=no -o Port=22 -o IdentityFile=key/pub_key.pem -o User=jenkins /var/lib/jenkins/workspace/Test job/salt/var/cache/salt/master/thin/thin.tgz localhost:/var/tmp/.root_dd8a91_salt/salt-thin.tgz
And if I manually execute this scp command it doesn't work because of the blank space in path (Test job). If I wrap it in quotes it does work fine.
If I change root_dir to /tmp/Test_job/ it works fine.
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
Steps to Reproduce the behavior
I am executing this command:
salt-ssh --ignore-host-keys --config-dir=salt/master.d '*' -l debug test.ping
with root_dir path set to one with blank space.
Expected behavior
Should work fine with root_dir path with blank spaces.
scp of thin.tgz should work if root_dir path has blank spaces.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
CentOS Linux release 7.9.2009
salt-ssh 3004
PASTE HERE
Additional context
Add any other context about the problem here.
Activity
Quote scp paths in salt-ssh to support paths with spaces
Quote scp paths in salt-ssh to support paths with spaces
Quote scp paths in salt-ssh to support paths with spaces
Quote scp paths in salt-ssh to support paths with spaces
Quote scp paths in salt-ssh to support paths with spaces
Test salt-ssh scp transfer with a space in the local path
dwoz commentedon Oct 16, 2026
Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below
severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.
If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.
dwoz commentedon Oct 17, 2026
Reopening — there is an open PR tracking a fix for this: #70085.
Quote scp paths in salt-ssh to support paths with spaces (#70085)
dwoz commentedon Oct 23, 2026
Closing as part of a backlog cleanup — this issue was filed without a Salt versions-report, so there's no explicit version attached to compare against.
If you (or anyone else) can still reproduce this on 3008.3 or later, please comment with:
salt --versions-reportand the issue will be reopened. The original reporter can also reopen directly.