salt-ssh ignore cachedir parameter

Created on 12 Oct 2017  路  5Comments  路  Source: saltstack/salt

salt-ssh ignore cachedir parameter in Saltfile

Parameter cachedir is completely ignored in Saltfile and it is no possible to provide cache directory as a parameter to salt-ssh (--cachedir not work)

Setup

Saltfile:

salt-ssh:
  roster_file: roster
  config_dir: ./saltstack
  log_file: ./cache/logs/log.txt
  ssh_log_file: ./cache/logs/ssh_log.txt
  cachedir: /Users/dmitry/Code/SaltSandbox/stack/cache

Steps to Reproduce Issue

Calling as non root

salt-ssh -i '*' test.ping --log-level=trace

Gives permissions error:

.....
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
IOError: [Errno 13] Permission denied: '/var/cache/salt/master/roots/mtime_map'
.....

I noticed about this debug message also in output

[DEBUG   ] Missing configuration file: /Users/dmitry/Code/SaltSandbox/stack/saltstack/master

Then created master file in saltstack/ directory:

# Cache dir use path as absolute only ./cache not work
cachedir: /Users/dmitry/Code/SaltSandbox/stack/cache

And salt-ssh executed with correct cache directory

Versions Report

Salt Version:
           Salt: 2017.7.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.10 (default, Feb  7 2017, 00:08:15)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.2
            ZMQ: 4.2.2

System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 16.7.0
         system: Darwin
        version: 10.12.6 x86_64
Feature stale

Most helpful comment

@sunthera Thanks for the report. This would be a good addition to salt-ssh.

All 5 comments

@sunthera Thanks for the report. This would be a good addition to salt-ssh.

still having this problem in the develop branch

I think this issue is fixed by PR mentioned above

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.

From what I can see pull request #50802 has not gone into master and not gone into release 3001.1. So it doesn't work in practice as of today, see:

# salt-ssh --cachedir="$PWD"/cache '*' test.ping
Usage: salt-ssh [options] '<target>' <function> [arguments]

salt-ssh: error: no such option: --cachedir

# salt-ssh --version
salt-ssh 3001.1

Are there plans to have this end up in a release?

Related: #53664

Was this page helpful?
0 / 5 - 0 ratings