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 fails on test methods b/c sha1 binary is not available #8880

Closed
pille opened this issue Nov 28, 2013 · 7 comments
Closed

salt-ssh fails on test methods b/c sha1 binary is not available #8880

pille opened this issue Nov 28, 2013 · 7 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale
Milestone

Comments

@pille
Copy link
Contributor

pille commented Nov 28, 2013

i wasn't able to get this salt-ssh working:

pille@salt-master ~ [1] % sudo salt-ssh '*' test.version 
live3:
    /bin/sh: 60: sha1: not found
    /bin/sh: 60: [: =: unexpected operator
    /usr/bin/python2.7: can't open file '/tmp/.salt/salt-call': [Errno 2] No such file or directory
    
pille@salt-master ~ % sudo salt-ssh '*' test.ping   
live3:
    /bin/sh: 60: sha1: not found
    /bin/sh: 60: [: =: unexpected operator
    /usr/bin/python2.7: can't open file '/tmp/.salt/salt-call': [Errno 2] No such file or directory

when i provide a symlink for sha1 pointing to sha1sum.
i'm on ubuntu-12.04 and this works.

working around this, leads to #8882.

@basepi
Copy link
Contributor

basepi commented Dec 2, 2013

Was the target system also Ubuntu 12.04 or another OS?

@pille
Copy link
Contributor Author

pille commented Dec 3, 2013

same.

@ghost ghost assigned cro and cachedout Dec 4, 2013
@cro
Copy link
Contributor

cro commented Dec 4, 2013

@pille So in your master conf, do you have hash_type set to sha1? And, if so, what if you set hash_type to sha1sum?

@pille
Copy link
Contributor Author

pille commented Dec 4, 2013

yes, that's true. in this case my setup differs from the default.

@cro
Copy link
Contributor

cro commented Dec 4, 2013

OK, I think if you set hash_type to sha1sum, that would be the 'best' way to fix it for the time being. Does that work?

@pille
Copy link
Contributor Author

pille commented Dec 5, 2013

setting this to the default of md5 does probably work. somehow it raised another error?!

Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
  File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 248, in handle_routine
    stdout, stderr = single.run()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 424, in run
    stdout, stderr = self.run_wfunc()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 463, in run_wfunc
    default_opts = pre_wrapper['test.opts_pkg']()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/wrapper/__init__.py", line 61, in caller
    ret = json.loads(stdout, object_hook=salt.utils.decode_dict)
  File "/usr/lib/python2.6/json/__init__.py", line 318, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

the sha1sum-trick does not work:

Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
  File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 248, in handle_routine
    stdout, stderr = single.run()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 424, in run
    stdout, stderr = self.run_wfunc()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 463, in run_wfunc
    default_opts = pre_wrapper['test.opts_pkg']()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/wrapper/__init__.py", line 57, in caller
    stdout, stderr = single.cmd_block()
  File "/usr/lib/pymodules/python2.6/salt/client/ssh/__init__.py", line 537, in cmd_block
    self.opts['hash_type'])
  File "/usr/lib/pymodules/python2.6/salt/utils/thin.py", line 80, in thin_sum
    return salt.utils.get_hash(thintar, form)
  File "/usr/lib/pymodules/python2.6/salt/utils/__init__.py", line 1262, in get_hash
    raise ValueError('Invalid hash type: {0}'.format(form))
ValueError: Invalid hash type: sha1sum

@basepi basepi modified the milestones: Approved, Outstanding Bugs Apr 21, 2014
@arroyoc arroyoc added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Core relates to code central or existential to Salt Salt-SSH P3 Priority 3 and removed Low Severity labels Aug 25, 2015
@cro cro removed their assignment May 24, 2016
@stale
Copy link

stale bot commented May 8, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label May 8, 2018
@stale stale bot closed this as completed May 15, 2018
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 Core relates to code central or existential to Salt P3 Priority 3 Salt-SSH severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale
Projects
None yet
Development

No branches or pull requests

5 participants