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

Enhance troubleshooting for SSH key injection #795

Closed
wants to merge 10 commits into from

Conversation

ldomb
Copy link

@ldomb ldomb commented Dec 5, 2018

Added some more documentation around ssh. I don't think its clear to everyone that "core" is the user needed for ssh nor howto generate the config for the sshKey used in the installation.

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 5, 2018
@openshift-ci-robot
Copy link
Contributor

Hi @ldomb. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ldomb
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: rajatchopra

If they are not already assigned, you can assign the PR to them by writing /assign @rajatchopra in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ldomb
Copy link
Author

ldomb commented Dec 5, 2018

/assign @rajatchopra

@wking wking changed the title Enahncetrshooting Enhance troubleshooting for SSH key injection Dec 5, 2018
docs/user/troubleshooting.md Outdated Show resolved Hide resolved
@ldomb
Copy link
Author

ldomb commented Dec 6, 2018

doc needs to be adjusted

@@ -52,7 +52,9 @@ If no pods are shown, etcd will need to be [investigated](#etcd-is-not-running).

### Unable to SSH into Master Nodes

In order to SSH into the master nodes, it is necessary to include an administrator's SSH key during the installation. If SSH authentication is failing, ensure that the proper SSH key is being used.
In order to SSH into the master nodes as user `core`, it is necessary to include an administrator's SSH key during the installation. When asked by the installation wizzard for the ssh-key, make sure you define the absolute path to your key. This key will be added to the core user's authorized_keys file. If installed in aws you will not see this key attached to your instance as a keypair in the aws console.
Copy link
Member

Choose a reason for hiding this comment

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

nits: "ssh" -> "SSH". "SSH" is the protocol; ssh is just the executable. And "core" -> "core" and "authorized_keys" -> "authorized_keys". And "aws" -> "AWS".

Re: "absolute path", the wizard prompt is a Select of your ~/.ssh/*.pub. I don't think it allows free-form input (or at least, it didn't allow it in my tests).

Copy link
Contributor

Choose a reason for hiding this comment

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

minor: "wizzard" -> "wizard"

In order to SSH into the master nodes, it is necessary to include an administrator's SSH key during the installation. If SSH authentication is failing, ensure that the proper SSH key is being used.
In order to SSH into the master nodes as user `core`, it is necessary to include an administrator's SSH key during the installation. When asked by the installation wizzard for the ssh-key, make sure you define the absolute path to your key. This key will be added to the core user's authorized_keys file. If installed in aws you will not see this key attached to your instance as a keypair in the aws console.

If SSH authentication is failing, ensure that the proper SSH key is being used.
Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice Dec 7, 2018

Choose a reason for hiding this comment

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

Could we add something like: "Verify your SSH Key by using oc get configmap -n kube-system cluster-config-v1 -o yaml etc... after "ensure that the proper SSH key is being used."? Because I don't think it's clear for people how to verify the key without restarting the install.

Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice Jan 2, 2019

Choose a reason for hiding this comment

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

I still think we should add something like this to the documentation.

Copy link
Member

Choose a reason for hiding this comment

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

With the oc get configmap ... and associated lead-in above, I think we can drop this line.

@wking
Copy link
Member

wking commented Jan 2, 2019

@ldomb, do you have time to come back to this and address the remaining feedback? Just had another report here from someone who could have used the "user is core" documentation. If you don't have time, do you mind if I carry your commit into a new PR that addresses the feedback?

@ldomb
Copy link
Author

ldomb commented Jan 2, 2019 via email

@@ -50,9 +50,9 @@ sudo crictl pods --name=etcd-member

If no pods are shown, etcd will need to be [investigated](#etcd-is-not-running).

### Unable to SSH into Master Nodes
### Unable to access the Master Nodes via SSH
Copy link
Member

Choose a reason for hiding this comment

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

nit: trailing whitespace (and also in the next paragraph).

I'd rather leave this header alone (since I'm fine with "SSH" as a verb). But if you want to update it, you'll also need to update references to it:

$ git grep unable-to origin/pr/795
origin/pr/795:docs/user/troubleshooting.md:If SSH access to the master nodes isn't available, that will need to be [investigated next](#unable-to-ssh-into-master-node).

And it looks like that link is already broken in master because it uses -node instead of -nodes. I've filed #980 to fix that, so you don't have to worry about it if you leave the header alone.


In order to SSH into the master nodes as user `core`, it is necessary to include an administrator's SSH key during the installation. When asked by the installation wizzard for the ssh-key, make sure you define the absolute path to your key. This key will be added to the core user's authorized_keys file. If installed in aws you will not see this key attached to your instance as a keypair in the aws console.
In order to ssh into the master nodes as user **core**, it is necessary to include an administrator's ssh-key during the installation. When asked by the installation wizard for the ssh-key, make sure you select your ssh-key from the wizard prompt **~/.ssh/*.pub**. This key will be added to the **core** user's **authorized_keys** file. If installed in AWS you will **not** see this key attached to your instance as a keypair in the AWS console.
Copy link
Member

Choose a reason for hiding this comment

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

This is moving in the wrong direction with SSH -> ssh. Per this comment, you should be using "SSH" (for the protocol) everywhere unless you are writing ssh ... for a shell command.

Also, core is more appropriate than core, because the username is literal code you could paste into shell scripts. Similarly for your paths (~/.ssh/*.pub and authorized_keys).

not would be more appropriate than not, because this is for local emphasis. For example, see "However, it should not be used..." and "This is not a drill". And the AWS docs use "key pair", not "keypair". So I'd rather see something like:

The public key is placed in authorized_keys by Ignition; it is not configured via platform-specific approaches like AWS key pairs.

instead of your last two sentences.

@kikisdeliveryservice
Copy link
Contributor

Is there a reason why you didn't add my suggestion here?: #795 (comment)

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 2, 2019
@ldomb
Copy link
Author

ldomb commented Jan 2, 2019

Added section for comment 795

@ldomb
Copy link
Author

ldomb commented Jan 2, 2019 via email


In order to SSH into the master nodes, it is necessary to include an administrator's SSH key during the installation. If SSH authentication is failing, ensure that the proper SSH key is being used.
In order to SSH into the master nodes as user `core`, it is necessary to include an administrator's ssh-key during the installation. When asked by the installation wizard for the ssh-key, make sure you select your ssh-key from the wizard prompt `~/.ssh/*.pub`. This key will be added to the `core` user's `authorized_keys` file. The public key is placed in authorized_keys by Ignition and is not configured via platform-specific approaches like [AWS key pairs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html). To verify if you added the correct ssh-key during installation you can use thefollowing command:
Copy link
Member

Choose a reason for hiding this comment

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

"thefollowing" -> "the following". Or just end with:

You can verify the configured SSH key with:

oc get configmap ...

There's also an authorized_keys that still needs backticks.

I'd prefer to use reference-style links for external links (like we do now for kubernetes-debug), but if you're tired of tweaking, I'm ok with the inline link.

docs/user/troubleshooting.md Outdated Show resolved Hide resolved
In order to SSH into the master nodes, it is necessary to include an administrator's SSH key during the installation. If SSH authentication is failing, ensure that the proper SSH key is being used.
In order to SSH into the master nodes as user `core`, it is necessary to include an administrator's SSH key during the installation. When asked by the installation wizzard for the ssh-key, make sure you define the absolute path to your key. This key will be added to the core user's authorized_keys file. If installed in aws you will not see this key attached to your instance as a keypair in the aws console.

If SSH authentication is failing, ensure that the proper SSH key is being used.
Copy link
Member

Choose a reason for hiding this comment

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

With the oc get configmap ... and associated lead-in above, I think we can drop this line.

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2019
@wking
Copy link
Member

wking commented Jan 3, 2019

I've pushed 73aa0e4 with the remaining changes I'd like to see here, in case squashing that in is easier than working through GitHub review comments. You should be able to add that commit to your branch with:

$ git pull https://github.com/wking/openshift-installer.git ssh-detail-fixups

if it looks good to you. Then squash this branch down to a single commit, and we should be good to go :).

@ldomb ldomb closed this Jan 3, 2019
@ldomb ldomb deleted the enahncetrshooting branch January 3, 2019 13:42
@ldomb
Copy link
Author

ldomb commented Jan 3, 2019 via email

@wking
Copy link
Member

wking commented Jan 3, 2019

Squashed commits and created a new PR

In the future, it's better to force-push to your existing branch instead of creating a new pull request. That way it's easier for folks starting from a landed commit to find the PR discussion.

But had to modify the links as you have two [][] instead of []()

Those were intentional. See the docs for reference-style links and the implicit link name shortcut. But whatever, inline links work too ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants