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] Add systemd setup #49174

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Conversation

sclevine
Copy link
Member

@sclevine sclevine commented Nov 19, 2024

This PR adds a systemd service and timer for the teleport-update command.

To install the service and timer, the teleport-update binary executes the teleport-update setup subcommand of the to-be-installed teleport-update binary during each update. This validates the new updater is a valid executable on the target platform, and ensures that the timer/service file match the new updater. Note that the hidden --self-setup flag can be passed to exec the same binary, to skip this validation.

This is the seventh in a series of PRs implementing teleport-update:
Link Command: #48712
Update Command: #48244
Reloading with rollbacks: #47929
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

@github-actions github-actions bot requested review from Joerger and r0mant November 19, 2024 05:29
@sclevine sclevine added the no-changelog Indicates that a PR does not require a changelog entry label Nov 19, 2024
@@ -782,13 +786,5 @@ func (li *LocalInstaller) isLinked(versionDir string) (bool, error) {
return true, nil
}
}
linkData, err := readFileN(filepath.Join(li.LinkServiceDir, serviceName), maxServiceFileSize)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: removing this logic fixes linked-version detection via isLinked. Two versions can have the same file contents.

@sclevine sclevine force-pushed the sclevine/teleport-update-config branch from e98623f to 82eecab Compare November 20, 2024 06:20
@sclevine
Copy link
Member Author

sclevine commented Nov 20, 2024

@vapopov FYI: this PR is needed for #49110 and #49250

lib/autoupdate/agent/config.go Show resolved Hide resolved
lib/autoupdate/agent/config.go Outdated Show resolved Hide resolved
lib/autoupdate/agent/updater.go Outdated Show resolved Hide resolved
@sclevine sclevine added this pull request to the merge queue Nov 20, 2024
Merged via the queue into master with commit 7faefa2 Nov 20, 2024
41 checks passed
@sclevine sclevine deleted the sclevine/teleport-update-config branch November 20, 2024 20:31
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