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

2019.2 Using cmd.run 'ssh-agent -s' gets stuck on macOS when using runas #55300

Open
taranjlu opened this issue Nov 14, 2019 · 3 comments
Open
Assignees
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE MacOS pertains to the OS of fruit Salt-SSH severity-high 2nd top severity, seen by most users, causes major problems
Milestone

Comments

@taranjlu
Copy link

Description of Issue

The following command causes salt to hang on macOS: sudo salt-call cmd.run 'ssh-agent -s' runas=some_user

I came across this while attempting to add an ssh key (copied over from the master) to ssh-agent for a specific user on the minion. My plan was to use something along these lines to accomplish that: cmd.run 'eval ssh-agent -s; ssh-add [path to ssh key] albeit, as part of a salt state. I'm not super familiar with the inner workings of ssh, but it seems that macOS runs different instances of ssh-agent per user, which is why I am trying to use runas.

The above command works correctly when run as root and outputs the env config needed for working with the ssh-agent.

I also tried running the above with debug output and it just gets stuck after this line:
[INFO ] Executing command 'ssh-agent -s' as user '[some_user]' in directory '/Users/[some_user]'

Setup

  • Salt master running on macOS as root via a launch daemon
    • Installed via pip
  • Salt minion running on macOS as root via a launch daemon
    • Installed via pip

Steps to Reproduce Issue

Try running the above command, either directly on the minion or via a salt state.

Versions Report

Salt Version:
Salt: 2019.2.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.10.3
libgit2: Not Installed
libnacl: Not Installed
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: Not Installed
Python: 2.7.17 (default, Oct 24 2019, 12:57:50)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.1.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 5.1.1
ZMQ: 4.3.2

System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 17.7.0
system: Darwin
version: 10.13.6 x86_64

@xeacott
Copy link
Contributor

xeacott commented Nov 14, 2019

Thanks for submitting. I personally don't have a mac or a VM available to test this, but someone on @saltstack/team-core I think would be of better assistance!

@xeacott xeacott added MacOS pertains to the OS of fruit Salt-SSH labels Nov 14, 2019
@xeacott xeacott added this to the Approved milestone Nov 14, 2019
@stale
Copy link

stale bot commented Jan 7, 2020

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 Jan 7, 2020
@sagetherage sagetherage added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jan 9, 2020
@stale
Copy link

stale bot commented Jan 9, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 9, 2020
@sagetherage sagetherage added Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems labels May 18, 2021
@sagetherage sagetherage changed the title Using cmd.run 'ssh-agent -s' gets stuck on macOS when using runas 2019.2 Using cmd.run 'ssh-agent -s' gets stuck on macOS when using runas 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 Confirmed Salt engineer has confirmed bug/feature - often including a MCVE MacOS pertains to the OS of fruit Salt-SSH severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

4 participants