Azure netapp files Error: Volume Cannot be created in a pool that is not in state succeded

Basavaraj Biradar 1 Reputation point
2021-01-09T13:10:51.477+00:00

I'm getting the mentioned error while deploying the arm template with azure devops pipeline. PreconditionFailed: Volume Cannot be created in a pool that is not in state succeded. I'm trying to create to create azure netapp account and volumes and attaching the backup policy for volumes. Here i'm attaching the arm template script .

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "domainJoinUser": {
            "type": "string",
            "metadata": {
                "description": "usename used to join domain"
            }
        },
        "domainJoinPassword": {
            "type": "securestring",
            "metadata": {
                "description": "password used to join domain"
            }
        },
        "deployNetApp": {
            "type": "bool",
            "defaultValue": false
        },
        "snapshotpolicyname":{
            "type": "string"
        },
        "snapshotPolicySettings":{
            "type": "object"
        }
    },
    "functions": [
        {
            "namespace": "corteva",
            "members": {
                "adConnectionUser": {
                    "parameters": [
                        {
                            "name": "userName",
                            "type": "string"
                        },
                        {
                            "name": "domainName",
                            "type": "string"
                        }
                    ],
                    "output": {
                        "type": "string",
                        "value": "[concat(split(parameters('userName'), '\\')[1], '@', parameters('domainName'))]"
                    }
                }
            }
        }
    ],
    "variables": {
        "adDomain": "abc.com",
        "adServerOU": "OU=Azure,OU=Servers",
        "delegatedSubnet": "[resourceGroup().tags.Subnet]",
        "location": "eastus2",
        "logAnalyticsResourceId": "/subscriptions/****/resourceGroups/IT-PROD/providers/Microsoft.OperationalInsights/workspaces/oms-prod",
        "primaryDnsServer": "x.x.240.17",
        "smbServerNamePrefix": "[concat(replace(resourceGroup().tags.NamingPrefix, 'AZ', ''), 'NA')]",
        "netAppAccountName": "NetAppFilesAccount",
        "capacityPoolName": "CapacityPool",
        "volumeNameNSF": "NSFVolume",
        "volumeNameSMB": "SMBVolume"
    },
    "resources": [
        {
            "condition": "[parameters('deployNetApp')]",
            "type": "Microsoft.NetApp/netAppAccounts",
            "apiVersion": "2019-07-01",
            "name": "[variables('netAppAccountName')]",
            "location": "[variables('location')]",
            "properties": {
                "activeDirectories": [
                    {
                        "username": "[corteva.adConnectionUser(parameters('domainJoinUser'), variables('adDomain'))]",
                        "password": "[parameters('domainJoinPassword')]",
                        "domain": "[variables('adDomain')]",
                        "dns": "[variables('primaryDnsServer')]",
                        "smbServerName": "[variables('smbServerNamePrefix')]",
                        "organizationalUnit": "[variables('adServerOU')]"
                    }
                ]
            }
        },
        {
            "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
            "apiVersion": "2019-07-01",
            "name": "[concat(variables('netAppAccountName'), '/', variables('capacityPoolName'))]",
            "location": "[variables('location')]",
            "dependsOn": [
                "[resourceId('Microsoft.NetApp/netAppAccounts', variables('netAppAccountName'))]"
            ],
            "properties": {
                "serviceLevel": "Premium",
                "size": 4398046511104
            }
        },
        {
            "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
            "apiVersion": "2019-07-01",
            "name": "[concat(variables('netAppAccountName'), '/', variables('capacityPoolName'), '/', variables('volumeNameNSF'))]",
            "location": "[variables('location')]",
            "dependsOn": [
                "[resourceId('Microsoft.NetApp/netAppAccounts', variables('netAppAccountName'))]",
                "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', variables('netAppAccountName'), variables('capacityPoolName'))]",
                "[resourceId('Microsoft.NetApp/netAppAccounts/snapshotPolicies', variables('netAppAccountName'), parameters('snapshotPolicySettings').policyName)]"
            ],
            "properties": {
                "serviceLevel": "Premium",
                "creationToken": "[variables('volumeNameNSF')]",
                "usageThreshold": 107374182400,
                "exportPolicy": {
                    "rules": [
                        {
                            "ruleIndex": 1,
                            "unixReadOnly": false,
                            "unixReadWrite": true,
                            "cifs": false,
                            "nfsv3": true,
                            "nfsv41": false,
                            "allowedClients": "0.0.0.0/0"
                        }
                    ]
                },
                "dataProtection":{
                    "snapshot": {
                        "snapshotPolicyId": "[resourceId('Microsoft.NetApp/netAppAccounts/snapshotPolicies', variables('netAppAccountName'), parameters('snapshotPolicySettings').policyName)]"
                    }
                },
                "protocolTypes": [
                    "NFSv3"
                ],
                "subnetId": "[variables('delegatedSubnet')]"
            }
        },
        {
            "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
            "apiVersion": "2019-05-01",
            "name": "[concat(variables('netAppAccountName'), '/', variables('capacityPoolName'), '/', variables('volumeNameSMB'))]",
            "location": "[variables('location')]",
            "dependsOn": [
                "[resourceId('Microsoft.NetApp/netAppAccounts', variables('netAppAccountName'))]",
                "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', variables('netAppAccountName'), variables('capacityPoolName'))]",
                "[resourceId('Microsoft.NetApp/netAppAccounts/snapshotPolicies', variables('netAppAccountName'), parameters('snapshotPolicySettings').policyName)]"
            ],
            "properties": {
                "serviceLevel": "Premium",
                "creationToken": "[variables('volumeNameSMB')]",
                "usageThreshold": 107374182400,
                "exportPolicy": {
                    "rules": []
                },
                "dataProtection":{
                    "snapshot": {
                        "snapshotPolicyId": "[resourceId('Microsoft.NetApp/netAppAccounts/snapshotPolicies', variables('netAppAccountName'), parameters('snapshotPolicySettings').policyName)]"
                    }
                },
                "protocolTypes": [
                    "CIFS"
                ],
                "subnetId": "[variables('delegatedSubnet')]"             
            }
        },
        {
            "type": "Microsoft.NetApp/netAppAccounts/capacityPools/providers/diagnosticSettings",
            "apiVersion": "2017-05-01-preview",
            "name": "[concat(variables('netAppAccountName'), '/', variables('capacityPoolName'), '/', 'microsoft.insights', '/', 'diagnostics')]",
            "dependsOn": [
                "[resourceId('Microsoft.NetApp/netAppAccounts', variables('netAppAccountName'))]",
                "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', variables('netAppAccountName'), variables('capacityPoolName'))]"
            ],
            "properties": {
                "name": "diagnostics",
                "storageAccountId": null,
                "eventHubAuthorizationRuleId": null,
                "eventHubName": null,
                "workspaceId": "[variables('logAnalyticsResourceId')]",
                "logs": [
                ],
                "metrics": [
                    {
                        "category": "AllMetrics",
                        "enabled": true
                    }
                ]
            }
        },
        {
            "name": "[concat(variables('netAppAccountName'), '/', parameters('snapshotPolicySettings').policyName)]",
            "type": "Microsoft.NetApp/netAppAccounts/snapshotPolicies",
            "apiVersion": "2020-08-01",
            "location": "[variables('location')]",
            "dependsOn": [
                "[resourceId('Microsoft.NetApp/netAppAccounts', variables('netAppAccountName'))]"
            ],
            "properties": {
                "hourlySchedule": {
                "snapshotsToKeep": "[parameters('snapshotPolicySettings').hourlySchedule_snapshotsToKeep]",
                "minute": "[parameters('snapshotPolicySettings').hourlySchedule_minute]"
                },
                "dailySchedule": {
                "snapshotsToKeep": "[parameters('snapshotPolicySettings').dailySchedule_snapshotsToKeep]",
                "hour": "[parameters('snapshotPolicySettings').dailySchedule_hour]",
                "minute": "[parameters('snapshotPolicySettings').dailySchedule_minute]"
                },
                "weeklySchedule": {
                "snapshotsToKeep": "[parameters('snapshotPolicySettings').weeklySchedule_snapshotsToKeep]",
                "day": "[parameters('snapshotPolicySettings').weeklySchedule_day]",
                "hour": "[parameters('snapshotPolicySettings').weeklySchedule_hour]",
                "minute": "[parameters('snapshotPolicySettings').weeklySchedule_minute]"
                },
                "monthlySchedule": {
                "snapshotsToKeep": "[parameters('snapshotPolicySettings').monthlySchedule_snapshotsToKeep]",
                "daysOfMonth": "[parameters('snapshotPolicySettings').monthlySchedule_daysOfMonth]",
                "hour": "[parameters('snapshotPolicySettings').monthlySchedule_hour]",
                "minute": "[parameters('snapshotPolicySettings').monthlySchedule_minute]"
                },
                "enabled": "true"
            }
        }
    ],
    "outputs": {
        "ADConnectionUser": {
            "type": "string",
            "value": "[corteva.adConnectionUser(parameters('domainJoinUser'), variables('adDomain'))]"
        },
        "serverAccount": {
            "type": "string",
            "value": "[variables('smbServerNamePrefix')]"
        }
    }
}
Azure NetApp Files
Azure NetApp Files
An Azure service that provides enterprise-grade file shares powered by NetApp.
93 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 46,446 Reputation points Microsoft Employee
    2021-01-13T16:04:01.81+00:00

    @Basavaraj Biradar Thank you for your time and patience! I wish to engage with you offline for a closer look and provide a quick and specialized assistance, please send an email with subject line “Attn:subm” to AzCommunity[at]Microsoft[dot]com referencing this thread and the Azure subscription ID, I will follow-up with you. Once again, apologies for any inconvenience with this issue.

    Thanks for your patience and co-operation.

    --------------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.