You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create multiple node pool with same vnet subnet ID, it throws SetVNetOwnershipFailed
Error: creating Agent Pool (Subscription: "312d56f6-697b-4377-9a9a-83257ce33066"
Resource Group Name: "acctestRG-aks-240506121623880995"
Managed Cluster Name: "acctestaks240506121623880995"
Agent Pool Name: "internal3"): polling after CreateOrUpdate: polling failed: the Azure API returned the following error:
Status: "SetVNetOwnershipFailed"
Code: ""
Message: "Set virtual network ownership failed. Subscription: 312d56f6-697b-4377-9a9a-83257ce33066; resource group: acctestRG-aks-240506121623880995; virtual network name: acctestvirtnet240506121623880995. autorest/azure: Service returned an error. Status=400 Code=\"VirtualNetworkNotInSucceededState\" Message=\"Virtual network /subscriptions/312d56f6-697b-4377-9a9a-83257ce33066/resourceGroups/acctestRG-aks-240506121623880995/providers/Microsoft.Network/virtualNetworks/acctestvirtnet240506121623880995 is in Updating state. It needs to be in Succeeded state in order to set resource ownership.\" Details=[]\nVirtual network /subscriptions/312d56f6-697b-4377-9a9a-83257ce33066/resourceGroups/acctestRG-aks-240506121623880995/providers/Microsoft.Network/virtualNetworks/acctestvirtnet240506121623880995 is in Updating state. It needs to be in Succeeded state in order to set resource ownership."
Activity Id: ""
---
API Response:
----[start]----
{
"name": "da6f9f40-6f18-4380-b252-d516cd3659f0",
"status": "Failed",
"startTime": "2024-05-06T16:21:01.6132767Z",
"endTime": "2024-05-06T16:21:09.0898922Z",
"error": {
"code": "SetVNetOwnershipFailed",
"message": "Set virtual network ownership failed. Subscription: 312d56f6-697b-4377-9a9a-83257ce33066; resource group: acctestRG-aks-240506121623880995; virtual network name: acctestvirtnet240506121623880995. autorest/azure: Service returned an error. Status=400 Code=\"VirtualNetworkNotInSucceededState\" Message=\"Virtual network /subscriptions/312d56f6-697b-4377-9a9a-83257ce33066/resourceGroups/acctestRG-aks-240506121623880995/providers/Microsoft.Network/virtualNetworks/acctestvirtnet240506121623880995 is in Updating state. It needs to be in Succeeded state in order to set resource ownership.\" Details=[]",
"details": [
{
"code": "",
"message": "Virtual network /subscriptions/312d56f6-697b-4377-9a9a-83257ce33066/resourceGroups/acctestRG-aks-240506121623880995/providers/Microsoft.Network/virtualNetworks/acctestvirtnet240506121623880995 is in Updating state. It needs to be in Succeeded state in order to set resource ownership."
}
]
}
}
-----[end]-----
with azurerm_kubernetes_cluster_node_pool.test3,
on terraform_plugin_test.tf line 97, in resource "azurerm_kubernetes_cluster_node_pool" "test3":
97: resource "azurerm_kubernetes_cluster_node_pool" "test3" {
To Reproduce
Steps to reproduce the behavior:
It could be reproduced with this terraform config: https://gist.github.com/ms-henglu/b7532f48005415aa3a89b57ffdded326 with azurerm version less than v3.1.04.0 because in v3.104.0 a client-side fix is introduced (a client-side lock is added to prevent multiple node pool creating at the same time)
Expected behavior
The error should not happen even without the client-side fix.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Describe the bug
Create multiple node pool with same vnet subnet ID, it throws SetVNetOwnershipFailed
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The error should not happen even without the client-side fix.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
hashicorp/terraform-provider-azurerm#25888
The text was updated successfully, but these errors were encountered: