From 937b34616f012ad30e1cd6fd61e1da25ff931648 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Mon, 20 Nov 2023 22:00:59 +0530 Subject: [PATCH] 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. --- cmd/subnet-utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/subnet-utils.go b/cmd/subnet-utils.go index 43c46c10..4545f5cd 100644 --- a/cmd/subnet-utils.go +++ b/cmd/subnet-utils.go @@ -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)) }