Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open a new remote client when the remote site has changed in a web session #13798

Merged
merged 2 commits into from
Jun 29, 2022

Conversation

espadolini
Copy link
Contributor

@espadolini espadolini commented Jun 23, 2022

After #11435, remoteSites are closed and removed from the reversetunnel server, but web sessions keep a cache of the clients to remote clusters that they've used, and those clients use the auth dialer from the remoteSite they were created from, resulting in a persistent in the web UI (fixable by logging out and back in or by waiting for the session to expire) when trying to reuse a remote cluster that has lost all tunnels to the proxy (because of an upgrade, a restart or just a transient network failure). This PR adds a secondary check on the session that discards the previous client and opens a new one if the remoteSite is not the same.

@espadolini espadolini requested a review from rosstimothy June 23, 2022 15:06
@github-actions github-actions bot requested review from atburke and timothyb89 June 23, 2022 15:07
@espadolini espadolini force-pushed the espadolini/reconnect-remotesite-web branch from 812dc86 to c26a978 Compare June 23, 2022 15:26
Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

LGTM. Please add some unit tests for remoteClientCache before merging.

@espadolini espadolini force-pushed the espadolini/reconnect-remotesite-web branch from 09ed1e0 to 64df629 Compare June 29, 2022 10:22
@espadolini
Copy link
Contributor Author

/gcbrun

@espadolini espadolini merged commit 063eb79 into master Jun 29, 2022
@github-actions
Copy link

@espadolini See the table below for backport results.

Branch Result
branch/v10 Create PR
branch/v7 Failed
branch/v8 Create PR
branch/v9 Create PR

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants