-
Notifications
You must be signed in to change notification settings - Fork 290
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
Flocker deploy ssh config 71 #194
Conversation
this is what happens when you don't make APIs asynchronous, folks. also run a bunch of child processes, wee.
…ver running, after all.
…read in one more place that was missed previously. Also suppress output from ``ssh-add`` and do better key comparison in one more place.
each other. | ||
|
||
This code runs in the Flocker client - that is, in an administrator's | ||
environment, such as a laptop or desktop, not on Flocker nodes themselves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that it cannot be run on the nodes? Or that there is no point running them on the nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no expectation that folks will want to use the tool that way. I guess we might not even try very hard to specifically support that use. That said, it's not as if loopback ssh needs any extra special support - so chances are good this will just work by accident.
There are linting errors to fix. |
if not local_private_path.exists(): | ||
with open(devnull, "w") as discard: | ||
check_call( | ||
[b"ssh-keygen", b"-N", b"", b"-f", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use long options here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ignore that. ssh-keygen
doesn't support long options! At least they're not documented in the man page.
sock = output[0].split()[2][:-1] | ||
pid = output[1].split()[2][:-1] | ||
environ[b"SSH_AUTH_SOCK"] = sock | ||
environ[b"SSH_AGENT_PID"] = pid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will modify the environment for the entire remaining test run, right? Should we clean these up after each test? Or pass a custom environment dictionary to each subprocess?
Thanks @exarkun This is all clever stuff, especially how you use the ConchTesting server. But I guess it was frustrating working with the Is Anyway:
|
Mostly just re-used what @itamarst already built there. 😄
Yes, definitely. I wonder what gave it away?
Correct.
At least initially, yes. If it's too slow then maybe we can explore fixes - for example, remember where we've deployed keys and not try to re-deploy them unless explicitly requested by the user.
I suspect that would have been better, yes. Thanks for the review. |
Only spurious build failures, merging now. |
Add an API which can deploy the necessary SSH configuration to all of the Flocker cluster nodes and the administrator's client environment.
Fixes #71