Do not validate deployment id from license if nil uuid (#4856)

In some very rare cases the license can contain a nil uuid
(00000000-0000-0000-0000-000000000000). Do not validate it against the
cluster's deployment id during registration.
This commit is contained in:
Shireesh Anjal
2024-02-23 16:44:28 -08:00
committed by GitHub
parent 403bf6bc3a
commit 744dc910d8
+1 -1
View File
@@ -637,7 +637,7 @@ func validateAndSaveLic(lic, alias string, saveAPIKey bool) string {
fatalIf(errDummy().Trace(), fmt.Sprintf("License has expired on %s", li.ExpiresAt))
}
if len(li.DeploymentID) > 0 && li.DeploymentID != getAdminInfo(alias).DeploymentID {
if len(li.DeploymentID) > 0 && li.DeploymentID != uuid.Nil.String() && li.DeploymentID != getAdminInfo(alias).DeploymentID {
fatalIf(errDummy().Trace(), fmt.Sprintf("License is invalid for the deployment %s", alias))
}