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

Fix socat service start failure #307

Merged
merged 2 commits into from
Feb 23, 2021
Merged

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Feb 19, 2021

After restarting php-fpm container on Ubuntu 20.04 we had missing ssh keys (computer restart, or just warden env restart), so we were getting the following issue during git clone via ssh:

Permission denied (public key).

In the logs of socat we found following line:

2021/02/19 08:08:26 socat[180] E "/tmp/ssh-auth.sock" exists

My PR removes socket file if it exists before starting socat.

Note: seems like we don't have this issue on Mac OS because there $SSH_AUTH_SOCK is equal to /run/host-services/ssh-auth.sock, and we're not starting socat here

Workaround

warden env down && warden env up

@ihor-sviziev
Copy link
Contributor Author

One note - In my case I have correct permissions to the /run/host-services/ssh-auth.sock on Linux (if I use export SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock - ssh works fine).
Maybe it's good to check if we have different user - only then start sockat, in other cases replace SSH_AUTH_SOCK?
Any thoughts?

@davidalger
Copy link
Collaborator

Very good find right here! The problem was easily reproduced, on both Mac and Linux hosts.

Maybe it's good to check if we have different user - only then start sockat, in other cases replace SSH_AUTH_SOCK?

It's a good thought, but would be difficult to implement due to the required change to SSH_AUTH_SOCK on the container environment if the permissions were ok. Let's go with the initially suggested fix here.

@davidalger davidalger merged commit f546676 into wardenenv:develop Feb 23, 2021
@davidalger davidalger added the bug Something isn't working label Feb 23, 2021
@ihor-sviziev ihor-sviziev deleted the patch-2 branch February 23, 2021 05:03
@davidalger davidalger added this to the Warden 0.10.1 milestone Feb 23, 2021
davidalger added a commit that referenced this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants