-
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
[teleport-update] Add support for reloading the agent & reverting symlinks on failed reload #47929
Conversation
9935bf5
to
02738ef
Compare
7c53b9b
to
4429a58
Compare
) | ||
|
||
// SystemdService manages a Teleport systemd service. | ||
type SystemdService struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: btw Teleport has indirect dependency of https://github.com/coreos/go-systemd which we might use https://github.com/coreos/go-systemd/blob/main/dbus/methods_test.go#L205
I don't say that is better, just suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. I lean towards using systemctl for now, since it's guaranteed to be present in the context the agent is executing on a machine with systemd, and we're likely going to port the existing updater logic for now. We can revisit later.
This PR adds support for reloading the Teleport agent process when the
enable
subcommand to theteleport-update
binary is executed. Additionally, this PR reverts the system to the previously installed version of the agent on failure.This PR also adds:
0750
->0755
)Notably, this PR is missing:
This is the fourth in a series of PRs implementing
teleport-update
:Linking: #47879
Enable Command: #47565
Initial scaffolding PR: #46418
The
teleport-update
binary will be used to enable, disable, and trigger automatic Teleport agent updates. The new auto-updates system manages a local installation of the cluster-specified version of Teleport stored in/var/lib/teleport/versions
.RFD: #47126
Goal (internal): https://github.com/gravitational/cloud/issues/10289
Example: