Skip to content
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] Display download progress and stats #49805

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

sclevine
Copy link
Member

@sclevine sclevine commented Dec 5, 2024

This PR logs download progress and stats when teleport-update downloads Teleport tgz files.

The download progress logic is designed to ensure a relatively even distribution of progress log lines over the duration of the download, with a hard maximum of 5 lines.

Example:

ubuntu@legendary-mite:~$ sudo ./teleport-update enable --force-version=16.4.3
2024-12-05T03:22:14Z INFO [UPDATER]   Initiating installation. target_version:16.4.3+Enterprise active_version: agent/updater.go:315
2024-12-05T03:22:16Z INFO [UPDATER]   Downloading Teleport tarball. url:https://cdn.teleport.dev/teleport-ent-v16.4.3-linux-arm64-bin.tar.gz size:163411740 agent/installer.go:322
2024-12-05T03:22:16Z INFO [UPDATER]   teleport-ent-v16.4.3-linux-arm64-bin.tar.gz - progress: 20% agent/logger.go:50
2024-12-05T03:22:17Z INFO [UPDATER]   teleport-ent-v16.4.3-linux-arm64-bin.tar.gz - progress: 40% agent/logger.go:50
2024-12-05T03:22:17Z INFO [UPDATER]   teleport-ent-v16.4.3-linux-arm64-bin.tar.gz - progress: 60% agent/logger.go:50
2024-12-05T03:22:18Z INFO [UPDATER]   teleport-ent-v16.4.3-linux-arm64-bin.tar.gz - progress: 80% agent/logger.go:50
2024-12-05T03:22:19Z INFO [UPDATER]   teleport-ent-v16.4.3-linux-arm64-bin.tar.gz - progress: 100% agent/logger.go:50
2024-12-05T03:22:19Z INFO [UPDATER]   Download complete. duration:3.601365475s size:163411740 agent/installer.go:350
2024-12-05T03:22:21Z INFO [UPDATER]   Extracting Teleport tarball. path:/opt/teleport/default/versions/16.4.3_ent size:648488960 agent/installer.go:370
2024-12-05T03:22:24Z INFO [UPDATER]   Executing new teleport-update binary to update configuration. agent/updater.go:131
2024-12-05T03:22:25Z INFO [UPDATER]   Systemd configuration synced. unit:teleport-update.timer agent/process.go:259
2024-12-05T03:22:25Z INFO [UPDATER]   Service enabled. unit:teleport-update.timer agent/process.go:276
2024-12-05T03:22:25Z INFO [UPDATER]   Finished executing new teleport-update binary. agent/updater.go:137
2024-12-05T03:22:25Z INFO [UPDATER]   Target version successfully installed. target_version:16.4.3+Enterprise agent/updater.go:691
2024-12-05T03:22:25Z INFO [UPDATER]   Gracefully reloaded. unit:teleport.service agent/process.go:110
2024-12-05T03:22:25Z INFO [UPDATER]   Monitoring PID file to detect crashes. unit:teleport.service agent/process.go:113
2024-12-05T03:22:40Z INFO [UPDATER]   Configuration updated. agent/updater.go:331

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 /opt/teleport.

RFD: #47126
Goal (internal): https://github.com/gravitational/cloud/issues/10289

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-49805.d3pp5qlev8mo18.amplifyapp.com

@sclevine sclevine added the no-changelog Indicates that a PR does not require a changelog entry label Dec 5, 2024
@sclevine sclevine added this pull request to the merge queue Dec 5, 2024
Merged via the queue into master with commit 925b74e Dec 5, 2024
42 checks passed
@sclevine sclevine deleted the sclevine/teleport-update-progress branch December 5, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants