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

Add run-time params to SSHClient and CloudClient for common operations #41237

Open
sumeetisp opened this issue May 15, 2017 · 14 comments
Open

Add run-time params to SSHClient and CloudClient for common operations #41237

sumeetisp opened this issue May 15, 2017 · 14 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
Projects
Milestone

Comments

@sumeetisp
Copy link
Contributor

Description of Issue/Question

I am using the following format for salt-ssh rest call,
{
"ssh_passwd": "Spam99",
"fun": "test.ping",
"tgt": "cri-ssh",
"eauth": "pam",
"client": "ssh",
"timeout": 2000,
"username": "admin",
"password": "admin",
"ssh_passwd": "some_password",
"ssh_key_deploy": "true"
}

My expectation is that this will login into the target, run the test.ping, deploy the salt-ssh key and get me the result.
I get the result as true but the key doesnt get deployed.
The same when i run via salt master gets the key deployed.

@gtmanfred
Copy link
Contributor

Can you please provide the --versions-report of the salt-ssh command like the issue template requested so that I can better replicate your issue on the same versions?

Thanks,
Daniel

@gtmanfred gtmanfred added the info-needed waiting for more info label May 15, 2017
@gtmanfred gtmanfred added this to the Blocked milestone May 15, 2017
@sumeetisp
Copy link
Contributor Author

Salt Version:
Salt: 2016.11.2

Dependency Versions:
cffi: 1.9.1
cherrypy: 3.2.2
dateutil: 2.6.0
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.4

System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.16.0-30-generic
system: Linux
version: Ubuntu 14.04 trusty

@sumeetisp
Copy link
Contributor Author

@gtmanfred Did it work for you?

@gtmanfred
Copy link
Contributor

I have been at a conference the last two days, I am working through the issue queue, then I am going to test this.

@gtmanfred
Copy link
Contributor

I believe that this is a limitation of the api, that it does not update the opts for salt-ssh commands.

@whiteinge can you verify this?

Thanks,
Daniel

@gtmanfred gtmanfred added Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged and removed info-needed waiting for more info labels May 18, 2017
@whiteinge
Copy link
Contributor

Pretty sure you're right. I believe that both SSHClient and CloudClient look for some run-time params in __opts__. To match the other client interfaces in Salt, __opts__ should be pretty static data and any params that are likely to change between one invocation and the next should come from *Client.cmd(..., **kwargs).

@gtmanfred gtmanfred added Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 Salt-API Salt-SSH and removed Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged labels May 18, 2017
@gtmanfred gtmanfred modified the milestones: Approved, Blocked May 18, 2017
@gtmanfred gtmanfred added the severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around label May 18, 2017
@gtmanfred
Copy link
Contributor

Thanks, I am going to mark this as a bug.

Daniel

@whiteinge
Copy link
Contributor

Cool, thanks. I removed the salt-api label since no changes are required there but I'd like to be involved when someone picks this up to make sure it matches the other clients.

@sumeetisp
Copy link
Contributor Author

sumeetisp commented May 19, 2017

In that case ,can i use the Saltfile mentioned here . The documention doesnt mention the location of these configuration parameters. I tried keeping it in /etc/salt/master but it did not work. And if its not master config then what is the location of this file? Is Saltfile a generaal term being used here or name of the file itself?

@gtmanfred
Copy link
Contributor

gtmanfred commented May 19, 2017 via email

@sumeetisp
Copy link
Contributor Author

sumeetisp commented May 19, 2017

cli option present here are the cli options? If yes this includes --key-deploy. Where does this Saltfile reside?

@gtmanfred
Copy link
Contributor

gtmanfred commented May 19, 2017 via email

@whiteinge whiteinge changed the title Salt ssh rest api call Add run-time params to SSHClient and CloudClient for common operations May 19, 2017
@whiteinge
Copy link
Contributor

Edited the title and linked an older related issue.

@stale
Copy link

stale bot commented Oct 21, 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 Oct 21, 2018
@stale stale bot closed this as completed Oct 28, 2018
@sagetherage sagetherage removed the stale label May 18, 2021
@sagetherage sagetherage reopened this May 18, 2021
@sagetherage sagetherage added this to Severity-Medium in Salt-SSH May 18, 2021
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
Projects
Salt-SSH
  
Severity-Medium
Development

No branches or pull requests

4 participants