You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restart Teleport Node (^C) -> No active sessions on restart.
Current behavior:
Any session which was open during the restart will show up in the WebUI. You can also join the session on the WebUI, which will create a new session with the same ID, since the session doesn't actually exist. This was a weird user experience, and initially I thought there was a file leak on the Teleport Node.
It also emits a session.end event if it is missing
Improving graceful restart would be good, but it still wouldn't handle the case where the process is killed, etc.
Instead, we can expand the UploadCompleter to be a SessionCompleter and handle all related issues. It could exist in the Session service and work more closely with the SessionRegistry. This will also solve some racy issues with the UploadCompleter as it is now.
For now, it would find session trackers which don't have a corresponding session in the session registry, then, if applicable:
Close associated unix sockets (x11 forwarding and agent forwarding)
Complete uploading of the session recording
Delete loose files (like the session upload place holder part file)
Emit a session end event
Delete the session tracker
For this to work, we'd need to remove the session tracker expiration (1 hour, extending during session lifetime), and instead track the sessions manually. This way, an abandoned upload would have an abandoned tracker, so we could move the upload completion logic to the SessionCompleter. To make this backwards compatible, we'd need to deprecate UploadCompleter over the next major version, which shouldn't be a problem since it won't overlap with the SessionCompleter.
The text was updated successfully, but these errors were encountered:
Note: This became evident in v10 as we started to query sessions using trackers instead of the legacy system. This wasn't noticed too much as the legacy system had a very short heartbeat that traded heavy backend load for this issue. The reason for avoiding such a short timeout is that the auth could drop the session if the node lost connection or the network was bad.
Expected behavior:
Restart Teleport Node (^C) -> No active sessions on restart.
Current behavior:
Any session which was open during the restart will show up in the WebUI. You can also join the session on the WebUI, which will create a new session with the same ID, since the session doesn't actually exist. This was a weird user experience, and initially I thought there was a file leak on the Teleport Node.
Bug details:
tsh ssh
Proposal
We have a few other similar issues which occur with non-graceful restart
^C
And we have some related fixes already in place:
UploadCompleter
uploads abandoned session uploadssession.end
event if it is missingImproving graceful restart would be good, but it still wouldn't handle the case where the process is killed, etc.
Instead, we can expand the
UploadCompleter
to be aSessionCompleter
and handle all related issues. It could exist in theSession
service and work more closely with theSessionRegistry
. This will also solve some racy issues with theUploadCompleter
as it is now.For now, it would find session trackers which don't have a corresponding session in the session registry, then, if applicable:
For this to work, we'd need to remove the session tracker expiration (1 hour, extending during session lifetime), and instead track the sessions manually. This way, an abandoned upload would have an abandoned tracker, so we could move the upload completion logic to the
SessionCompleter
. To make this backwards compatible, we'd need to deprecateUploadCompleter
over the next major version, which shouldn't be a problem since it won't overlap with theSessionCompleter
.The text was updated successfully, but these errors were encountered: