[teleport-update] Stabilize tsh paths when run from agent installation#60625
Merged
[teleport-update] Stabilize tsh paths when run from agent installation#60625
Conversation
Member
Author
|
(Swapping Noah -> Tim as reviewer since Noah is OOO and Tim was suggested for this file.) |
vapopov
approved these changes
Oct 27, 2025
Member
Author
|
@rosstimothy @hugoShaka this is customer impacting, please let me know if I should look for other G1 reviewers |
strideynet
approved these changes
Oct 31, 2025
Contributor
This was referenced Oct 31, 2025
mmcallister
pushed a commit
that referenced
this pull request
Nov 19, 2025
#60625) * stablize tsh paths when run from agent installation * cleanup
mmcallister
pushed a commit
that referenced
this pull request
Nov 20, 2025
#60625) * stablize tsh paths when run from agent installation * cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When tsh is invoked from an Agent Managed Updates installation but is being used as a client tool, paths are not stabilized with
autoupdate/agent.StableExecutable(). This is not an issue for most short-running re-executions of tsh in-memory, but it does break instances where tsh writes its path into a configuration file, such as in #60600.This PR fixes the issue by using the path from
autoupdate/agent.StableExecutable()instead ofos.Executable(). This function should always be safe to swap in, as it ensures tsh is being invoked from an unstable path before returning different values.This PR is similar to #54145, which addresses the same issue for tbot (which is updated via Agent Managed Updates).
changelog: stabilize tsh paths when run from agent installation
RFD: #47126
Goal (internal): https://github.com/gravitational/cloud/issues/14225
Fixes #60600