{"record":{"id":"e02d48b0444159d6","repo":"gravitational/teleport","slug":"not-supported-on-this-platform","errorCode":null,"errorMessage":"not supported on this platform","messagePattern":"not supported on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/autoupdate/agent/updater.go","lineNumber":346,"sourceCode":"\t// Unlink must be idempotent.\n\tUnlink(ctx context.Context, rev Revision, pathDir string) error\n\t// UnlinkSystem unlinks the system (package) installation of Teleport from the system linking location.\n\t// UnlinkSystem must be idempotent.\n\tUnlinkSystem(ctx context.Context) error\n\t// List the installed revisions of Teleport.\n\tList(ctx context.Context) (revisions []Revision, err error)\n\t// Remove the Teleport agent at revision.\n\t// Remove must be idempotent.\n\tRemove(ctx context.Context, rev Revision) error\n\t// IsLinked returns true if the revision is linked to path.\n\tIsLinked(ctx context.Context, rev Revision, pathDir string) (bool, error)\n}\n\nvar (\n\t// ErrLinked is returned when a linked version cannot be operated on.\n\tErrLinked = errors.New(\"version is linked\")\n\t// ErrNotSupported is returned when the operation is not supported on the platform.\n\tErrNotSupported = errors.New(\"not supported on this platform\")\n\t// ErrNotAvailable is returned when the operation is not available at the current version of the platform.\n\tErrNotAvailable = errors.New(\"not available at this version\")\n\t// ErrNoBinaries is returned when no binaries are available to be linked.\n\tErrNoBinaries = errors.New(\"no binaries available to link\")\n\t// ErrFilePresent is returned when a file is present.\n\tErrFilePresent = errors.New(\"file present\")\n\t// ErrNotInstalled is returned when Teleport is not installed.\n\tErrNotInstalled = errors.New(\"not installed\")\n)\n\n// Process provides an API for interacting with a running Teleport process.\ntype Process interface {\n\t// Name of the process.\n\tName() string\n\t// Reload must reload the Teleport process as gracefully as possible.\n\t// If the process is not healthy after reloading, Reload must return an error.\n\t// If the process did not require reloading, Reload must return ErrNotNeeded.\n\t// E.g., if the process is not enabled, or it was already reloaded after the last Sync.","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/autoupdate/agent/updater.go#L328-L364","documentation":"ErrNotSupported is a sentinel error in the autoupdate agent updater indicating that the requested operation cannot be performed on the current platform — most commonly because systemd is not running (or the platform lacks the subsystem the updater needs). It is returned by checkSystem, Remove, and removeWithoutSystem, and callers typically detect it with errors.Is to downgrade the operation to a no-op or warning rather than failing.","triggerScenarios":"Calling updater operations (sync/remove/Install-related paths) on a system where systemd is not the init system; in sync (updater.go:630) checkSystem returns it and the caller logs 'Not syncing systemd configuration because systemd is not running.'; process.go:486 returns it when a required package/unit is not present for the platform.","commonSituations":"Running teleport-update inside a container without systemd, on a sysvinit/OpenRC system, in WSL1 without systemd enabled, or invoking Remove/link operations on an unsupported OS.","solutions":["Verify systemd is running: `ps -p 1` should show systemd, or `systemctl is-system-running` succeeds.","If running in a container/WSL, enable systemd (systemd=true in WSL, or run with a systemd-enabled base image) or skip autoupdate management on that host.","Treat the error as expected in non-systemd environments: check errors.Is(err, autoupdate.ErrNotSupported) and log a warning instead of failing.","Use a platform where the updater is supported, or manage binaries manually."],"exampleFix":"// before\nif err := updater.Remove(ctx); err != nil {\n    return err\n}\n// after\nif err := updater.Remove(ctx); err != nil && !errors.Is(err, autoupdate.ErrNotSupported) {\n    return trace.Wrap(err)\n}\n// ErrNotSupported on non-systemd hosts is expected; ignore it.","handlingStrategy":"type-guard","validationCode":"if !systemdRunning() { // e.g. exec: systemctl is-system-running\n    log.Info(\"autoupdate operations unavailable: systemd not running\")\n}","typeGuard":"func IsNotSupported(err error) bool { return errors.Is(err, autoupdate.ErrNotSupported) }","tryCatchPattern":"if err := updater.Remove(ctx); err != nil {\n    if errors.Is(err, autoupdate.ErrNotSupported) {\n        log.WarnContext(ctx, \"operation not supported on this platform; skipping\")\n        return nil\n    }\n    return trace.Wrap(err)\n}","preventionTips":["Check systemd availability before enabling teleport-update on a host","Skip updater features in containers/WSL without systemd","Always compare with errors.Is, never string matching on the message"],"tags":["platform-support","systemd","autoupdate","sentinel-error"],"backgroundTag":"unsupported-platform","analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}