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

roachprod: keyscan from a single host and distribute known_hosts #37077

Merged

Conversation

ajwerner
Copy link
Contributor

Before this PR we would run ssh-keyscan in parallel on all of the hosts.
I suspect the retry loop in the keyscan script is to deal with the connection
failures which #37001 attempts to mitigate but I don't feel eager to rip them
out right now. In addition to performing the keyscan from a single host and
distributing to all, this change also distributes the known_hosts file to the
shared user in anticipation of further changes to enable the shared user to
become the default user for roachprod commands with gce.

Release note: None

Before this PR we would run ssh-keyscan in parallel on all of the hosts.
I suspect the retry loop in the keyscan script is to deal with the connection
failures which cockroachdb#37001 attempts to mitigate but I don't feel eager to rip them
out right now. In addition to performing the keyscan from a single host and
distributing to all, this change also distributes the known_hosts file to the
shared user in anticipation of further changes to enable the shared user to
become the default user for roachprod commands with gce.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: though some of that shell scripting is a bit opaque. I'm trusting that you tested this and checked that everything is working as expected at each step.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@ajwerner
Copy link
Contributor Author

ajwerner commented Apr 24, 2019

:lgtm: though some of that shell scripting is a bit opaque. I'm trusting that you tested this and checked that everything is working as expected at each step.

Yes I verified that it works on both gce and aws.

bors r+

craig bot pushed a commit that referenced this pull request Apr 24, 2019
37077: roachprod: keyscan from a single host and distribute known_hosts r=ajwerner a=ajwerner

Before this PR we would run ssh-keyscan in parallel on all of the hosts.
I suspect the retry loop in the keyscan script is to deal with the connection
failures which #37001 attempts to mitigate but I don't feel eager to rip them
out right now. In addition to performing the keyscan from a single host and
distributing to all, this change also distributes the known_hosts file to the
shared user in anticipation of further changes to enable the shared user to
become the default user for roachprod commands with gce.

Release note: None

Co-authored-by: Andrew Werner <[email protected]>
@craig
Copy link
Contributor

craig bot commented Apr 24, 2019

Build succeeded

@craig craig bot merged commit 46f2342 into cockroachdb:master Apr 24, 2019
ajwerner added a commit to ajwerner/cockroach that referenced this pull request May 10, 2019
Previously in cockroachdb#35759 logic was added to read public keys from the gce project
metadata and distribute them into the authorized_keys file of the shared user
(ubuntu) on AWS. cockroachdb#37077 primarily served to distribute known_hosts files to
the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE.
That change also included logic to write the authorized_keys file to the shared
user on GCE (as opposed to just AWS) in anticipation of switching roachprod to
use the shared user across cloud providers. This change extends the previous
change by also distributing all public keys to the authorized_keys file for the
cluster creating user on GCE.

Release note: None
ajwerner added a commit that referenced this pull request Jun 4, 2019
Previously in #35759 logic was added to read public keys from the gce project
metadata and distribute them into the authorized_keys file of the shared user
(ubuntu) on AWS. #37077 primarily served to distribute known_hosts files to
the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE.
That change also included logic to write the authorized_keys file to the shared
user on GCE (as opposed to just AWS) in anticipation of switching roachprod to
use the shared user across cloud providers. This change extends the previous
change by also distributing all public keys to the authorized_keys file for the
cluster creating user on GCE.

Release note: None
craig bot pushed a commit that referenced this pull request Jun 4, 2019
37438: roachprod: distribute authorized_keys to creating user on gce r=ajwerner a=ajwerner

Previously in #35759 logic was added to read public keys from the gce project
metadata and distribute them into the authorized_keys file of the shared user
(ubuntu) on AWS. #37077 primarily served to distribute known_hosts files to
the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE.
That change also included logic to write the authorized_keys file to the shared
user on GCE (as opposed to just AWS) in anticipation of switching roachprod to
use the shared user across cloud providers. This change extends the previous
change by also distributing all public keys to the authorized_keys file for the
cluster creating user on GCE.

Release note: None

Co-authored-by: Andrew Werner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants