Skip to content

Fix tsh windows builds#28357

Merged
rosstimothy merged 1 commit intomasterfrom
tross/fix_tsh_windows
Jun 30, 2023
Merged

Fix tsh windows builds#28357
rosstimothy merged 1 commit intomasterfrom
tross/fix_tsh_windows

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented Jun 27, 2023

#24864 added a dependency of lib/web into tsh which broke windows tsh builds because lib/web transiently depends on lib/srv which has linux specific code. This shuffles around a few things so that lib/web is no longer importing lib/srv at all by:

  1. Indirectly using the srv.SessionController to apply session control for web ssh sessions
  2. Moving the common reversetunnel interfaces into reversetunnelclient since lib/reversetunnel imports lib/srv/forward which imports lib/srv.
  3. Directly converting mysql client errors in the connection tester instead of calling a common function.

@rosstimothy rosstimothy force-pushed the tross/fix_tsh_windows branch from 8867786 to 06088a4 Compare June 27, 2023 14:48
@rosstimothy rosstimothy marked this pull request as ready for review June 27, 2023 14:56
@github-actions github-actions Bot requested review from GavinFrazar and r0mant June 27, 2023 14:57
@rosstimothy rosstimothy requested review from jakule and zmb3 June 27, 2023 15:04
@rosstimothy
Copy link
Copy Markdown
Contributor Author

PTAL @jakule @zmb3 @GavinFrazar @r0mant

Copy link
Copy Markdown
Contributor

@jakule jakule left a comment

Choose a reason for hiding this comment

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

Overall looks good

Comment thread lib/reversetunnel/api.go Outdated
Comment thread lib/reversetunnelclient/api.go Outdated
Comment thread lib/web/apiserver.go Outdated
Comment thread lib/web/apiserver.go Outdated
@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Jun 30, 2023

/excludeflake TestAppLoginLeaf

#24864 added a dependency of lib/web into tsh which broke windows
tsh builds because lib/web transiently depends on lib/srv which
has linux specific code. This shuffles around a few things so
that lib/web is no longer importing lib/srv at all by:

- Indirectly using the srv.SessionController to apply session
control for web ssh sessions

- Moving the common reversetunnel interfaces into
reversetunnelclient since lib/reversetunnel imports
lib/srv/forward which imports lib/srv.

- Directly converting mysql client errors in the connection
tester instead of calling a common function.
@rosstimothy rosstimothy force-pushed the tross/fix_tsh_windows branch from 5163cc7 to 3129dca Compare June 30, 2023 16:54
@rosstimothy rosstimothy enabled auto-merge June 30, 2023 16:55
@rosstimothy rosstimothy added this pull request to the merge queue Jun 30, 2023
Merged via the queue into master with commit 2055921 Jun 30, 2023
@rosstimothy rosstimothy deleted the tross/fix_tsh_windows branch June 30, 2023 17:30
rosstimothy added a commit that referenced this pull request Oct 5, 2023
rosstimothy added a commit that referenced this pull request Oct 5, 2023
github-merge-queue Bot pushed a commit that referenced this pull request Oct 5, 2023
* Break client facing types out of reversetunnel package

Backports part of #28357 to branch/v13

* Track user connections across clusters (#32688)

Ensure that `proxy_ssh_sessions_total` is incremented in both the
root and the leaf cluster if a session to a node in the leaf cluster
is established through the root cluster. This now also prevents
leaf clusters from terminating during a graceful shutdown if there
is an active connection that was created from the root.

Fixes #32605.

* Track connections to direct dial nodes across clusters

#32688 added support for tracking connections to sessions via a
reverse tunnel node but failed to account for sessions to direct
dial nodes.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 5, 2023
* Break client facing types out of reversetunnel package

Backports part of #28357 to branch/v13

* Track user connections across clusters (#32688)

Ensure that `proxy_ssh_sessions_total` is incremented in both the
root and the leaf cluster if a session to a node in the leaf cluster
is established through the root cluster. This now also prevents
leaf clusters from terminating during a graceful shutdown if there
is an active connection that was created from the root.

Fixes #32605.

* Track user connections across clusters (#32688)

Ensure that `proxy_ssh_sessions_total` is incremented in both the
root and the leaf cluster if a session to a node in the leaf cluster
is established through the root cluster. This now also prevents
leaf clusters from terminating during a graceful shutdown if there
is an active connection that was created from the root.

Fixes #32605.

* Track connections to direct dial nodes across clusters

#32688 added support for tracking connections to sessions via a
reverse tunnel node but failed to account for sessions to direct
dial nodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants