Skip to content
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

salt-ssh can't work if root_dir path has blanks #61338

Open
1 of 6 tasks
vladaurosh opened this issue Dec 8, 2021 · 0 comments
Open
1 of 6 tasks

salt-ssh can't work if root_dir path has blanks #61338

vladaurosh opened this issue Dec 8, 2021 · 0 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Salt-SSH

Comments

@vladaurosh
Copy link

vladaurosh commented Dec 8, 2021

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.

@vladaurosh vladaurosh added Bug broken, incorrect, or confusing behavior needs-triage labels Dec 8, 2021
@garethgreenaway garethgreenaway added this to the Sulphur v3006.0 milestone Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Salt-SSH
Projects
None yet
Development

No branches or pull requests

5 participants