【Service Fabric】Service Fabric删不掉的问题

问题描述

在使用Service Fabric服务后,想删除资源。却遇见无法删除的问题。在查看错误消息中,看见把中文的资源组名称转换为乱码了,十分怀疑是中文字符无法识别的原因。

日志中的资源信息: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/龦啊阿丏丄丅3狧埃挨哎唉D2繭狾㑳狵狶丒丟D㐁㐂㐀丆狪/providers/Microsoft.ServiceFabric/managedclusters/xxxx

 

问题解答

深入查看更多日志,发现原因并不是资源组乱码的问题。而是资源依赖(被删除资源被使用中)导致,在Service Fabric中使用的虚拟网络子网(Subnet)和网络安全组(NSG)资源,被其它的资源占用。

详细错误消息:

failed with exception (Retry=0, Retryable=False Elapsed=00:09:03.1420):

Microsoft.Rest.Azure.CloudException: RequestId: StatusCode: Conflict Reason: Conflict

Message: Long running operation failed with status 'Conflict'.

Body:
{
"Code": "ResourceGroupDeletionBlocked",
"Message": "Deletion of resource group 'SFC_**-*-*-*-***' failed as resources with identifiers 'Microsoft.Network/networkSecurityGroups/SF-NSG,Microsoft.Network/virtualNetworks/VNet-xxxxxxxx' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is '**-*-*-*-***'. Please check audit logs for more details.",
"Target": null,
"Details": [
{
"Code": null,
"Message": "{\"error\":{\"code\":\"InUseNetworkSecurityGroupCannotBeDeleted\",\"message\":\"Network security group /subscriptions/**-*-*-*-***/resourceGroups/SFC_1/providers/Microsoft.Network/networkSecurityGroups/SF-NSG cannot be deleted because it is in use by the following resources: /subscriptions/**-*-*-*-***/resourceGroups/SFC_1/providers/Microsoft.Network/virtualNetworks/VNet-xxxxxxxx/subnets/SF-Nodes. In order to delete the Network security group, remove the association with the resource(s). To learn how to do this, see aka.ms/deletensg.\",\"details\":[]}}",
"Target": "/subscriptions/**-*-*-*-***/resourceGroups/SFC_1/providers/Microsoft.Network/networkSecurityGroups/SF-NSG",
"Details": [],
"AdditionalInfo": []
},
{
"Code": null,
"Message": "{\"error\":{\"code\":\"InUseSubnetCannotBeDeleted\",\"message\":\"Subnet SF-Nodes is in use by /subscriptions/**-*-*-*-***/resourceGroups/SFC_1/providers/Microsoft.Network/networkInterfaces/test.nic.**-*-*-*-***/ipConfigurations/privateEndpointIpConfig and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.\",\"details\":[]}}",
"Target": "/subscriptions/**-*-*-*-***/resourceGroups/SFC_1/providers/Microsoft.Network/virtualNetworks/VNet-xxxxxxxx",
"Details": [],
"AdditionalInfo": []
}
],
"AdditionalInfo": []
}

删除依赖资源后,再次删除Service Fabric成功。

 

 

[END]

 

posted @ 2024-06-12 20:49  路边两盏灯  阅读(13)  评论(0编辑  收藏  举报