You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[v17] [teleport-update] Support for CentOS 7 (#53017)
* support systemd down to 219
* comments
* Apply suggestions from code review
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
* Missed check on additional use of IsPresent
* adjustments from testing various versions of centos7
* Typo
* Use dedicated error for version incompat
---------
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
// If the old teleport-upgrade script is detected, disable it to ensure they do not interfere.
235
235
// Note that the schedule is also set to nop by the Teleport agent -- this just prevents restarts.
236
-
enabled, err:=isActiveOrEnabled(ctx, oldTimer)
236
+
present, err:=oldTimer.IsPresent(ctx)
237
+
iferrors.Is(err, ErrNotAvailable) { // systemd too old
238
+
iferr:=oldTimer.Disable(ctx, true); err!=nil {
239
+
ns.log.DebugContext(ctx, "The deprecated teleport-ent-updater package is either missing, or could not be disabled.", errorKey, err)
240
+
}
241
+
returnnil
242
+
}
237
243
iferr!=nil {
238
-
returntrace.Wrap(err, "failed to determine if deprecated teleport-upgrade systemd timer is enabled")
244
+
returntrace.Wrap(err, "failed to determine if deprecated teleport-upgrade systemd timer is present")
239
245
}
240
-
ifenabled {
246
+
ifpresent {
241
247
iferr:=oldTimer.Disable(ctx, true); err!=nil {
242
248
ns.log.ErrorContext(ctx, "The deprecated teleport-ent-updater package is installed on this server, and it cannot be disabled due to an error. You must remove the teleport-ent-updater package after verifying that teleport-update is working.", errorKey, err)
0 commit comments