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

Allow Salt Master/Minion and Salt-ssh to work together #40997

Closed
gtmanfred opened this issue May 1, 2017 · 5 comments
Closed

Allow Salt Master/Minion and Salt-ssh to work together #40997

gtmanfred opened this issue May 1, 2017 · 5 comments
Assignees
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. Salt-SSH ZRELEASED - 2018.3.0
Milestone

Comments

@gtmanfred
Copy link
Contributor

Description of Issue/Question

It would be great to have salt-ssh and salt-minion/salt-master to be able to work together so they could cross call each other.

Would also need to make sure LocalClient can call across both so that #40943 (comment) can be fixed.

Daniel

@gtmanfred gtmanfred added Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. ZRELEASED - 2018.3.0 Salt-SSH labels May 1, 2017
@gtmanfred gtmanfred added this to the Approved milestone May 1, 2017
@gtmanfred gtmanfred self-assigned this May 1, 2017
@noncreature0714
Copy link

@gtmanfred is the plan to combine them into "salt" or to have discreet command to call both together?

@gtmanfred
Copy link
Contributor Author

My plan is for the SaltMaster to put it on the bus for the minions that are connected, and if a roster file is setup, to run SSHClient as well.

@noncreature0714
Copy link

That sounds good! Pretty excited about it!

@yagnik
Copy link
Contributor

yagnik commented Nov 17, 2017

@gtmanfred do you have a particular usecase in mind for this ? We had one in the past wherein we would fallback to saltssh in case minion is giving issues but want to understand this feature a little better.

@gtmanfred
Copy link
Contributor Author

gtmanfred commented Nov 17, 2017

SaltSSH is useful for connecting to minions when you are behind a nat and can't open ports to the world for those minions to reach you.

This is mostly to just allow for connecting to both from one command, building in fallback for ssh would be a tougher challenge. Right now what happens is the master just pubilshs to the bus and then it is done. Then minions fire their returns on to the event stream, and the salt command watches for salt/job/<jid> to come across until all the minions that were expected to return have returned.

Salt-ssh also fires onto that event stream, so we just have to make sure the jid is the same, and the salt command picks up the returns.

You best bet for what it sounds like what you want to do would be to write a small python script that uses the LocalClient and SSHClient, and if a minion doesn't return on the LocalClient, then you connect to it with the SSHClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. Salt-SSH ZRELEASED - 2018.3.0
Projects
None yet
Development

No branches or pull requests

4 participants