gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.68k stars 1.77k forks source link

[teleport-update] Protect against disk space leaks #49309

Closed sclevine closed 3 days ago

sclevine commented 5 days ago

This PR ensures that teleport-update removes installations of Teleport that are no longer referenced by its configuration (update.yaml) or linked into /usr/local/bin.

Note that the logic avoids removing partially linked installations that are no longer referenced by configuration. This case could occur if a Teleport binary is removed in newer versions of Teleport, as teleport-update only atomically replaces (and never deletes) symlinks.


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: https://github.com/gravitational/teleport/pull/47126 Goal (internal): https://github.com/gravitational/cloud/issues/10289