From a3c1fe0a1491185f90e6a66eba0e72d6a2ae2c74 Mon Sep 17 00:00:00 2001 From: Vadym Popov Date: Thu, 5 Dec 2024 18:50:29 -0600 Subject: [PATCH] Temporary fix major version check for v18 (#49851) --- lib/auth/init.go | 2 +- lib/auth/version.go | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/auth/init.go b/lib/auth/init.go index 10987111ba6e1..61bb8cba0e447 100644 --- a/lib/auth/init.go +++ b/lib/auth/init.go @@ -389,7 +389,7 @@ func initCluster(ctx context.Context, cfg InitConfig, asrv *Server) error { if err != nil { return trace.Wrap(err) } - if err := validateAndUpdateTeleportVersion(ctx, cfg.VersionStorage, teleport.SemVersion, firstStart); err != nil { + if err := validateAndUpdateTeleportVersion(ctx, cfg.VersionStorage, teleport.SemVersion); err != nil { return trace.Wrap(err) } diff --git a/lib/auth/version.go b/lib/auth/version.go index 85c52f63e99c8..20af1eb36662e 100644 --- a/lib/auth/version.go +++ b/lib/auth/version.go @@ -38,7 +38,6 @@ func validateAndUpdateTeleportVersion( ctx context.Context, storage VersionStorage, currentVersion *semver.Version, - firstTimeStart bool, ) error { if skip := os.Getenv(skipVersionUpgradeCheckEnv); skip != "" { return nil @@ -46,17 +45,6 @@ func validateAndUpdateTeleportVersion( lastKnownVersion, err := storage.GetTeleportVersion(ctx) if trace.IsNotFound(err) { - // When this is not the first start, we have to ensure that previous versions, - // introduced before this check, were also verified. Therefore, not having a version - // in the database means the last known version is