Do not fail if deployment id not found in license (#4767)

SUBNET is being enhanced to generate account-level licenses instead of
deployment-level. So newer licenses may not contain the deployment id.

So validate the deployment id against the cluster only if present in the
license.
This commit is contained in:
Shireesh Anjal
2023-11-20 08:30:59 -08:00
committed by GitHub
parent d8342b68a0
commit 937b34616f
+1 -1
View File
@@ -609,7 +609,7 @@ func validateAndSaveLic(lic, alias string, saveAPIKey bool) string {
fatalIf(errDummy().Trace(), fmt.Sprintf("License has expired on %s", li.ExpiresAt))
}
if li.DeploymentID != getAdminInfo(alias).DeploymentID {
if len(li.DeploymentID) > 0 && li.DeploymentID != getAdminInfo(alias).DeploymentID {
fatalIf(errDummy().Trace(), fmt.Sprintf("License is invalid for the deployment %s", alias))
}