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

config.get does not support merge option with salt-ssh #56441

Open
baby-gnu opened this issue Mar 24, 2020 · 2 comments · Fixed by #65517
Open

config.get does not support merge option with salt-ssh #56441

baby-gnu opened this issue Mar 24, 2020 · 2 comments · Fixed by #65517
Labels
Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@baby-gnu
Copy link

baby-gnu commented Mar 24, 2020

Description of Issue

Trying to use the merge option of salt.modules.config.get with salt-ssh results in the following error:

$ salt-ssh testmachine config.get roles merge=recurse
testmachine:
    TypeError encountered executing config.get: get() got an unexpected keyword argument 'merge'

Compared to the documentation, my tests showed me that only the default parameter is supported with salt-ssh.

This complicate a lot writing states usable in all circumstances, for example:

Note that it's not similar to #44693 since we are using salt['config.get'] syntax in sls files. Only the handling of options is different.

A quick grep showed me that salt-ssh is using a wrapper which does not support all options of the original.

Setup

Nothing particular, I just configured my roster:

testmachine:
  host: 192.168.0.102
  user: root

Steps to Reproduce Issue

Execute with salt-ssh the command config.get os_family merge=recurse.

Versions Report

salt-ssh --versions-report
Salt Version:
           Salt: 3000

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.10.1
        libgit2: 0.28.3
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 1.0.3
         Python: 3.8.2 (default, Feb 25 2020, 13:04:52)
   python-gnupg: Not Installed
         PyYAML: 5.3.1
          PyZMQ: 18.1.1
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2

System Versions:
           dist: debian unstable sid
         locale: utf-8
        machine: x86_64
        release: 5.4.0-4-amd64
         system: Linux
        version: Debian GNU/Linux unstable sid
@baby-gnu baby-gnu changed the title salt.modules.config.get does not support merge option with salt-ssh config.get does not support merge option with salt-ssh Mar 24, 2020
@Ch3LL
Copy link
Contributor

Ch3LL commented Mar 25, 2020

looks like the config wrapper module for ssh needs to be udpated here ./salt/client/ssh/wrapper/config.py.

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 team-ssh labels Mar 25, 2020
@Ch3LL Ch3LL added this to the Approved milestone Mar 25, 2020
@sagetherage sagetherage removed the P3 Priority 3 label Jun 3, 2020
@baby-gnu
Copy link
Author

baby-gnu commented Nov 9, 2020

There is no delimiter for config.get over salt-ssh as I say in a recent PR:

root@server:~# salt-ssh test-minion config.get 'foo!bar' delimiter='!'
[ERROR   ] TypeError encountered executing config.get: get() got an unexpected keyword argument 'delimiter'
test-minion:
    TypeError encountered executing config.get: get() got an unexpected keyword argument 'delimiter'

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 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants