-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
desktop access: missing upload completer in standalone mode #12549
Labels
Comments
zmb3
added a commit
that referenced
this issue
Jul 15, 2022
Prior to this change, each individual service (proxy, app, SSH, db, etc) would spin up its own uploader service. If you are running multiple Teleport services in the same process, this means you get multiple uploaders all looking at the same directory, which can result in duplicate upload events in the audit log. Additionally, desktop access has (mistakenly) failed to set up this service, so desktop sessions would only be uploaded if you happened to also run some other service in the same process that does spin up the uploader. Lastly, the uploader is not necessary at all if sync-recording modes are used (nothing is written to disk). Solve these issues by centralizing the uploader service so that it runs once per process, and each Teleport service doesn't need to think about whether or not the service should run. Fixes #12549
zmb3
added a commit
that referenced
this issue
Jul 22, 2022
Prior to this change, each individual service (proxy, app, SSH, db, etc) would spin up its own uploader service. If you are running multiple Teleport services in the same process, this means you get multiple uploaders all looking at the same directory, which can result in duplicate upload events in the audit log. Additionally, desktop access has (mistakenly) failed to set up this service, so desktop sessions would only be uploaded if you happened to also run some other service in the same process that does spin up the uploader. Solve these issues by centralizing the uploader service so that it runs once per process, and each Teleport service doesn't need to think about whether or not the service should run. Fixes #12549
zmb3
added a commit
that referenced
this issue
Sep 22, 2022
Prior to this change, each individual service (proxy, app, SSH, db, etc) would spin up its own uploader service. If you are running multiple Teleport services in the same process, this means you get multiple uploaders all looking at the same directory, which can result in duplicate upload events in the audit log. Additionally, desktop access has (mistakenly) failed to set up this service, so desktop sessions would only be uploaded if you happened to also run some other service in the same process that does spin up the uploader. Solve these issues by centralizing the uploader service so that it runs once per process, and each Teleport service doesn't need to think about whether or not the service should run. Fixes #12549
Merged
r0mant
added a commit
that referenced
this issue
Sep 24, 2022
* Init an uploader service for Windows Desktop Service This will result in multiple uploader services running if there are other Teleport services running in the same process, but that will be fixed by #14521. Updates #12549 * buddy: Fix incorrect use of loop variables (#16306) * Fix incorrect use of loop variables This commit fixes a few occurrences of loop variables being incorrectly used in the context of Go-routines or (most frequently) parallel tests. To fix the issues, we create a local copy of the range variables before the parallel tests (or Go-routine), as suggested in the documentation of the `testing` package: https://pkg.go.dev/testing#hdr-Subtests_and_Sub_benchmarks Issues were found using the `loopvarcapture` linter. Signed-off-by: Roman Tkachenko <[email protected]> * fix TestTraceProvider/spans_exported_with_gRPC+TLS * run TestSSH serially * operator: Conserve 'created_by' data in user spec Signed-off-by: Roman Tkachenko <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: Tim Ross <[email protected]> Co-authored-by: Hugo Hervieux <[email protected]> * Correctly set the end time when completing an upload The upload completer would set the session end time based on the last known event in the session, but it left the timestamp in the event's metadata blank, which caused it to default to the time the upload was completed. Fixes #16555 * Speed up TestTerminalPing (#16481) This test takes between 10-20 seconds to run, because it waits for a websocket ping message and pings run on a 10s timer by default. It turns out, we allow specifying the keepalive interval in the terminal request, but due to a bug we would always overwrite that value with what's in the cluster networking config. Fix the bug and speed up the test by overriding the keepalive interval to something shorter for this test. Before: ➜ go test -run TestTerminalPing -race ./lib/web -count=1 ok github.com/gravitational/teleport/lib/web 13.122s After: ➜ go test -run TestTerminalPing -race ./lib/web -count=1 ok github.com/gravitational/teleport/lib/web 3.394s * Add labels to Windows Desktop Service, add endpoint for searching them (#16436) * export GetResourcesByResourceIDs * add WithCluserClientProvider * Improve unit tests in CI (#16698) - Increase timeout - Detect whether operator, CI, Rust, or Helm tests are necessary * Update `webassets` ref to latest `teleport-v10` Signed-off-by: Roman Tkachenko <[email protected]> Co-authored-by: Roman Tkachenko <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: Tim Ross <[email protected]> Co-authored-by: Hugo Hervieux <[email protected]> Co-authored-by: Ryan Clark <[email protected]> Co-authored-by: Nic Klaassen <[email protected]> Co-authored-by: Ryan Clark <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As pointed out in #12471 (comment), desktop access does not start an upload completer service.
Working theory is that we never noticed this when running windows desktop service + auth service in the same process, because auth service sets up an upload completer.
We should:
proxy
ornode
. Kill the process running windows_desktop_service while a session is in progress, restart the process, and verify whether the upload is ever completed (you may need to tweak the grace period to make this easier to test).*TeleportProcess
to ensure that it always starts an upload completer innode
orproxy
recording modes, centralizing this logic and moving it out of individual services.cc @Joerger who has the most recent experience in this code and can help discuss.
The text was updated successfully, but these errors were encountered: