Skip to content

update message on empty tsh ls results#28095

Merged
stevenGravy merged 4 commits intomasterfrom
stevenGravy/tshlsempty
Jun 21, 2023
Merged

update message on empty tsh ls results#28095
stevenGravy merged 4 commits intomasterfrom
stevenGravy/tshlsempty

Conversation

@stevenGravy
Copy link
Copy Markdown
Contributor

@stevenGravy stevenGravy commented Jun 21, 2023

The missing principals no longer impacts whether users see nodes or not. The link given here no longer exists. Updated to point at the server guide.

$ tsh ls
Node Name Address Labels
--------- ------- ------


  Not seeing nodes? Either no nodes are available or your user's roles do not match the labels of at least one node.

  Check with your Teleport cluster administrator that your user's roles should have nodes available.

@stevenGravy stevenGravy enabled auto-merge June 21, 2023 13:02
@github-actions github-actions Bot requested review from jimbishopp and r0mant June 21, 2023 13:02
@github-actions github-actions Bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jun 21, 2023
@stevenGravy stevenGravy requested a review from zmb3 June 21, 2023 13:02
Comment thread tool/tsh/common/help.go Outdated
Not seeing nodes? Your user's roles may not have matching node labels. If trying Teleport for the first time, follow this guide:

https://goteleport.com/docs/getting-started/linux-server/#step-46-create-a-teleport-user-and-set-up-two-factor-authentication
https://goteleport.com/docs/server-access/getting-started
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add a redirect so anyone using an older version of tsh doesn't get sent to a nonexistent page?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor Author

@stevenGravy stevenGravy Jun 21, 2023

Choose a reason for hiding this comment

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

This redirects to the getting started now. Doesn't look like we can have different redirections. Thoughts @ptgott ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This URL currently redirects to https://goteleport.com/docs/get-started, where we moved the Linux Server guide. I don't think it's possible right now to configure redirects according to referrer.

We could see if we can configure a redirect from that specific URL (including the fragment) to the Server Access getting started guide, though I'm not sure how the docs engine will handle that. We could try it on the local docs dev server, though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried. Didn't work

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So should we change the redirect to match?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be possible to include the relevant information within the tsh ls output rather than link to the docs? That way:

  • We don't need to keep track of drift between the docs and tsh
  • Users don't need to switch contexts and follow a getting started guide that may not apply to them (e.g., if there's a misconfiguration they need to talk to a Teleport admin at their org about, or they were never intended to access servers in the first place without, say, an Access Request)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The two most likely reasons are that there are no nodes that match the listing (tsh ls, tsh ls env=test) or the user's roles do not allow them to see that listing. We could put that wording in. thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good to me!

Copy link
Copy Markdown
Contributor Author

@stevenGravy stevenGravy Jun 21, 2023

Choose a reason for hiding this comment

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

@rosstimothy please see update. Ex

Node Name Address Labels
--------- ------- ------


  Not seeing nodes? Either no nodes are available or your user's roles do not match the labels of at least one node.

  Check with your Teleport cluster administrator that your user's roles should have nodes available.

Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

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

The missing principals no longer impacts whether users see nodes or not

I didn't know that, that's a nice change.

Comment thread tool/tsh/common/help.go Outdated
Not seeing nodes? Your user's roles may not have matching node labels. If trying Teleport for the first time, follow this guide:

https://goteleport.com/docs/getting-started/linux-server/#step-46-create-a-teleport-user-and-set-up-two-factor-authentication
https://goteleport.com/docs/server-access/getting-started
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@ptgott ptgott disabled auto-merge June 21, 2023 20:52
Copy link
Copy Markdown
Contributor

@ptgott ptgott left a comment

Choose a reason for hiding this comment

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

Approved with a minor suggestion

Comment thread tool/tsh/common/help.go Outdated
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
@stevenGravy stevenGravy enabled auto-merge June 21, 2023 21:12
@stevenGravy stevenGravy added this pull request to the merge queue Jun 21, 2023
Merged via the queue into master with commit d6205f5 Jun 21, 2023
@stevenGravy stevenGravy deleted the stevenGravy/tshlsempty branch June 21, 2023 21:47
@public-teleport-github-review-bot
Copy link
Copy Markdown

@stevenGravy See the table below for backport results.

Branch Result
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants