diff --git a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1 b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1 index 387f5e60..da8b6838 100644 --- a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1 +++ b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1 @@ -12,7 +12,7 @@ RootModule = 'AzureBasicLoadBalancerUpgrade' # Version number of this module. - ModuleVersion = '2.0.18' + ModuleVersion = '2.0.19' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psd1 b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psd1 index 57a0c98f..10a92f5c 100644 --- a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psd1 +++ b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psd1 @@ -12,7 +12,7 @@ RootModule = 'ValidateScenario' # Version number of this module. -ModuleVersion = '0.1.5' +ModuleVersion = '0.1.6' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1 b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1 index 017bb9bf..b9e2340f 100644 --- a/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1 +++ b/AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1 @@ -283,6 +283,14 @@ Function Test-SupportedMigrationScenario { log -Message $message -Severity 'Warning' } } + + # check is vmss is a managed service fabric cluster, which are not supported for upgrade + log -Message "[Test-SupportedMigrationScenario] Checking whether VMSS scale set '$($vmss.name)' is a managed Service Fabric cluster..." + If ($vmss.VirtualMachineProfile.ExtensionProfile.Extensions.type -contains 'ServiceFabricMCNode') { + + $message = "[Test-SupportedMigrationScenario] VMSS appears to be a Managed Service Fabric cluster based on extension profile (includes type 'ServiceFabricMCNode'). Managed Service Fabric clusters are not supported for upgrade." + log -Message $message -Severity 'Error' -terminateOnError + } # check if vmss is service fabric cluster, warn about possible downtime log -Message "[Test-SupportedMigrationScenario] Checking whether VMSS scale set '$($vmss.name)' is a Service Fabric cluster..." diff --git a/AzureBasicLoadBalancerUpgrade/testEnvs/scenarios/051-vmss-managed-sfc.json b/AzureBasicLoadBalancerUpgrade/testEnvs/scenarios/051-vmss-managed-sfc.json new file mode 100644 index 00000000..79774e37 --- /dev/null +++ b/AzureBasicLoadBalancerUpgrade/testEnvs/scenarios/051-vmss-managed-sfc.json @@ -0,0 +1,162 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "_generator": { + "name": "bicep", + "version": "0.16.1.55165", + "templateHash": "932140331037582989" + } + }, + "parameters": { + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Region" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "[format('clu{0}', uniqueString(newGuid()))]", + "maxLength": 23, + "minLength": 4, + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "clusterSku": { + "type": "string", + "defaultValue": "Basic", + "allowedValues": [ + "Basic", + "Standard" + ] + }, + "adminUserName": { + "type": "string", + "defaultValue": "vmadmin" + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "[newGuid()]" + }, + "clientCertificateThumbprint": { + "type": "string", + "defaultValue": "F28CE76CBD99AF46245942B05C9B368BAE9BF226", + "metadata": { + "description": "Client Certificate Thumbprint" + } + }, + "nodeTypeName": { + "type": "string", + "defaultValue": "NT1", + "maxLength": 9 + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "2019-Datacenter" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2s_v3" + }, + "vmInstanceCount": { + "type": "int", + "defaultValue": 3 + }, + "dataDiskSizeGB": { + "type": "int", + "defaultValue": 128 + }, + "managedDataDiskType": { + "type": "string", + "defaultValue": "StandardSSD_LRS", + "allowedValues": [ + "Standard_LRS", + "StandardSSD_LRS", + "Premium_LRS" + ] + }, + "resourceGroupName": { + "type": "string" + } + }, + "resources": [ + { + "type": "Microsoft.ServiceFabric/managedClusters", + "apiVersion": "2022-08-01-preview", + "name": "[parameters('clusterName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('clusterSku')]" + }, + "properties": { + "dnsName": "[toLower(parameters('clusterName'))]", + "adminUserName": "[parameters('adminUserName')]", + "adminPassword": "[parameters('adminPassword')]", + "clientConnectionPort": 19000, + "httpGatewayConnectionPort": 19080, + "clients": [ + { + "isAdmin": true, + "thumbprint": "[parameters('clientCertificateThumbprint')]" + } + ], + "loadBalancingRules": [ + { + "frontendPort": 8080, + "backendPort": 8080, + "protocol": "tcp", + "probeProtocol": "tcp" + } + ] + } + }, + { + "type": "Microsoft.ServiceFabric/managedClusters/nodeTypes", + "apiVersion": "2022-08-01-preview", + "name": "[format('{0}/{1}', parameters('clusterName'), parameters('nodeTypeName'))]", + "properties": { + "isPrimary": true, + "vmImagePublisher": "[parameters('vmImagePublisher')]", + "vmImageOffer": "[parameters('vmImageOffer')]", + "vmImageSku": "[parameters('vmImageSku')]", + "vmImageVersion": "[parameters('vmImageVersion')]", + "vmSize": "[parameters('vmSize')]", + "vmInstanceCount": "[parameters('vmInstanceCount')]", + "dataDiskSizeGB": "[parameters('dataDiskSizeGB')]", + "dataDiskType": "[parameters('managedDataDiskType')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName'))]" + ] + } + ], + "outputs": { + "serviceFabricExplorer": { + "type": "string", + "value": "[format('https://{0}:{1}', reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').fqdn, reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').httpGatewayConnectionPort)]" + }, + "clientConnectionEndpoint": { + "type": "string", + "value": "[format('{0}:{1}', reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').fqdn, reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').clientConnectionPort)]" + }, + "clusterProperties": { + "type": "object", + "value": "[reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview')]" + } + } +} \ No newline at end of file