From c93cf500e57e9ff651be73a35be3a92a6ef44d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20LEUILLIOT?= Date: Mon, 24 Jul 2023 14:22:18 +0200 Subject: [PATCH] fix: ensure tenant is mounted before importing license when container is deployed with multitenant setup, we must ensure default tenant is not in "Mounting" state before attempting to import the license. otherwise, we will get a runtime exception. --- generic/Run/SetupLicense.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/generic/Run/SetupLicense.ps1 b/generic/Run/SetupLicense.ps1 index 21436b7..df7de1e 100644 --- a/generic/Run/SetupLicense.ps1 +++ b/generic/Run/SetupLicense.ps1 @@ -11,6 +11,19 @@ if ($restartingInstance) { } elseif ($licensefile -ne "") { + if ($multitenant) + { + $status = (Get-NavTenant -ServerInstance $ServerInstance).State + + while ($status -eq "Mounting") + { + Write-Host "Tenant default was not ready: $($status)" + Start-Sleep -Seconds 5 + + $status = (Get-NavTenant -ServerInstance $ServerInstance).State + } + } + if ($licensefile.StartsWith("https://") -or $licensefile.StartsWith("http://")) { $licensefileurl = $licensefile